The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
Weather Block for vBadvanced Details »» | |||||||||||||||||||||||||
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 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
|
Comments |
#12
|
||||
|
||||
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 |
#13
|
|||
|
|||
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?
|
#14
|
|||
|
|||
Quote:
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. |
#15
|
||||
|
||||
Quote:
|
#16
|
||||
|
||||
it's useless with anyone outside US or Euroup
|
#17
|
|||
|
|||
Nice job.
Installed. I wasn't using custom2, so I dumped the code into that template, works fine. |
#18
|
|||
|
|||
Then you have 2 options... move to the US or re-write it to your liking.
|
#19
|
||||
|
||||
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 |
#20
|
||||
|
||||
Quote:
|
#21
|
|||
|
|||
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. |
Thread Tools | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|