View Full Version : Vbadvanced - Weather Channel Module
boo.3
05-18-2005, 10:00 PM
thanks to dsboyce8624 to fixing this code
This code is based around cLord's weather module
All i did was some simple changes to his code and added the weather channels code
What Does It do?
This gives users a field to add the ZIP CODE once added they will see there local weather on your main Vba
1. In your Admincp - User Profile Fields - Goto "Add New User Profile Field" - Choose single line text box - Create new field titled "Zip Code".
2. Admincp - User Profile Fields - Click "User Profile Field Manager" and look for the Zip Code field number - In my forums its 6.
3. Admin CP - Styles & Templates - Style Manager - Add a new template called "adv_portal_weather".
Now put this code into the template:
<table align="center" border="0" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" class="tborder" width="100%">
<tr>
<td class="tcat"><span class="smallfont"><b>$vba_options[portal_blockbullet] Weather Conditions</b></span></td>
</tr>
<tr>
<td class="$getbgrow"><span class="smallfont">
<if condition="!$bbuserinfo['userid']">
<span class="smallfont">Registered members can see their local weather forcast here.<br /><br /><phrase
1="$vboptions[bburl]">$vbphrase[not_a_member_yet_register_now]</phrase></span>
<else />
<if condition="$bbuserinfo[field5] !=''">
<script src='http://voap.weather.com/weather/oap/$bbuserinfo[field5]?template=GENXV&par=null&unit=0&key=05afc55b05db4d084c1497353310d74b' alt="Weather for $bbuserinfo[field66] provided by that-sucks.net." border="0"></a></script>
<else />Add your <A HREF="$vboptions[bburl]/profile.php?do=editprofile">Zip Code</A> to show weather forcast.
</if>
</if>
</span>
</td>
</tr>
</table>
<br/>
MAKE SURE YOU CHANGE THE $bbuserinfo[field6] TO YOUR FIELD #... say yours is 4 it would be like this $bbuserinfo[field4]
Now Last Step
4. Admincp - vBa CMPS - Add Module
Module Title - Weather
Module Identifier - keep blank
OR Template to Include - weather
Activate - yes
Select the column *Right or Left*
DONE
Cyricx
05-19-2005, 05:58 PM
Will this work for overseas as well? or just US members?
boo.3
05-19-2005, 07:03 PM
You can look at overseas forcast, but for the zipcode i'm not sure.
Give it a try and tell me how it goes?
boo
KevinL
05-19-2005, 09:07 PM
ok I installed this and Ive been wanting someone to write this up I couldnt get it to work correctly.
I have one problem now though, my quicklinks doesnt work it just reloads the page. When I shut it off the quicklinks works fine.
Any suggestions?
boo.3
05-19-2005, 09:41 PM
what do you mean by quick links?
the navbar?
dsboyce8624
05-19-2005, 09:44 PM
The idea is nice, and I used it, but you should tell people that it's attached to your site and that they should register for thier own on http://www.weather.com I also removed the ads.
Great idea though.
Dennis
PS - Since you have some problems (the script seems to be in twice or something.) Here is my template code
<table align="center" border="0" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" class="tborder" width="100%">
<tr>
<td class="tcat"><span class="smallfont"><b>$vba_options[portal_blockbullet] Weather Conditions</b></span></td>
</tr>
<tr>
<td class="$getbgrow"><span class="smallfont">
<if condition="!$bbuserinfo['userid']">
<span class="smallfont">Registered members can see their local weather forcast here.<br /><br /><phrase
1="$vboptions[bburl]">$vbphrase[not_a_member_yet_register_now]</phrase></span>
<else />
<if condition="$bbuserinfo[field5] !=''">
<script src='http://voap.weather.com/weather/oap/$bbuserinfo[field5]?template=GENXV&par=null&unit=0&key=05afc55b05db4d084c1497353310d74b' alt="Weather for $bbuserinfo[field66] provided by that-sucks.net." border="0"></a></script>
<else />
<A HREF="$vboptions[bburl]/profile.php?do=editprofile">Add Zip Code</A> to show weather forcast.
</if>
</if>
</span>
</td>
</tr>
</table>
<br/>
boo.3
05-19-2005, 09:45 PM
its fine with me if they run it off my account...
btw how did you remove adds?
would you like to help in fixing some of these problems?
ok updates are being made read top of post
dsboyce8624
05-19-2005, 09:50 PM
its fine with me if they run it off my account...
btw how did you remove adds?
would you like to help in fixing some of these problems?
ok updates are being made read top of post
I removed the top script statement you had in there.
Then replaced your script (the second one) with the one weather.com gave me. I edited it with the changes you made (the user zip field and so forth) and saved.
KevinL
05-19-2005, 09:51 PM
what do you mean by quick links?
the navbar?
Yeah in the navbar..well mine is in the header.
If I enable this and I click on that button it reloads the page. When I shut it off everything works fine again.
I have no idea why that would happen.
**edit** I also have people from overseas, is there a way to get this to work for them?
boo.3
05-19-2005, 09:52 PM
ok i tryed your code and it didn't work for me it said i needed to enter zipcode?
did you get that error
boo.3
05-19-2005, 09:53 PM
Yeah in the navbar..well mine is in the header.
If I enable this and I click on that button it reloads the page. When I shut it off everything works fine again.
I have no idea why that would happen.
thats odd... would anyone know why this is happening?
dsboyce8624
05-19-2005, 09:54 PM
ok i tryed your code and it didn't work for me it said i needed to enter zipcode?
did you get that error
Mine? You prolly have to change it back to field6.
EDIT: Now I have to find a way to force it to be a smidge smaller.
dsboyce8624
05-19-2005, 09:55 PM
thats odd... would anyone know why this is happening?
No idea, unless there something else already wrong with the navbar.
This hack went nowhere near it.
boo.3
05-19-2005, 09:56 PM
haha my bad i didn't add field6
let me check 1 sec
edit: An error has occurred.
Invalid location code provided.
Please notify the webmaster.
i get that now after changing field
KevinL
05-19-2005, 09:57 PM
thats odd... would anyone know why this is happening?
ok for some reason that new code fixed that problem! :)
Thanks!
dsboyce8624
05-19-2005, 10:01 PM
haha my bad i didn't add field6
let me check 1 sec
edit: An error has occurred.
Invalid location code provided.
Please notify the webmaster.
i get that now after changing field
I got that before I edited mine, make sure you get all instances.
dsboyce8624
05-19-2005, 10:03 PM
ok for some reason that new code fixed that problem! :)
Thanks!
Damn I'm good!
I have no idea what I'm doing either.
:banana:
boo.3
05-19-2005, 10:06 PM
I got that before I edited mine, make sure you get all instances.
everythings right still get error * lol giving me support for my hack *
dsboyce8624
05-19-2005, 10:08 PM
everythings right still get error * lol giving me support for my hack *
I cleaned it up some more. Try this new version. Make sure you edit all of the field5's.
<table align="center" border="0" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" class="tborder" width="100%">
<tr>
<td class="tcat"><span class="smallfont"><b>$vba_options[portal_blockbullet] Weather Conditions</b></span></td>
</tr>
<tr>
<td class="$getbgrow"><span class="smallfont">
<if condition="!$bbuserinfo['userid']">
<span class="smallfont">Registered members can see their local weather forcast here.<br /><br /><phrase
1="$vboptions[bburl]">$vbphrase[not_a_member_yet_register_now]</phrase></span>
<else />
<if condition="$bbuserinfo[field5] !=''">
<script src='http://voap.weather.com/weather/oap/$bbuserinfo[field5]?template=GENXV&par=null&unit=0&key=05afc55b05db4d084c1497353310d74b' alt="Weather for $bbuserinfo[field66] provided by that-sucks.net." border="0"></a></script>
<else />Add your <A HREF="$vboptions[bburl]/profile.php?do=editprofile">Zip Code</A> to show weather forcast.
</if>
</if>
</span>
</td>
</tr>
</table>
<br/>
EDIT: Don't worry, I'm happy to finally be able to help somebody.
boo.3
05-19-2005, 10:11 PM
ty i'll give that a shot
if this works mind if i upload it to main post?
boo.3
05-19-2005, 10:12 PM
ahh awesome it works
care if i upload it?
dsboyce8624
05-19-2005, 10:20 PM
ahh awesome it works
care if i upload it?
Go for it.
Might want to remove the note too.
And change the attached file.
One more thing, works fine in either column.
LOL
boo.3
05-19-2005, 10:59 PM
ok updated
dsboyce8624
05-19-2005, 10:59 PM
ok updated
Congratulations!
boo.3
05-19-2005, 11:10 PM
thanks for the help man
KevinL
05-19-2005, 11:14 PM
Ok to get it working for overseas people go to www.weather.com or to http://uk.weather.com/ and look up your post code.
To test it go to http://uk.weather.com/ and look up Manchester, United Kingdom. Now look at the address in the bar it should say http://uk.weather.com/weather/local...92?from=popular use the UKXX0092 as the zip code this should make it work fine. :)
Thanks for writing this again guys great work! :)
boo.3
05-19-2005, 11:46 PM
nice hint there ^^
and np
Gemma
05-20-2005, 10:29 AM
This works great wit overseas weather forecasts.
Thanks alot :)
Grimsbody
05-25-2005, 05:05 PM
Admincp - vBa CMPS - Add Module
Is this related to another hack or am I just flustered by the abbr.? Needless to say I'm stalled on step 4. :(
KevinL
05-25-2005, 05:13 PM
Is this related to another hack or am I just flustered by the abbr.? Needless to say I'm stalled on step 4. :(
Kinda you need vBadvanced CMPS http://www.vbadvanced.com/products.php?do=productinfo&p=4 in order to use this.
vnpower
05-25-2005, 06:31 PM
Will this work for overseas as well? or just US members?
Yes, US members. :p
I thing so!
vnpower
05-25-2005, 06:48 PM
Yes, US members. :p
I thing so!
Installed works nicely when loged in, but this is the url I get when unregistered: http://www.myforums.com/home/%1$s/register.php
It should be myforums.com/forums/register.php
Anyway to fix this??
:Judge:
05-26-2005, 03:47 AM
To show thanks I went ahead and got the style codes for more options. I didn't care for the default look and wanted something to fit in the center a little better.
Horizontal, best for center blocks
Ticket Holder = EVNTH
Wild Flowers = LAWNH
Winter Blues = COLDH
Green Paint = HOMEH
Golfers Sunrise = GOLFH
Grass Fields = ALERH
Sunday Drive = DRIVH
The Weather Channel = GENXH
Outdoor Enthusiast = OTDRH
In Flight = TRVLH
Vertical, best for side blocks
Ticket Holder = EVNTV
Wild Flowers = LAWNV
Winter Blues = COLDV
Green Paint = HOMEV
Golfers Sunrise = GOLFV
Grass Fields = ALERV
Sunday Drive = DRIVV
The Weather Channel = GENXV
Outdoor Enthusiast = OTDRV
In Flight = TRVLV
Change style in this line of code.
<script src='http://voap.weather.com/weather/oap/$bbuserinfo[field5]?template=PLACE 5 DIGIT CODE HERE
If this could be made better to understand or added to the first post as options just thought I would say feel free to ;)
Also here is a photo of styles.
Installed works nicely when loged in, but this is the url I get when unregistered: http://www.myforums.com/home/%1$s/register.php
It should be myforums.com/forums/register.php
Anyway to fix this??
Is there any support for this hack anymore?
Brandon Sheley
05-30-2005, 09:32 PM
can try vbadvanced.com ;)
Tried, no help either. I fixed it though.
dsboyce8624
06-01-2005, 01:56 PM
I did post something for you over there, and I'm pretty sure you got it fixed.
Even though this isn't really my hack.
Boo is on a trip for a week or so.
beansbaxter
06-25-2005, 02:54 PM
doesnt work:
An error has occurred.
Invalid location code provided.
Please notify the webmaster.
dsboyce8624
06-25-2005, 07:15 PM
doesnt work:
An error has occurred.
Invalid location code provided.
Please notify the webmaster.
Bad zip code.
mofeu
11-23-2007, 10:30 AM
How does someone get this in celcius instead of farrenhiet
Thanks in Advance :)
movslow
09-11-2008, 05:33 PM
Is there something for the latest update?
TOMC28
11-08-2008, 02:38 PM
I LOVE THIS MOD!
Can anyone advise if there are any other similar WEATHER hacks/mods!!!! For the recent upgraded vbulletin!
THANKS!
TOMC28
11-08-2008, 02:49 PM
found it! thanks!
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.