The Arcive of vBulletin Modifications Site. |
|
Display Member Weather Details »»
|
|||||||||||||||||||||||||
This is the first time I have done anything like this but it will allow you to display your members local weather using weather.com.
First you need to create a new profile field that is a single-line text box called Zip Code. It can remain a private or public field, whatever you would like. Make note of the field number. Then, go to http://www.weather.com/services/oap/...r-widgets.html and choose from the two variations and put in just anything for a location, then select get code. You will be given something like this: <script type="text/javascript" src="http://voap.weather.com/weather/oap/04758?template=GENXV&par=3000000007&unit=0&key=twciweat herwidget"></script></div> You need to replace the zip code with this, $bbuserinfo[fieldXX] Make sure to change the XX to the field number. Then go into your templates and place the following code anywhere you want the weather to be displayed. <if condition="$bbuserinfo['fieldXX']"> <script type="text/javascript" src="http://voap.weather.com/weather/oap/$bbuserinfo[fieldXX]?template=GENXV&par=3000000007&unit=0&key=twciweat herwidget"></script></div></if> Again, don't forget to change both of the red parts to match the field number. Hope people find this of use, be kind as this is the first time I've done this ![]() Here is a screenshot! ![]() Show Your Support
|
|||||||||||||||||||||||||
| Comments |
|
#2
|
||||
|
||||
|
any screen shot?
|
|
#3
|
|||
|
|||
|
Thanks for reminding me, just added it!
|
|
#4
|
||||
|
||||
|
nice idea and i did exactly what you wrote but nothing is showing.my field # is ok too.any idea
ok i got it for some reason when i put this <if condition="$post['fieldXX']"> in the begining then it doesn't show,when i remove this then its ok? |
|
#5
|
|||
|
|||
|
I see what I did, change
<if condition="$post['fieldXX']"> to <if condition="$bbuserinfo['fieldXX']"> Updated original code. |
|
#6
|
||||
|
||||
|
all right kool its working now thnx. one thing i wanna ask how about like if i wanna put a place from asia where zip code is not common.in otherwords when i try to put just city name it shows error saying invalid location code.is there a way to over come that so user can just put their city name to get weather.thnx
|
|
#7
|
||||
|
||||
|
all right kool its working now thnx. one thing i wanna ask how about like if i wanna put a place from asia where zip code is not common.in otherwords when i try to put just city name it shows error saying invalid location code.is there a way to over come that so user can just put their city name to get weather.thnx
|
|
#8
|
|||
|
|||
|
Not working for me either.
|
|
#9
|
|||
|
|||
|
You would need to go to weather.com and put in your location. The link will show something like this..
http://www.weather.com/outlook/trave...raveler/local/FRXX0076?lswe=Europe&from=searchbox_localwx They would enter the code right before the question mark, the part in red. |
|
#10
|
|||
|
|||
|
What isn't working?
|
![]() |
|
|