Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.0 > vBulletin 3.0 Full Releases

Reply
 
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
  #12  
Old 04-01-2004, 02:17 AM
Tungsten's Avatar
Tungsten Tungsten is offline
 
Join Date: Jan 2002
Location: Nashville, TN
Posts: 100
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This looks awfully familiar to the tip I posted over on www.vbadvanced.com about how to add the Weatherroom forecast to the portal.

http://www.vbadvanced.com/forum/show...73&postcount=5
Reply With Quote
  #13  
Old 04-01-2004, 02:38 AM
WreckRman2 WreckRman2 is offline
 
Join Date: Dec 2001
Location: Indianapolis, IN
Posts: 158
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I've never seen your "tip" until you just posted it and while they may look similar one has to ask how much different can a super simple thing like this be. Besides yours just shows one default city... mines allows the members to add their own zip code to show each members own city. I go to your website and see the weather for Nashville. What good does that do me if I line in Indianapolis?
Reply With Quote
  #14  
Old 04-01-2004, 02:47 AM
WreckRman2 WreckRman2 is offline
 
Join Date: Dec 2001
Location: Indianapolis, IN
Posts: 158
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by joeychgo
Nice hack ---- Very nice -- BUT

2 problems......

1. What do we do with non-us members;

2. When there isnt a zip code, and someone clicks on the box where it says "Add Zip Code to show weather conditions." an error page comes up saying page not found. SO its not directing to the profile page. The reaso for this is in the code -- some people do not have the software installed in a 'forums' directory - so you should instruct people to change this to suit their setup.
1. Feel free to modify it to suit your needs. There are many ways you get get the data. I simply used the zip code because I'd been using that for some time and most of my members are from the US.


2. I changed the code to $vboptions[bburl] instead of forums.


Remember guys I wrote this for my own use and the only reason I posted it here was to share it with anyone who wanted to modify it for their use. I'm not going to add to it but feel free to modify what I have already and forget this Simpons guy who thinks I stole his code.
Reply With Quote
  #15  
Old 04-01-2004, 02:57 AM
SVTBlackLight01's Avatar
SVTBlackLight01 SVTBlackLight01 is offline
 
Join Date: Jan 2003
Location: Texas
Posts: 504
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by IndyWebDesign
... and while they may look similar one has to ask how much different can a super simple thing like this be
I agree. It's hardly an original idea, so I don't think anyone can take credit for coming up with it. This is a good example of that idea.
Reply With Quote
  #16  
Old 04-01-2004, 03:31 AM
deathemperor's Avatar
deathemperor deathemperor is offline
 
Join Date: Jul 2003
Location: HOL
Posts: 1,270
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

it's useless with anyone outside US or Euroup
Reply With Quote
  #17  
Old 04-01-2004, 03:48 AM
SVTOA SVTOA is offline
 
Join Date: Oct 2002
Location: In a fishbowl
Posts: 301
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Nice job.

Installed. I wasn't using custom2, so I dumped the code into that template, works fine.
Reply With Quote
  #18  
Old 04-01-2004, 04:36 AM
WreckRman2 WreckRman2 is offline
 
Join Date: Dec 2001
Location: Indianapolis, IN
Posts: 158
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Then you have 2 options... move to the US or re-write it to your liking.
Reply With Quote
  #19  
Old 04-01-2004, 06:01 AM
deathemperor's Avatar
deathemperor deathemperor is offline
 
Join Date: Jul 2003
Location: HOL
Posts: 1,270
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I said it's useless meant that I've tried to rewrite it but there's no chance to make it like weather conditions for US
except there're some more sites for Asian weather conditions ( display similarly with US-EU's weather conditons )
move to US, no
Reply With Quote
  #20  
Old 04-01-2004, 01:57 PM
Tungsten's Avatar
Tungsten Tungsten is offline
 
Join Date: Jan 2002
Location: Nashville, TN
Posts: 100
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by IndyWebDesign
I'm not going to add to it but feel free to modify what I have already and forget this Simpons guy who thinks I stole his code.
I never said you stole any code... I said it looked suspiciously familiar to the reference I made on the vBadvanced support site.
Reply With Quote
  #21  
Old 04-02-2004, 01:56 PM
milkmycow milkmycow is offline
 
Join Date: Mar 2002
Location: dallas
Posts: 81
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

go cry about it?

if u had such a great idea, you should have released it. i garuntee your not the first to have thought of or mention the idea.
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:30 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.08619 seconds
  • Memory Usage 2,303KB
  • 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
  • (3)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