There are too many bugs in weather1.26(or weathercenter etc.)The following suggest maybe useful:
NOTE:
1, modify the pnuserapi.php from line 657 to line 702:
fputs($fa,"GET /m/chnk/d/weather_d_src.asp?acid=$accid HTTP/1.0\r\nHost: www.msnbc.com\r\n\r\n");
$answer = fgets($fa,128);
$v_City = "";
$v_SubDiv = "";
$v_Country = "";
$v_Region = "";
$v_Temp = "";
$v_TempCel = "";
$v_CIcon = "";
$v_WindS = "";
$v_WindD = "";
$v_Baro = "";
$v_Humid = "";
$v_Real = "";
$v_UV = "";
$v_Vis = "";
$v_LastUp = "";
$v_ConText = "";
$v_Fore = "";
$v_Acid = "";
while (!feof($fa)) {
$grabline = fgets($fa, 4096);
$grabline= trim($grabline) . "\n";
if (substr($grabline,7,4) == "City") { $v_City = substr($grabline,15,20); }
if (substr($grabline,7,6) == "SubDiv") { $v_SubDiv = substr($grabline,17,20); }
if (substr($grabline,7,7) == "Country") { $v_Country = substr($grabline,18,20); }
if (substr($grabline,7,6) == "Region") { $v_Region = substr($grabline,17,20); }
if (substr($grabline,7,5) == "Temp ") { $v_Temp = substr($grabline,15,20); }
if (substr($grabline,7,7) == "TempCel") { $v_TempCel = substr($grabline,18,60); }
if (substr($grabline,7,5) == "CIcon") { $v_CIcon = substr($grabline,16,20); }
if (substr($grabline,7,5) == "WindS") { $v_WindS = substr($grabline,16,20); }
if (substr($grabline,7,5) == "WindD") { $v_WindD = substr($grabline,16,20); }
if (substr($grabline,7,4) == "Baro") { $v_Baro = substr($grabline,15,20); }
if (substr($grabline,7,5) == "Humid") { $v_Humid = substr($grabline,16,20); }
if (substr($grabline,7,4) == "Real") { $v_Real = substr($grabline,15,20); }
if (substr($grabline,7,2) == "UV") { $v_UV = substr($grabline,13,20); }
if (substr($grabline,7,3) == "Vis") { $v_Vis = substr($grabline,14,20); }
if (substr($grabline,7,6) == "LastUp") { $v_LastUp = substr($grabline,17,20); }
if (substr($grabline,7,7) == "ConText") { $v_ConText = substr($grabline,18,40); }
if (substr($grabline,7,4) == "Fore") { $v_Fore = substr($grabline,15,200); }
if (substr($grabline,7,4) == "Acid") { $v_Acid = substr($grabline,15,12); }
}
2, modify line 645:
$cache_time_rnd = 300 - rand(0, 7200);
with this setting you can change cache time to 15000.and adjust the block
reflesh time to three hours.
3, get the new msnbc citycode with this code:
- mercromina responded to »error when i try to upgrade to the last version of dizkus module (3.1)« 08:01 PM
- craigh responded to »TagIt 3.0 for Zikula« 03:58 PM
- localrags responded to »Remove contents of nuke_sc_anticracker from Database« 11:30 AM
- jmvaughn responded to »Shoutit for zikula 1.3?« 09:31 AM
- mdee responded to »Different page content under one template (tpl file) based on URL« 07:17 AM
- espaan responded to »Categories disappear when editing ...« 08. Feb
- eledril responded to »How decrease zikula cpu usage« 08. Feb
Zikula Blog
- Anatomy of Open Source Projects on Mar 07
- Continuous Review on Mar 01
- Not Invented Here on Feb 24
- How to Contribute Your Code at Github on Jan 13
- 10 Steps to Coding-Nirvana: Tips for Successful Module Writing on Nov 12
- Submitting Bug Report Tickets That Get Results on Aug 17
- Cozi Tricks #1: Syntax Highlighting on Aug 07
