|
请11.01下载的朋友更新此文件,已有修改
主程序已更新。发现一个低级错误
包已更新
如果修改,请打开myweather.php,将条件判断时的语句改成
if(file_exists($tempfile) && filesize($tempfile)>1024 && ((time()-fileatime($tempfile))<=3600))
就行了。低级:)被人误导了,说time()取得的是毫秒,而且也应该是用fileatime而不是filectime的:)
图片:
此程序由笨笨啊所写
联系方式:
主页:http://www.zjoubbs.com
邮箱:netknave@163.com
QQ: 19347221
演示:http://www.zjoubbs.com
此天气预报源数据来自http://www.weathercn.com/
一小时更新数次,很权威的
目前是设为一个小时自动更新一次,如果发现有什么问题,请与我联系~
修改方法:
1.打开http://www.weathercn.com/,找到你要显示天气的城市时的URL,如显示定海的天气,则URl为
http://www.weathercn.com/forecastn/forcast/forecastDetail_gai.jsp?station_name=%B6%A8%BA%A3&station_id=58477&province=%D5%E3%BD%AD&district=%D6%DB%C9%BD
然后修改myweather.php里的$url的值,即可
2.上传myweather.php和weather.css两个文件到论坛根目录下
3.打开模板文件index.htm
找到
◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆
<tr><td colspan=2 class=index_font>=>友情链接</td></tr>
<tr height=40><td class=f_two align=center width=5% rowspan=1>
<img src='$imgpath/$stylepath/index/share.gif'></td>
<td class=f_one width=95%>$sharelink</td></tr>
◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆
在后面加是一段
◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆
<tr><td colspan=2 class=index_font>=>天气预报</td></tr>
<tr height=40><td class=f_two align=center width=5% rowspan=1>
<img src='$imgpath/$stylepath/index/share.gif'></td>
<td class=f_one width=95%>
<iframe src="myweather.php" width="98%" height="150" scrolling="no" frameborder="0"></iframe>
</td>
</tr>
◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆
保存退出
PS.此插件运行会,会自动在根目录下生成一个临时文件tempweather.htm,这是为了缓冲加速用的,因为此天气系统一个小时才更新一次,所以这个文件一个小时才会更新一次,从本地读将极大地提高速度:)要想立即更新,请删除些文件再刷新一下即可
另,下载地址
http://www.zjoubbs.com/netknave/pw_hack/myweather.rar |
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有帐号?注册
x
|