Fix For eWeather "Forecast Not Showing" (Severe Weather Alert Fix) ------------------------------------------------------------------- From time-to-time The Weather Channel will implement a Severe Weather Alert. This Weather Alert will be added into the Weather Channel's XML file. Doing this, will "break" the eWeather code that parses the XML file. This "fix" will allow the eWeather code to remove Severe Weather Alerts from your incoming forecast XML, so that the forecast will still display. As always, please backup your data, before altering files. In "/components/com_eweather/eweather.main.php" At Line 56, you will see : } else { $newFeed = $xmlDoc->toString(false); Replace that code with : } else { /* BEGINNING OF SEVERE WEATHER ALERT FIX */ $newFeedold = $xmlDoc->toString(false); $search1=""; if (strpos($newFeedold, $search1) !== false) { $zap = array("", ""); $stringzapped = str_replace($zap, "**", $newFeedold); $endstring = substr(strrchr($stringzapped, "**"), 1); $firstasterisk= strpos($stringzapped, "**"); $beginningofstring = substr($stringzapped, 0, $firstasterisk); $newFeed= $beginningofstring . $endstring; } else { $newFeed = $newFeedold; } /* END OF SEVERE WEATHER ALERT FIX */ The next three lines should remain untouched, they are : $id=(int)$rows[0]->id; $sql = "UPDATE #__eweather_cache SET `lastupdate` = '".time()."',`feed` = '$newFeed' WHERE `id` = '$id'"; } A little below that in the code, at the original line 71 (you entered the code above, so the line number will be different), you will have to enter the same "fix" code. So, after all of your replacements, starting at Line 52, your code should look like the following : $success = $xmlDoc->loadXML($weather_url, true); if (!$success) { $weatherClass->e_error = "Error number ".$xmlDoc->getErrorCode().": ".$xmlDoc->getErrorS$ return $weatherClass; } else { /* BEGINNING OF SEVERE WEATHER ALERT FIX */ $newFeedold = $xmlDoc->toString(false); $search1=""; if (strpos($newFeedold, $search1) !== false) { $zap = array("", ""); $stringzapped = str_replace($zap, "**", $newFeedold); $endstring = substr(strrchr($stringzapped, "**"), 1); $firstasterisk= strpos($stringzapped, "**"); $beginningofstring = substr($stringzapped, 0, $firstasterisk); $newFeed= $beginningofstring . $endstring; } else { $newFeed = $newFeedold; } /* END OF SEVERE WEATHER ALERT FIX */ # $newFeed = $xmlDoc->toString(false); $id=(int)$rows[0]->id; $sql = "UPDATE #__eweather_cache SET `lastupdate` = '".time()."',`feed` = '$newFeed' WHE$ } } else { $success = $xmlDoc->parseXML($rows[0]->feed, true); } } else { $weather_url = "http://xoap.weather.com/weather/local/".$weatherDefaultLocationID."?cc=*&dayf$ $success = $xmlDoc->loadXML($weather_url, true); if (!$success) { $weatherClass->e_error = "Error number ".$xmlDoc->getErrorCode().": ".$xmlDoc->getErrorStr$ return $weatherClass; } else { /* BEGINNING OF SEVERE WEATHER ALERT FIX */ $newFeedold = $xmlDoc->toString(false); $search1=""; if (strpos($newFeedold, $search1) !== false) { $zap = array("", ""); $stringzapped = str_replace($zap, "**", $newFeedold); $endstring = substr(strrchr($stringzapped, "**"), 1); $firstasterisk= strpos($stringzapped, "**"); $beginningofstring = substr($stringzapped, 0, $firstasterisk); $newFeed= $beginningofstring . $endstring; } else { $newFeed = $newFeedold; } /* END OF SEVERE WEATHER ALERT FIX */ # $newFeed = $xmlDoc->toString(false); $sql = "INSERT INTO #__eweather_cache ( `id` , `lastupdate` , `locid` , `feed` ) VALUES ('$ } } $element = &$xmlDoc->documentElement;