View Full Version : [Module] Weather Channel Module
pennylessz28
10-08-2005, 12:32 AM
How to add a simple weather channel script to your website.
Set one, go to https://registration.weather.com/registration/wxmagnet/step2
Fill out the info, select your version and hit the next button.
It will give you some code that looks like this
<script src='http://voap.weather.com/weather/oap/YOURZIPCODE?template=DRIVV&par=null&unit=0&key=3dc6c226f523c9e82075f7b42caca1b1'></script>
This is important, you are going to need it next.
Step One: Go to your vBa CMPS in you ACP
Step Two: Click Add Module > Select Template Module
Module Title: Weather
Template to Include: weather
Template Content: << ENTER THE FOLLOWING>>
<tr>
<td class="$bgclass">
<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[field6] !=''">
Place your html snippet from above here. You will need to replace YOUR ZIP CODE WITH $bbuserinfo[field6]
<else />Add your <A HREF="$vboptions[bburl]/profile.php?do=editprofile">Zip Code</A> to show weather forcast.
</if>
</if>
</span>
</td>
</tr>
Pay attention to the above highlighted in red. You need to insert your html snippet from The Weather channel in that spot replacing your zip code with $bbuserinfo[field6]
Now where it says field6 you will need to create a new profile field. I am going to assume you know how to do this. Do that, and if the field number is 6 or 22 you'd enter it like so.
EXAMPLE: <script src='http://voap.weather.com/weather/oap/$bbuserinfo[field6]?template=DRIVV&par=null&unit=0&key=3dc6c226f523c9e82075f7b42caca1b1'></script>
Hit save and you're now done.
ConqSoft
10-08-2005, 01:00 AM
Why not export it as a .module and attach it for easier adding?
MotoUp
10-08-2005, 01:15 AM
My question is, does each person on the forum have to be a member of weather.com?
Judge Ruckus
10-08-2005, 02:33 AM
My question is, does each person on the forum have to be a member of weather.com?
No they do not all they have to do is add thier Zip code in thier User profile.
pennylessz28
10-08-2005, 04:20 AM
Why not export it as a .module and attach it for easier adding?
Help newbies get used to adding modules manually will enable them to do so on their own in the future when they want to create a module. :p
pennylessz28
10-08-2005, 04:07 PM
Here is the module for fast intergration. You will still need to change the profilefiled information to match yours
hendri
10-20-2005, 09:26 PM
cool man !
cbr929rrerion
10-23-2005, 03:57 AM
Question..
Can you set a default zipcode so it will display local weather to no reigested users or any previous users that do not have a zipcode listed?
cbr929rrerion
10-27-2005, 12:09 AM
ok.. next question..
to the code wizards.. how can I resize it.. I want it smaller..
Judge Ruckus
10-28-2005, 11:01 AM
ok.. next question..
to the code wizards.. how can I resize it.. I want it smaller..
Nope, the boxs are templates from Weather.com and they just have the two sizes.
For my site I use the widest block in the center, for me that looks the best.
pennylessz28
10-28-2005, 12:45 PM
Question..
Can you set a default zipcode so it will display local weather to no reigested users or any previous users that do not have a zipcode listed?
Could be done with an if statement for the profile field.
So I set it up per instructions created the zip code field it displays but despite a zip code being in the field it does not update. Any ideas?
Kyderoy
11-06-2005, 03:53 PM
Mine is not showing up at all
ashokforums
11-08-2005, 08:45 AM
Can someone help me?? I am from india.. Zip codes from India doesnt work.. If i enter city name in the Zip code field also it doesnt work.. Please help me guys..
Thanks in advance
ciocsy
11-10-2005, 10:38 AM
how can i make the module to fit into the sizes of the other modules?
To get that to work all I'm supposed to do is
rename that weather.module to weather.php and drop it in my /forums/modules directory right?
Then add a new module from a php file and give it a title? Right?
I tried that and it put it to the left of my logo and was all out of whack. Showed a bunch of code and errors. I made sure the user profile field was correct before I uploaded the file..
Any help is appreciated..
Thanks
Can anyone confirm that what I'm doing is right??
Flow Fusion
12-02-2005, 12:12 PM
The registration took forever but great hack. Thanks.
Sooner95
12-08-2005, 05:11 PM
worked like a champ. My first one, thx!
beansbaxter
12-11-2005, 06:21 PM
Is there anyway to make this work for International members??
ashokforums
12-16-2005, 01:15 PM
Yeh please.. For international members.. someone help me
john09
12-17-2005, 08:18 AM
This is what I posted on my forum:
Weather module on home page:
To add your city code, go to User CP> Edit Options and scroll down. (deep down and dirty)
To find the code, go to www.weather.com (http://www.weather.com) and enter your city. If you enter London, you will be redirected to this URL: http://www.weather.com/outlook/travel/businesstraveler/local/UKXX0085?from=search_city
UKXX0085 is London's code on Weather channel, so that's what you need to enter in the "Edit options" last field.
Ozzie
01-01-2006, 10:05 AM
This is a nice module so thanks to pennylessz28. I had some trouble getting it to work until I figured out that I had to create a Zip Code field in the User Profile then change the field number in adv_portal_weather to match the new Zip Code field number.
If anyone else is having this trouble, these are the steps I followed.
1. Upload the module thru the vBa CMPS admincp.
2. Make sure it's set as Enabled under Edit Pages in vBa CMPS admincp and is showing on your homepage.
3. If you don't have a Zip Code field already in your User Profile go to Admincp -> User Profile Fields -> Add New User Profile Field -> Add Single-Line Text Box -> edit the Title, etc., however you like -> Save.
4. Now go Admincp -> User Profile Field Manager and see what field number is showing under the Name column.
5. Admincp -> Styles & Templates -> Style Manager -> click <<>> to expand the templates.
6. Edit your adv_portal_weather template. Find the two places where it shows field6 and change that number to whatever field name you saw in step 4. Save your edits and your done.
:D
ga2000gt
01-01-2006, 02:19 PM
I have it on my home page, but when I click to add my zip code, takes me to my edit profile page. I already have my zip in there but it doesn't show the weather info. Any suggestions?
Ozzie
01-01-2006, 07:53 PM
Take a look at step 4 above.
Find out what the field name is for your Zip Code field. Then open the adv_portal_weather template and look for <if condition="$bbuserinfo[field6] !=''">
<script src='http://voap.weather.com/weather/oap/$bbuserinfo[field6]?template=DRIVV&par=null&unit=0&key=3dc6c226f523c9e82075f7b42caca1b1'></script>
and change the field number to match the number of your Zip field.
c0rrupt
01-15-2006, 04:05 AM
?template=DRIVV&par=null
What other templates does weather.com offer other than "DRIVV"?
SIINSI
01-15-2006, 05:14 PM
Nice Thanks. Works Great!
Miguel
Lance Carbuncle
01-16-2006, 02:31 PM
Hello Everyone,
I have just had vbadvanced running for a week now and am trying to learn how to add and modify modules with my limited knowledge. I managed to get a weather channel module running... A simple version, as My website is relevant to a single location and I only want to display the weather in this place and not integrate it with user fields or anything.
Problem is that when I look at the module in the cmps, the colors are all wrong and you can't read anything.... like the module is transparent and the background shows through..... really strange.
you can see it on my page here: http://www.forums.repashy.com/cmps_index.php
I uploadeded the same code to my html page and it is here:
http://www.repashy.com/weatherchannelmodule.htm
I tried different styles of the module, but get the same result :(
Here is the code I have in the template:
Can someone please give me a point in the right direction?
Sincerely, Allen
<tr>
<td class="$bgclass">
<span class="smallfont">
<script src='http://voap.weather.com/weather/oap/NCXX0006?template=GENXV&par=1016660530&unit=0&key=2665d386fc06439410770e1e77fd6337'></script>
</span>
</td>
</tr>
Belicoso_Fino
01-22-2006, 03:11 PM
Installed!
Nice!
Startinfresh
01-22-2006, 10:42 PM
I can't get it to work either. It tells me....An error has occurred.
Invalid location code provided.
Please notify the webmaster.
Startinfresh
01-22-2006, 10:56 PM
I got it. Thanks, great hack
Mikecp421
01-28-2006, 01:51 PM
got it too, would like to resize it too if someone could figure that out.
hdcolumbus
02-05-2006, 06:09 PM
Installed. Great mod!
JAYEMULE
02-05-2006, 08:30 PM
I followed all instructions but can not get this module to display. I have looked over the code I inserted and it is correct, I added the new user profile and everything 'should' work but doesn't. Where are some places I could look to troubleshoot this and hopefully correct the error. Thanks in advance. This would be very handy to have in my forum.
Jaye
QuanVo
02-05-2006, 09:51 PM
Darn it, great feature but I can't use on my site, because I have an adult content site. I don't know if I can use this because I don't charge anything to end-users.
Anyway, I wil look forward to it if it can provide Internation Weather.
Binder
02-16-2006, 12:13 AM
I tried to follow along but This is all I get
this what I have
<tr>
<td class="$bgclass">
<div center><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[field4] !=''">
<script src='http://voap.weather.com/weather/oap/$bbuserinfo[field4]?template=DRIVV&par=null&unit=0&key=3dc6c226f523c9e82075f7b42caca1b1'></script>
<else />Add your <A HREF="$vboptions[bburl]/profile.php?do=editprofile">Zip Code</A> to show weather forcast.
</if>
</if>
</span></div>
</td>
</tr>
sinisterpain
02-16-2006, 07:45 PM
Make sure that you go to ACP/CMPS/edit pages go to home page and make sure you check the module for weather then save
Binder
02-18-2006, 07:10 AM
thanks,I checked it - It was checked
no difference
G_Man
02-23-2006, 10:33 PM
Woot!!!
Love it!!!
And I went ahead and added a Module just for the learning experience. Even that was helpful! :D:D:D
Thank You.
ComputerVitals
04-12-2006, 11:21 PM
Very nice module. works great.
johnstires
10-19-2006, 08:30 PM
Works great in 3.6
Anyone have a suggestion on how to get it to display better in Firefox? I have a fixed width.
ComputerVitals
10-20-2006, 02:38 AM
I run mine in FF and it looks the same as it does in IE.
johnstires
10-22-2006, 01:43 AM
I run mine in FF and it looks the same as it does in IE.
This is how mine looks. I have a 900px wide site with the modules set to 200px.
This is how mine looks. I have a 900px wide site with the modules set to 200px.
Did you change the entire column width or how did you change a module width size? TIA
angkor408
11-03-2006, 10:31 PM
I just download this module " weather.module" I can't see the block on the left side. I check is active. Anything els I have to configure?
johnstires
11-04-2006, 03:43 PM
Does anyone know why this would suddenly stop working in Firefox? I did not change anything. It just stopped showing up? WOrks in IE still
transitbus
11-07-2006, 01:49 PM
anyone having the issue where when loading the page the weather channel info breaks the confines of the module? It only happens occasionally but it iwll draw and stretch like 100 pixels or so too far to the right. refreshing the page fixes it
bassnutz
11-12-2006, 08:04 PM
Worked like a charm. Thanks you very much for this easy module!!
yonglvnv
12-08-2006, 03:10 PM
Great module! Thanks. I added a "if" statement to display a set location for unregistered users rather than displaying blank module with "register now" statement.
runhog
01-06-2007, 11:48 PM
My first Module added and it is great...thanks
vBulletin® v3.7.2, Copyright ©2000-2008, Jelsoft Enterprises Ltd.