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

Quote:
Originally Posted by princeedward View Post
how about adding this to our profile page....is this possible?
yes it is open memberinfo template scroll down to

<div id="sidebar_container">
<!-- sidebar -->
$template_hook[profile_right_first]
$blocks[stats_mini]
$template_hook[profile_right_mini]
$blocks[friends_mini]
$blocks[albums]
$template_hook[profile_right_album]
$blocks[groups]
$blocks[visitors]
$template_hook[profile_right_last]
--------------------
<!-- / sidebar -->
add the code before <!--/ sidebar -->
Reply With Quote
  #23  
Old 09-28-2009, 12:45 PM
AWMGolfer AWMGolfer is offline
 
Join Date: Dec 2007
Posts: 120
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

BigDog, https://vborg.vbsupport.ru/showpost....07&postcount=9

That will work for any location in the world! I am trying to find an easier way to do it though!
Reply With Quote
  #24  
Old 09-28-2009, 02:32 PM
princeedward's Avatar
princeedward princeedward is offline
 
Join Date: Jan 2007
Location: Deutschland
Posts: 901
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by apiasto View Post
yes it is open memberinfo template scroll down to

<div id="sidebar_container">
<!-- sidebar -->
$template_hook[profile_right_first]
$blocks[stats_mini]
$template_hook[profile_right_mini]
$blocks[friends_mini]
$blocks[albums]
$template_hook[profile_right_album]
$blocks[groups]
$blocks[visitors]
$template_hook[profile_right_last]
--------------------
<!-- / sidebar -->
add the code before <!--/ sidebar -->
thanks apiasto...great :up:
Reply With Quote
  #25  
Old 10-02-2009, 02:55 PM
segwayon segwayon is offline
 
Join Date: Mar 2008
Posts: 152
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Assuming a new zipcode field gets added, how does that field become populated with data?
Reply With Quote
  #26  
Old 10-02-2009, 04:30 PM
AWMGolfer AWMGolfer is offline
 
Join Date: Dec 2007
Posts: 120
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

When the user enters in that information in their profile.
Reply With Quote
  #27  
Old 10-03-2009, 09:26 PM
BigDog56 BigDog56 is offline
 
Join Date: Jan 2007
Posts: 430
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Xhaiden View Post
BigDog, https://vborg.vbsupport.ru/showpost....07&postcount=9

That will work for any location in the world! I am trying to find an easier way to do it though!
Thank you! I have a member from England that can't get it to work. Most likely her end. I'll try and fix it for her.
Reply With Quote
  #28  
Old 10-05-2009, 03:17 PM
AWMGolfer AWMGolfer is offline
 
Join Date: Dec 2007
Posts: 120
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

No problem, just let me know if they can't get it working!
Reply With Quote
  #29  
Old 10-10-2009, 08:04 PM
s-p0k's Avatar
s-p0k s-p0k is offline
 
Join Date: Jun 2009
Location: S1n C1ty
Posts: 199
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

ok i got the code..but now wat.....
Reply With Quote
  #30  
Old 10-11-2009, 03:59 PM
AWMGolfer AWMGolfer is offline
 
Join Date: Dec 2007
Posts: 120
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You need to put it in wherever you want it to be displayed.
Reply With Quote
  #31  
Old 10-27-2009, 12:34 AM
Gav-n-Tn Gav-n-Tn is offline
 
Join Date: Sep 2009
Location: Tennessee
Posts: 120
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I added it into the member's profile. You can also change the style of it by changing the code slightly. Cool and easy.
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 04:11 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.06995 seconds
  • Memory Usage 2,318KB
  • 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