Weather Block Works Internationally Not Just USA
I have been trying out all of the other weather blocks and for the most part, they are excellent with one major flaw, and that's the ability for users to change the location of the weather forecast for their local area. As such here's my first and simple (Successful) attempt at making one that does exactly that.
the install is a bit long winded, but I'm not a programmer. just thought this might be useful for others. First things first, you need to goto http://www.weather.com and get yourself setup there. it's a fairly simple process, and at the end of it all you can grab the required code etc... Setup your profile and subscribe to the "Weather on my Website", configure it for your tastes, and get the code from them which should look something like this... Code:
<div id="wx_module_XXXX"> <a href="http://www.weather.com/weather/local/CAXX0126">Edmonton Weather Forecast, Canada</a> </div> <script type="text/javascript"> /* Locations can be edited manually by updating 'wx_locID' below. Please also update */ /* the location name and link in the above div (wx_module) to reflect any changes made. */ var wx_locID = 'CAXX0126'; /* If you are editing locations manually and are adding multiple modules to one page, each */ /* module must have a unique div id. Please append a unique # to the div above, as well */ /* as the one referenced just below. If you use the builder to create individual modules */ /* you will not need to edit these parameters. */ var wx_targetDiv = 'wx_module_XXXX'; /* Please do not change the configuration value [wx_config] manually - your module */ /* will no longer function if you do. If at any time you wish to modify this */ /* configuration please use the graphical configuration tool found at */ /* https://registration.weather.com/ursa/wow/step2 */ var wx_config='SZ=180x150*WX=FHW*LNK=SSNL*UNT=C*BGI=fall*MAP=null|null*DN=albertadualsport.ca*TIER=0*PID=1210511278*MD5=c7ee34060594c2089d62227199b7a52a'; document.write('<scr'+'ipt src="'+document.location.protocol+'//wow.weather.com/weather/wow/module/'+wx_locID+'?config='+wx_config+'&proto='+document.location.protocol+'&target='+wx_targetDiv+'"></scr'+'ipt>'); </script> So, you will need to add a custom Profile field to your users profile. NOTE: Users in the U.S. can use ZIP CODES all other Non-U.S. users need a specific Identifier. Modify the script you received from weather.com Change var wx_locID = 'CAXX0126'; To var wx_locID = '{vb:raw bbuserinfo.fieldX}'; Where the X is the Custom Filed number you added. Take the Modded script and add a Module to the CMPS ADMIN --> vBa CMPS --> Add Module Module Title : Weather Active : YES CSS Template to Include : Leave Blank Template to Include : weather Style : Your Choice Template Content : Paste your Edited Script Save and you should be done. You can get the different codes for locations by going to weather.com and in the main page simply enter in your location, each country has them, for example, Leatherhead in the U.K. = UKXX1275 Darwin Australia = ASXX0032 Hamburg Germany = GMXX0049 Rome Italy = ITXX0067 Here's a screenshot from weather.com showing George Airport, South Africa, SFXX0066 Hopefully this helps. I know it's not the best explination, if you have questions please feel free to ask.... Scratch Download No files for download. Screenshots |
Similar Mods
Weather Block for vBadvanced | vBulletin 3.0 Full Releases |
vB Weather Mk. 2 | vBulletin 2.x Full Releases |
vB Weather: Give your members current weather and forecasts! | vBulletin 2.x Full Releases |