Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.0 > vBulletin 3.0 Full Releases
FAQ Community Calendar Today's Posts Search

 
 
Thread Tools
Weather Block for vBadvanced Details »»
Weather Block for vBadvanced
Version: 1.00, by WreckRman2 WreckRman2 is offline
Developer Last Online: Jul 2014 Show Printable Version Email this Page

Version: 3.0.0 Rating:
Released: 03-29-2004 Last Update: Never Installs: 10
 
No support by the author.

This is very, very simple addon done in less than 30 minutes. It can be made much better but it's a start. If someone else want to modify it and make it better please feel free to do so!

Step 1: Open your ACP and select "Add New User Profile Field", choose single line text box. Create new field titled "Zip Code".

Step 2: Open "User Profile Field Manager" and look for the Zip Code field number. In my instance it was field 10.

Step 3: Open your "index" template and place the following code where you want the weather conditions box to appear.

Code:
<!-- Weather Block -->

<table align="center" border="0" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" class="tborder" width="100%">
<tr>
<td class="tcat"><span class="smallfont"><b>$vboptions[blockbullet] Weather Conditions</b></span></td>
</tr>
<tr>
<td class="$getbgrow"><span class="smallfont">

<if condition="!$bbuserinfo['userid']">
<span class="smallfont">$vbphrase[a_not_a_member_yet]<br /><a href="$vboptions[bburl]/register.php">$vbphrase[a_register_now]</a> to show weather conditions.</span>
<else />
<if condition="$bbuserinfo[field10] !=''">
<a href="http://www.weatherroom.com/forecast/$bbuserinfo[field10].html"><img src="http://www.weatherroom.com/weather?forecast=zone&hwvtc=black&hwvbg=E1E4F2&pands=$bbuserinfo[field10]&config=png&alt=hwivzone&daysonly=1" alt="Weather for $bbuserinfo[field10] provided by weatherroom.com." border="0"></a>
<else />
<A HREF="$vboptions[bburl]/profile.php?do=editprofile">Add Zip Code</A> to show weather conditions.
</if>
</if>
</span>
</td>
</tr>
</table>
<br/>

<!-- End Weather Block -->
Step 4: IMPORTANT! Change all instances of $bbuserinfo[field10] to whatever your field number is. If it is number 13 change it to $bbuserinfo[field13]. If you forget this step it will not work!

Step 5: Save the changes and enjoy!


If your visitor isn't a member it tells them they must register to show the weather. If they are a member but haven't filled in the Zip Code field it tells the user they must edit their profile to add a zip code. If they have a zip code in their profile it will show a 5 day forecast of the weather in their area.

You can see it live on my site at http://www.rcflying.net

Show Your Support

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

Comments
  #22  
Old 04-02-2004, 02:00 PM
WreckRman2 WreckRman2 is offline
 
Join Date: Dec 2001
Location: Indianapolis, IN
Posts: 158
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by milkmycow
i garuntee your not the first to have thought of or mention the idea.
And that is the only reason I posted it.
Reply With Quote
  #23  
Old 04-15-2004, 06:02 AM
Pro Pro is offline
 
Join Date: Aug 2002
Location: Cali
Posts: 117
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

nice... that was easy! 30 minutes is a little over exaggerated lol more like 10 tops.. and i'm pHp illiterate

nice job... wish there was a way for non u.s. users on my site to be able to use it though...
Reply With Quote
  #24  
Old 05-14-2004, 01:05 AM
paratek's Avatar
paratek paratek is offline
 
Join Date: Feb 2003
Location: New York
Posts: 78
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Works with VBIndex to...nice hack
Reply With Quote
  #25  
Old 05-14-2004, 02:16 PM
Host Visions Host Visions is offline
 
Join Date: Jan 2003
Posts: 8
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

any way to get this to show the current moon phase on vba rather than clicking the link?
Reply With Quote
  #26  
Old 05-28-2004, 12:37 AM
ashley53680 ashley53680 is offline
 
Join Date: Dec 2003
Posts: 124
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Awesome hack!!!
Reply With Quote
  #27  
Old 06-09-2004, 05:45 PM
JTMON's Avatar
JTMON JTMON is offline
 
Join Date: Oct 2001
Posts: 279
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Pro
nice... that was easy! 30 minutes is a little over exaggerated lol more like 10 tops.. and i'm pHp illiterate

nice job... wish there was a way for non u.s. users on my site to be able to use it though...
Over at vbadvanced.com I believe they have a way for this to work with users outside US..
Reply With Quote
  #28  
Old 06-09-2004, 07:56 PM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by JTMON
Over at vbadvanced.com I believe they have a way for this to work with users outside US..
Can you post a link to it, please?
Reply With Quote
  #29  
Old 06-09-2004, 08:18 PM
JTMON's Avatar
JTMON JTMON is offline
 
Join Date: Oct 2001
Posts: 279
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Here's the part with instructions:
1) Go here: http://www.weatherroom.com/cgi-bin/...ass&pass=tafINT
2) Select your country and city
3) Click "display Forecast/Conditions"
4) Top right you will see this "ICAO Used:" followed by a code - Place this code in your zip code field and you will see your local international forecast.

And here's a link to the hack thread:
http://www.vbadvanced.com/forum/showthread.php?t=1012
Reply With Quote
  #30  
Old 06-09-2004, 09:47 PM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by JTMON
Here's the part with instructions:
1) Go here: http://www.weatherroom.com/cgi-bin/...ass&pass=tafINT
2) Select your country and city
3) Click "display Forecast/Conditions"
4) Top right you will see this "ICAO Used:" followed by a code - Place this code in your zip code field and you will see your local international forecast.

And here's a link to the hack thread:
http://www.vbadvanced.com/forum/showthread.php?t=1012
Oh, ok. That was the one I installed. But it doesn't work outside the US, does it?
Reply With Quote
  #31  
Old 06-09-2004, 10:27 PM
JTMON's Avatar
JTMON JTMON is offline
 
Join Date: Oct 2001
Posts: 279
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Boofo
Oh, ok. That was the one I installed. But it doesn't work outside the US, does it?
Not sure as I have no use for outside US, but the instructions you just quoted were what was given as a response to your very question.
Reply With Quote
 


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 09:04 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.04499 seconds
  • Memory Usage 2,305KB
  • Queries Executed 25 (?)
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)bbcode_code
  • (5)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)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