PDA

View Full Version : Forum Display Enhancements - Weather In Your Navbar


Reycer
22 Mar 2009, 20:57
Alright this is my first time ever doing this, and some of you might not find this so useful, but some of my posters do. So here goes.



This will let you have a weather icon in the space above your navbar.

To install:

Open your Navbar Template

Admin Cp ----> Styles and Templates -----> Style Manager ---> Edit Templates(in your style) ---> Navigation/Breadcrumbs Templates

Find:

<div class="navbar" style="font-size:10pt"><a href="$vboptions[forumhome].php$session[sessionurl_q]" accesskey="1"><img class="inlineimg" src="$stylevar/navbits_start.gif" alt="" border="0" /></a> <strong>$vboptions[bbtitle]</strong></div>


Directly below that add:

<script type="text/javascript" language="javascript1.2" src="http://weatherreports.com/jscript.html?width=234&height=60&theme=lblue_no_search_box&location=65536&units= f">
</script>
<div><a href="http://www.weatherreports.com/"><small>Weather Reports</small></a></div>


In location=65536 -- Change that to your Zip Code.

Save it and your done. Weather is now on your site.


You can also change the size and dimension of this weather code by following this link (http://www.weatherreports.com/add_to_your_site.html)

DEMO (http://www.lacledeforum.com)

Screenshot:

[IMG]http://lacledeforum.com/forums/image.php?u=1&dateline=1237751832&type=profile

Reycer
22 Mar 2009, 21:08
reserved

DobieGillis©
22 Mar 2009, 21:17
does it change?

DobieGillis©
22 Mar 2009, 21:20
where is Lebanon, MO?

Reycer
22 Mar 2009, 21:22
Yes, it reads the weather from www.weatherreports.com You will need to change the Zip Code to your own Zip Code.

DobieGillis©
22 Mar 2009, 21:22
ahhh, missed that, sorry!

Reycer
22 Mar 2009, 21:23
ahhh, missed that, sorry!

it's ok.

DobieGillis©
22 Mar 2009, 21:25
Looks nice! Installed.

Jasem
23 Mar 2009, 15:50
Good work, thank you!

Installed

schlottkej
24 Mar 2009, 21:53
You could also add an additional Userfield that asks for the ZIP Code and insert it there.. that way the Weather would be for each user rather than the owner's site.

Agdez.com
25 Mar 2009, 12:52
thank you

Nice work

FRANKTHETANK 2
26 Mar 2009, 00:55
works great. thanks alot

FRANKTHETANK 2
27 Mar 2009, 19:17
I can't get it to change from celsius to fahrenheit

Reycer
28 Mar 2009, 01:22
<script type="text/javascript" language="javascript1.2" src="http://weatherreports.com/jscript.html?width=234&height=60&theme=lblue_no_search_box&location=65536&units= f">
</script>
<div><a href="http://www.weatherreports.com/"><small>Weather Reports</small></a></div>

Make sure that the highlighted still says "F" and not "C"

Brandon Sheley
28 Mar 2009, 01:23
pretty neat, may add this one to our local forum

Doctor Death
29 Mar 2009, 21:39
I would love it if you could map this to a user defined Zip field.

If that user didnt complete it, would like to have an option for a "default" zip.

Really good stuff, thank you

FRANKTHETANK 2
31 Mar 2009, 23:20
<script type="text/javascript" language="javascript1.2" src="http://weatherreports.com/jscript.html?width=234&height=60&theme=lblue_no_search_box&location=65536&units= f">
</script>
<div><a href="http://www.weatherreports.com/"><small>Weather Reports</small></a></div>

Make sure that the highlighted still says "F" and not "C"


Thats exactly what I have and it still doesn't work.

BigDog56
31 Mar 2009, 23:52
pretty neat, may add this one to our local forum

Agreed. We have members from all over that I doubt would have much intrest in Ky's weather.
If it could be member set... :up:

Reycer
05 Apr 2009, 16:17
Thats exactly what I have and it still doesn't work.

ok take out the space between = and F that did it.

BigBass
10 Apr 2009, 13:25
Have you figured a way to have a user put their zip code in yet?

BBR-APBT
10 Apr 2009, 18:11
I have made it so it uses a custom profile field and display each users local zip code. Plus the weather box will only show up if they entered their zip code.

First you have to make a new profile field.

admin >> User Profile Fields >> Add New User Profile Field


Single-Line Text Box
Title: Zip Code
Description: Put your Zip code here to display the local weather at the bottom of the forums.

Private Field: Yes
Field Searchable on Members List: NO
Show on Members List: NO




Here is the code.

<if condition="$bbuserinfo[fieldx]">
<script type="text/javascript" language="javascript1.2" src="http://weatherreports.com/jscript.html?width=234&height=60&theme=lblue_no_search_box&location=$bbuserinfo[fieldx]&units=f">
</script>
<div><a href="http://www.weatherreports.com/"><small>Weather Reports</small></a></div>
</if>


Change $bbuserinfo[fieldx] to the number of your field it is twice in the code.
Enjoy every one.


I use weather.com for mine and it is at the bottom of the forums. weather.com has a much nicer looking layout. If you sign up there and want help implanting the code just let me know.

BigBass
10 Apr 2009, 18:48
Perfect............thank you!

BBR-APBT
10 Apr 2009, 19:10
Your welcome.

To the owner of this mod feel free to add my code to yours if you would like.

columbonet
13 Apr 2009, 00:27
I have made it so it uses a custom profile field and display each users local zip code. Plus the weather box will only show up if they entered their zip code.

First you have to make a new profile field.

admin >> User Profile Fields >> Add New User Profile Field


Single-Line Text Box
Title: Zip Code
Description: Put your Zip code here to display the local weather at the bottom of the forums.

Private Field: Yes
Field Searchable on Members List: NO
Show on Members List: NO




Here is the code.

<if condition="$bbuserinfo[fieldx]">
<script type="text/javascript" language="javascript1.2" src="http://weatherreports.com/jscript.html?width=234&height=60&theme=lblue_no_search_box&location=$bbuserinfo[fieldx]&units=f">
</script>
<div><a href="http://www.weatherreports.com/"><small>Weather Reports</small></a></div>
</if>


Change $bbuserinfo[fieldx] to the number of your field it is twice in the code.
Enjoy every one.


I use weather.com for mine and it is at the bottom of the forums. weather.com has a much nicer looking layout. If you sign up there and want help implanting the code just let me know.



For those that use this:

I went ahead and added 2 zip code fields and marked one for "f" and one for "c". This way the visitor can choose which format to see their weather in. I then placed the code in the template twice. If they leave on zip code empty then it only shows up once. If they enter zips in both fields then they will see both F and C temps.

BBR-APBT
13 Apr 2009, 00:36
For those that use this:

I went ahead and added 2 zip code fields and marked one for "f" and one for "c". This way the visitor can choose which format to see their weather in. I then placed the code in the template twice. If they leave on zip code empty then it only shows up once. If they enter zips in both fields then they will see both F and C temps.

You could of just made a field with two options F and C and let them choose with a drop down.


Change this:
&units=f

to this
&units=$bbuserinfo[fieldx]


Would be much easier if you only had one spot for zip code and a option to choose between F and C

columbonet
13 Apr 2009, 01:10
Thanks. Could i get the weather.com code? this other site shows my temp as 60 one second and 53 another.

BBR-APBT
13 Apr 2009, 01:16
You will have to set up an account over to get a api type key else it wont run on your site from my key. Check your PM for the code I will leave most of the one line out. But you will see what to edit.

wwolf27
13 Apr 2009, 11:45
I am asking this in a nice way because I want to see if I am doing something wrong....I am confused as to why some have added a new profile field??

If you go to the site that the mod owner posted http://www.weatherreports.com/add_to_your_site.html
it tells you right to the right to choose "F" or "C" and it says Enter 'LOCAL' to Determine User's Location Based on IP click which style you want and it gives you the code

This is what I have on my site with a black background.

<script type="text/javascript" language="javascript1.2" src="http://weatherreports.com/jscript.html?width=728&height=90&theme=black&location=LOCAL&units=f">
</script>
<div><a href="http://www.weatherreports.com/"><small>Weather Reports</small></a></div>

BBR-APBT
13 Apr 2009, 11:55
I am asking this in a nice way because I want to see if I am doing something wrong....I am confused as to why some have added a new profile field??

If you go to the site that the mod owner posted http://www.weatherreports.com/add_to_your_site.html
it tells you right to the right to choose "F" or "C" and it says Enter 'LOCAL' to Determine User's Location Based on IP click which style you want and it gives you the code

This is what I have on my site with a black background.

<script type="text/javascript" language="javascript1.2" src="http://weatherreports.com/jscript.html?width=728&height=90&theme=black&location=LOCAL&units=f">
</script>
<div><a href="http://www.weatherreports.com/"><small>Weather Reports</small></a></div>

I never went to the site to see what their code was. As I said I use weather.com. Everyone asked for the code posted to use a custom profile field. So I made it do what they asked and also some people wanted F and some wanted C choices for their members so I told them how to do that also.

columbonet
13 Apr 2009, 20:00
I am asking this in a nice way because I want to see if I am doing something wrong....I am confused as to why some have added a new profile field??

If you go to the site that the mod owner posted http://www.weatherreports.com/add_to_your_site.html
it tells you right to the right to choose "F" or "C" and it says Enter 'LOCAL' to Determine User's Location Based on IP click which style you want and it gives you the code

This is what I have on my site with a black background.

<script type="text/javascript" language="javascript1.2" src="http://weatherreports.com/jscript.html?width=728&height=90&theme=black&location=LOCAL&units=f">
</script>
<div><a href="http://www.weatherreports.com/"><small>Weather Reports</small></a></div>

What you have will tell someone their local temp in F. I needed it to be either way due to folks being from all over the world. That is why I asked what I did.

Biker_GA
27 May 2009, 11:52
I've been looking for something like this that I can use to pass the zip code to the module in CMS and display the weather for each user based on their own zip code.

Here's the code I've input into the module:


<if condition="$bbuserinfo[field13]">
<script type="text/javascript" language="javascript1.2" src="http://weatherreports.com/jscript.html?width=125&height=125&theme=brand&location=$bbuserinfo[field13]&units=f">
</script>
</if>


Unfortunately, the zipcode isn't being passed to the module. Any idea where I made the boo-boo? (Using 3.8.2 and the latest vBAdbanced)

MichaelDance
26 Apr 2010, 17:43
Best way to do this, is

Make a User Profile Field and call it Your Zipcode/Postcode then your weather activated then get the field number eg: field14 so the [fieldx] will be [field14] also you can try

<script type="text/javascript" language="javascript1.2" src="http://weatherreports.com/jscript.html?width=234&height=60&theme=lblue_no_search_box&location="$post[fieldx]"&units= f">
</script>
<div><a href="http://www.weatherreports.com/"><small>Weather Reports</small></a></div>

OR

<if condition="$post['fieldx']">
<script type="text/javascript" language="javascript1.2" src="http://weatherreports.com/jscript.html?width=234&height=60&theme=lblue_no_search_box&location="$post[fieldx]"&units= f">
</script>
<div><a href="http://www.weatherreports.com/"><small>Weather Reports</small></a></div>
</if>

that code can be used in postbit_legacy too.. aswell as Navigator.

Just thought id share...

Also if you like to have your own weather for the Navigator, and if the user has put their code in, it will change to theres put this

CHANGE YOURCODE to your Zipcode/Postcode whatever.

<script type="text/javascript" language="javascript1.2" src="http://weatherreports.com/jscript.html?width=234&height=60&theme=lblue_no_search_box&location=YOURCODE&units= f">
</script>
<div><a href="http://www.weatherreports.com/"><small>Weather Reports</small></a></div>
<if condition="$post['fieldx']">
<script type="text/javascript" language="javascript1.2" src="http://weatherreports.com/jscript.html?width=234&height=60&theme=lblue_no_search_box&location="$post[fieldx]"&units= f">
</script>
<div><a href="http://www.weatherreports.com/"><small>Weather Reports</small></a></div>
</if>