View Full Version : Weather Channel - Weather Module
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
Judge Ruckus
05-19-2005, 04:53 PM
Okay I have a problem here.
Works like it should and I have to say that I really like this, however, once logged in I loose other blocks. If I have the weather on the left at the top or number 0 once logged in I loose all my blocks below it.
If I place the box at the bottom of the left side I loose all my center and right blocks.
whats up with that?
www.planetquintessa.com
hmmm thats odd try putting it on the right side... thats where mine is...
i'll have to look at it ...
edit: yeah put it on the right side and that should fix the problem
Judge Ruckus
05-19-2005, 05:04 PM
hmmm thats odd try putting it on the right side... thats where mine is...
i'll have to look at it ...
Works a bit better on the right but I have no footer.
I did update my 1st post with my site URL if you want to peep it out.
i just noticed that i have no footer also lol
let me go tru the code real quick
ok i'm still looking and can't seem to find the prob :(
Judge Ruckus
05-19-2005, 05:34 PM
ok i'm still looking and can't seem to find the prob :(
That's cool I am chillin on it for now, gives me a chance to just nod my head to some music ;)
If it helps from what I can see it only does it once logged in.
yeah it seems the image is to big but its got like a border around it and i can't fig out why :(
camoman
05-20-2005, 04:57 PM
Anyway to get this to work for Canadian cities?
Kyderoy
05-20-2005, 05:08 PM
Sorry but I fixed it...
PixelFX
05-20-2005, 05:31 PM
how stable is the weather hack it's self on vb3.0.7?
Judge Ruckus
05-21-2005, 12:43 AM
Thank you boo and thank you dsboyce8624!
Everything is tip top now, wonderful mod here.
I have this mod installed on my site and it is 3.0.7. Had an issue at first something small enough to over look but it is fixed now and works well.
how stable is the weather hack it's self on vb3.0.7?
yes, works fine
Anyway to get this to work for Canadian cities?
um not sure here is a post for overseas might work the same
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!
Judge Ruckus
05-22-2005, 12:35 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.
pioneer
05-26-2005, 11:25 PM
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??
pioneer
05-29-2005, 03:05 PM
Anyone?
dsboyce8624
05-30-2005, 09:54 PM
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??
If you look at the code:
<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 />
You can see it's using a phrase and a variable. I would assume that in your settings you have the forums path wrong somewhere.
I don't remember where anything is, I always have to hunt for it.
But you should fix that anyway.
Dennis
pioneer
05-31-2005, 07:17 PM
The thing is that I don't know where to look for it and how to fix it. Need assistance.
pioneer
05-31-2005, 07:30 PM
Nevermind...Got it.
Stryker412
06-21-2005, 12:05 PM
Will this work with CMPS 2?
Will this work with CMPS 2?
Yes, I have it working with 2 and 3.5 beta 4.
Scooterpig
07-23-2005, 01:46 AM
Is it possible to use this with a different Weather URL instead of TWC one as that one doesn't have my town in it, yet http://wwwa.accuweather.com does and if so how would I change it to have the town/city name to use instead of zip/post code please?
Thank you..:)
Scooterpig
07-25-2005, 08:09 AM
Anyone?????
Also how would I get it to show Metric and not imperial?
midnite
08-03-2005, 07:35 PM
I get this installed and I have added my zip code to my profile but the block still asks for my zip code every time I log in nad access my portal ??? any help anyone or why this is still asking for my zip even tho I have entered it and its there ???
PLEASE ???
Midnite
alyster4k
08-04-2005, 06:30 PM
Looking for a reason why I can use the block as a center block. If I move it to the left side or center it does a hard break and all the blocks after the weather block are on down the page. Anyone?
alyster4k
08-04-2005, 06:54 PM
edit - Removed < table > references and it fixed itself :)
Now I can just figure out the forecast display...
Dorign
08-14-2005, 06:03 PM
Is there a way to resize this? It's too wide for my side blocks, makes the tables ugly.
colejo
08-31-2005, 01:50 AM
I got it installed. Thanks. It looks pretty cool. Oh and nothing big but forecast is spelled as forcast in the code for the template.
alex4473
09-12-2005, 12:17 PM
Thanks. Great weather module. Easy to install, and here's how it looks:
Duffer's World (http://www.duffersworld.com)
Sezmar
09-24-2005, 01:24 PM
How does someone get this to show in celcius instead of farrenhiet
vBulletin® v3.7.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.