Register Members List Search Today's Posts Mark Forums Read

Reply
 
Mod Options
Weather Channel widget that uses members zip code Details »»
Weather Channel widget that uses members zip code
Mod Version: 1.00, by benstillman (Coder/Designer) benstillman is offline
Developer Last Online: May 2014 I like it Show Printable Version Email this Page

vB Version: 4.0.x Rating: (4 votes - 5.00 average) Installs: 33
Released: 14 Jun 2010 Last Update: Never Downloads: 0
Not Supported Re-usable Code Translations  

This adds the Weather Channel widget to your CMS, pulling the weather from the user's zip code.


- Create a new style template titled "vbcms_widget_weather".
- Create a new profile field named "zip code". Take note of the profile field number.
- Insert the following into the new template, changing $bbuserinfo[fieldXX] to the correct field number ($bbuserinfo[field8] in my case):

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

- Create a new widget with type "Static HTML".
- Title it "Weather" or whatever else you want.
- Save it.
- Configure the widget to use the "vbcms_widget_weather" template.
- Add the widget to your CMS where ever you like.


You can customize the Weather Channel widget including F/C, background image, etc: http://www.weather.com/services/oap/...r-widgets.html


EDIT: Some users are having a difficult time following my instructions. It makes sense to me, but I guess I'm the only one. Here's Octavius' version of the instructions:

Originally Posted by Octavius. View Post
In that code he posted you will see fieldXX and if you look a little further you'll see field8

Replace both fieldXX and field8 with the profile field number that you created for the zip code.

That's the fist part.

Second part, do what aenable did in his post.

3rd part, Take that whole code and put it inside the new vbcms_widget_weather template

Then create your static html widget and copy that same code into Configure.

If you have more than one forum skin, you'll have to create a vbcms_widget_weather for each template.

For instance, I have 11 skins so I had to make 11 new templates but configure the widget only one time.

Download Now

Only licensed members can download files, Click Here for more information.

Screenshots

Click image for larger version

Name:	weather_widget.JPG
Views:	1450
Size:	51.0 KB
ID:	118446

Show Your Support

  • To receive notifications regarding updates -> Click to Mark as Installed.
  • If you like this modification support the author by donating.
  • This modification may not be copied, reproduced or published elsewhere without author's permission.
Similar Mod
Mod Developer Type Replies Last Post
vB Weather: Give your members current weather and forecasts! JJR512 vBulletin 2.x Full Releases 143 15 Aug 2002 20:12

Comments
  #2  
Old 14 Jun 2010, 17:08
sulasno sulasno is offline
 
Join Date: Feb 2010
is it possible to use another country?
Reply With Quote
  #3  
Old 14 Jun 2010, 20:09
benstillman benstillman is offline
 
Join Date: Jun 2007
Real name: Ben
Originally Posted by sulasno View Post
is it possible to use another country?
Sure is.

For instance, here's Munich:
http://voap.weather.com/weather/oap/...iweatherwidget

Instead of a zip code, you need to go to www.weather.com and search for your city/country. It will return a URL like:
http://www.weather.com/weather/today/Munich+Germany+GMXX0087?x=0&y=0

GMXX0087 is the code you need to put in your user profile field which this widget is referencing. Probably not the easiest way to do this, but it works.

If you have a specific country in mind, I can see what I can do.
__________________
Reply With Quote
  #4  
Old 15 Jun 2010, 04:45
sulasno sulasno is offline
 
Join Date: Feb 2010
thanks for the tip
Reply With Quote
  #5  
Old 26 Jun 2010, 00:19
Sledgstone's Avatar
Sledgstone Sledgstone is offline
 
Join Date: Aug 2004
Thanks! I've been looking for this!
Reply With Quote
  #6  
Old 06 Jul 2010, 17:32
benstillman benstillman is offline
 
Join Date: Jun 2007
Real name: Ben
One star, but nobody has posted any negative comments for me to follow up on. Sweet.
__________________
Reply With Quote
  #7  
Old 13 Jul 2010, 09:27
kapii kapii is offline
 
Join Date: May 2008
Question Weather Widget

It might also help to give specific details on setting it up for those that are less knowledgeable about the new vB... To the average user, it's even confusing, and I've been using vB since 2008...

Reply With Quote
  #8  
Old 13 Jul 2010, 19:31
TbChampions TbChampions is offline
 
Join Date: Jun 2005
Hi Ben! This looks like a nice addition. Unfortunately, it's not working for me yet. I did everything per instructions, with the possible exception of this part:

- Configure the widget to use the "vbcms_widget_weather" template.

I don't know how/what you mean by the above, and this may be why it's not working for me yet.

Thanks!

Victoria
Reply With Quote
  #9  
Old 13 Jul 2010, 21:34
ozzy47's Avatar
ozzy47 ozzy47 is online now
 
Join Date: Jul 2009
Real name: Chris
I got it installed, voted 5 stars!!
Reply With Quote
  #10  
Old 01 Aug 2010, 19:31
mimi123 mimi123 is offline
 
Join Date: Jun 2010
tell me whats the point in creating a profile field for zip code when it doesn't even work? weather.com will give the html code to put in your weather configuration after you enter "your own" city. which will appear to all members in my site, if they wanna know their weather they have to enter their zip code in that "go" box. so whats the point for the profile field tell me
Reply With Quote
  #11  
Old 05 Aug 2010, 18:43
benstillman benstillman is offline
 
Join Date: Jun 2007
Real name: Ben
Originally Posted by mimi123 View Post
tell me whats the point in creating a profile field for zip code when it doesn't even work? weather.com will give the html code to put in your weather configuration after you enter "your own" city. which will appear to all members in my site, if they wanna know their weather they have to enter their zip code in that "go" box. so whats the point for the profile field tell me
No idea what you're talking about.

This passes your zip code to the url, so users with their zip code entered in the profile field will just see their weather without having to type in their zip code each time.

Try it, you'll see what I mean.
__________________
Reply With Quote
  #12  
Old 28 Sep 2010, 06:09
8thos's Avatar
8thos 8thos is offline
 
Join Date: Aug 2010
Real name: DRE
*subs*
Reply With Quote
  #13  
Old 12 Nov 2010, 18:38
aenable aenable is offline
 
Join Date: Jan 2010
FWIW, I had to change this line:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

to this:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

to fix the link in the widget when there is no zip code showing.

(VB4.0.7)

Thanks!
Reply With Quote
  #14  
Old 12 Dec 2010, 00:06
8thos's Avatar
8thos 8thos is offline
 
Join Date: Aug 2010
Real name: DRE
Works great! Dude gave bad directions though.
__________________
www.8thos.com
www.qapla.com
Reply With Quote
  #15  
Old 12 Dec 2010, 07:57
OldSchoolDSL OldSchoolDSL is offline
 
Join Date: Oct 2010
Real name: Adam H.
Originally Posted by Octavius. View Post
Works great! Dude gave bad directions though.
Found it a little hard to understand also.

Would you please be so kind as to maybe clear up the details?
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Mod Options

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
Forum Jump


New To Site? Need Help?

All times are GMT. The time now is 02:39.

Layout Options | Width: Wide Color: