![]() |
Weather Block Works Internationally Not Just USA
1 Attachment(s)
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:
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 |
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
|
Your Welcome,
:D |
<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. |
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. |
Quote:
Quote:
Quote:
|
All times are GMT. The time now is 03:52 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|