
Script: php Yahoo! Weather Widget
Version: 3.6
Rights: © Revived Wire Media - revivedwire.com
[Installation]
- Extract all the files
- Open any demo*.php and make the necessary configuration changes (for cities that do not have a zip code, you must enter a location ID. To find your location ID, browse or search for your city from the Yahoo! Weather home page. The weather ID is in the RSS URL for the forecast page for that city. For example, if you search for Zurich, Switzerland on the Yahoo! Weather home page and click the orange RSS button, the forecast page for that city is http://weather.yahooapis.com/forecastrss?p=SZXX0033&u=f. The location ID is SZXX0033.
- To view the demo files, upload them with the /icon folder to host (no need to upload /docs folder)
- The demo files and the /icon folder can be renamed if desired
- Display as much or as little as you want. These are only demos ... get creative!
[Using Reflections]
- Look at the code in demo5.php (small icons) and/or demo6.php (large icons). You'll notice they reference alternative icon sets — located in the folders sm_wbg and lg_wbg. These icons contain a white background — they are not transparent .png files. The reflection.php script — which generates the reflections — needs a solid background in the image that is being reflected. In these two aforementioned demo files, the background color is white. If you need a different background color for your reflections, open the transparent .png files in the other two folders — sm and lg — in an image editor, add your desired background color and save them into separate folders. *AS A PRECAUTION, we recommend that you backup the existing transparent .png files before proceeding with this step. Yes, we're talking to you 4:00 am, up-all-night, losing steam but gotta get this done codemonkey and yes, we speak from experience! :)
- Make certain you carefully scrutinze the paths to your icons and reflection.php in the /* Config Section */
- If you do indeed use a background color other than white, open reflection.php and change the color hex value in $bgc = 'fff'; — on line 25 — to your new color hex value.
If the weather data isn't being displayed or the xml file is not generated and placed in your server directory — please don't get all crazy and remove us from your Christmas lists! :) Try replacing line two in your "display" file so that it references the alternative version — entitled weather.class.alt.php (or weather.class.5day.alt.php) — which uses different php functions. If this doesn't resolve the issue, try changing the chmod of the folder in which all of the weather files reside — as well as the folder entitled icons — to 777. If this doesn't work, try chmoding everything to 777 (it's highly unlikely that this last option would be a necessity).
|