The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
Weather Block Works Internationally Not Just USA Details »» | |||||||||||||||||||||||||||||
Weather Block Works Internationally Not Just USA
Developer Last Online: Aug 2016
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 Screenshots
Show Your Support
|
Comments |
#2
|
|||
|
|||
thats great, hoping someone does it as a sideblock, tried the weather code and it doesnt align properly in the blocks, but this works great in cmps so many thanks
|
#3
|
|||
|
|||
Your Welcome,
|
#4
|
|||
|
|||
<a href="https://vborg.vbsupport.ru/showthread.php?t=244605" target="_blank">https://vborg.vbsupport.ru/showthread.php?t=244605</a>
Already made one, and mine doesn't require signing up on the Weather Channel website to do it. |
#5
|
|||
|
|||
Quote:
I do like your Widget setup, however I simply modified mine (for people who do not happen to be in the United States) to use it on their forums and provided clear instructions on how to configure it for where ever on the planet they happen to be. If you would care to expand on your module and include other countries and provide a bit of information on how to get it working in countries other than the U.S. perhaps your comment would be more well received. There are many bit's of code here, and many of them provide similar functionality. |
#6
|
|||
|
|||
Quote:
Quote:
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|