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

Can you be more specific on exactly what you need to put in the profile fields?
Reply With Quote
  #13  
Old 09-27-2009, 01:44 PM
BigDog56 BigDog56 is offline
 
Join Date: Jan 2007
Posts: 430
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

this is what I have
<if condition="$bbuserinfo['field36']">
<script type="text/javascript" src="http://voap.weather.com/weather/oap/$bbuserinfo[field36]
?template=GENXH&par=3000000007&unit=0&key=twciweat herwidget"></script></div></if>
Reply With Quote
  #14  
Old 09-27-2009, 01:44 PM
apiasto's Avatar
apiasto apiasto is offline
 
Join Date: Oct 2006
Posts: 348
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

all you gotta do is put pfofile field id # which you will get after creating one
Reply With Quote
  #15  
Old 09-27-2009, 01:46 PM
BigDog56 BigDog56 is offline
 
Join Date: Jan 2007
Posts: 430
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by apiasto View Post
all you gotta do is put pfofile field id # which you will get after creating one
Done that and it's not showing.
Reply With Quote
  #16  
Old 09-27-2009, 01:49 PM
apiasto's Avatar
apiasto apiasto is offline
 
Join Date: Oct 2006
Posts: 348
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by BigDog56 View Post
this is what I have
<if condition="$bbuserinfo['field36']">
<script type="text/javascript" src="http://voap.weather.com/weather/oap/$bbuserinfo[field36]
?template=GENXH&par=3000000007&unit=0&key=twciweat herwidget"></script></div></if>
it looks ok ,i guess now you have to make entry in the field by going to your cp panel and putting your zip code.it should be available where you saved it in profile field catagory like edit your details

mine is working here
Reply With Quote
  #17  
Old 09-27-2009, 01:54 PM
BigDog56 BigDog56 is offline
 
Join Date: Jan 2007
Posts: 430
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by apiasto View Post
it looks ok ,i guess now you have to make entry in the field by going to your cp panel and putting your zip code.it should be available where you saved it in profile field catagory like edit your details

mine is working here
That got it working. Thank you.
Reply With Quote
  #18  
Old 09-27-2009, 01:58 PM
apiasto's Avatar
apiasto apiasto is offline
 
Join Date: Oct 2006
Posts: 348
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

no problem
Reply With Quote
  #19  
Old 09-27-2009, 02:15 PM
AWMGolfer AWMGolfer is offline
 
Join Date: Dec 2007
Posts: 120
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Glad you got it working BigDog and thanks Apiasto!
Reply With Quote
  #20  
Old 09-28-2009, 06:02 AM
princeedward's Avatar
princeedward princeedward is offline
 
Join Date: Jan 2007
Location: Deutschland
Posts: 901
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

how about adding this to our profile page....is this possible?
Reply With Quote
  #21  
Old 09-28-2009, 08:58 AM
BigDog56 BigDog56 is offline
 
Join Date: Jan 2007
Posts: 430
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Another question. Does this only work for the U.S. and Canadian members?
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 07:45 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
  • Page Generation 0.04435 seconds
  • Memory Usage 2,313KB
  • Queries Executed 26 (?)
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
  • (3)bbcode_quote
  • (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
  • (3)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)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