![]() |
Weather In Your Navbar
1 Attachment(s)
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[imgdir_misc]/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_se arch_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 DEMO Screenshot: http://lacledeforum.com/forums/image...2&type=profile |
reserved
|
does it change?
|
where is Lebanon, MO?
|
Yes, it reads the weather from www.weatherreports.com You will need to change the Zip Code to your own Zip Code.
|
ahhh, missed that, sorry!
|
Quote:
|
Looks nice! Installed.
|
Good work, thank you!
Installed |
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.
|
thank you
Nice work |
works great. thanks alot
|
I can't get it to change from celsius to fahrenheit
|
<script type="text/javascript" language="javascript1.2" src="http://weatherreports.com/jscript.html?width=234&height=60&theme=lblue_no_se arch_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" |
pretty neat, may add this one to our local forum
|
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 |
Quote:
Thats exactly what I have and it still doesn't work. |
Quote:
If it could be member set... :up: |
Quote:
|
Have you figured a way to have a user put their zip code in yet?
|
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. Code:
<if condition="$bbuserinfo[fieldx]"> 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. |
Perfect............thank you!
|
Your welcome.
To the owner of this mod feel free to add my code to yours if you would like. |
Quote:
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. |
Quote:
Code:
Change this: |
Thanks. Could i get the weather.com code? this other site shows my temp as 60 one second and 53 another.
|
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.
|
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&locat ion=LOCAL&units=f"> </script> <div><a href="http://www.weatherreports.com/"><small>Weather Reports</small></a></div> |
Quote:
|
Quote:
|
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: Code:
<if condition="$bbuserinfo[field13]"> |
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 Code:
<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"> Code:
<if condition="$post['fieldx']"> 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. Code:
<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"> |
All times are GMT. The time now is 03:28 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|