Go Back   vb.org Archive > vBulletin Modifications > vBulletin 3.8 Modifications > vBulletin 3.8 Template Modifications

Reply
 
Thread Tools
Display Member Weather Details »»
Display Member Weather
Version: 1.00, by AWMGolfer AWMGolfer is offline
Developer Last Online: Mar 2013 Show Printable Version Email this Page

Category: Miscellaneous Hacks - Version: 3.8.4 Rating:
Released: 09-24-2009 Last Update: Never Installs: 10
Template Edits
Re-useable Code Translations  
No support by the author.

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

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #2  
Old 09-27-2009, 10:25 AM
blackberry's Avatar
blackberry blackberry is offline
 
Join Date: Feb 2008
Posts: 382
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

any screen shot?
Reply With Quote
  #3  
Old 09-27-2009, 11:48 AM
AWMGolfer AWMGolfer is offline
 
Join Date: Dec 2007
Posts: 120
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks for reminding me, just added it!
Reply With Quote
  #4  
Old 09-27-2009, 12:36 PM
apiasto's Avatar
apiasto apiasto is offline
 
Join Date: Oct 2006
Posts: 348
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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?
Reply With Quote
  #5  
Old 09-27-2009, 01:11 PM
AWMGolfer AWMGolfer is offline
 
Join Date: Dec 2007
Posts: 120
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I see what I did, change

<if condition="$post['fieldXX']">

to

<if condition="$bbuserinfo['fieldXX']">

Updated original code.
Reply With Quote
  #6  
Old 09-27-2009, 01:20 PM
apiasto's Avatar
apiasto apiasto is offline
 
Join Date: Oct 2006
Posts: 348
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #7  
Old 09-27-2009, 01:29 PM
apiasto's Avatar
apiasto apiasto is offline
 
Join Date: Oct 2006
Posts: 348
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #8  
Old 09-27-2009, 01:30 PM
BigDog56 BigDog56 is offline
 
Join Date: Jan 2007
Posts: 430
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Not working for me either.
Reply With Quote
  #9  
Old 09-27-2009, 01:31 PM
AWMGolfer AWMGolfer is offline
 
Join Date: Dec 2007
Posts: 120
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #10  
Old 09-27-2009, 01:32 PM
AWMGolfer AWMGolfer is offline
 
Join Date: Dec 2007
Posts: 120
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

What isn't working?
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 11:07 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04194 seconds
  • Memory Usage 2,300KB
  • Queries Executed 24 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete