Go Back   vb.org Archive > vBulletin Modifications > vBulletin 3.8 Modifications > vBulletin 3.8 Template Modifications

Reply
 
Thread Tools
Weather In Your Navbar Details »»
Weather In Your Navbar
Version: 1.00, by Reycer Reycer is offline
Developer Last Online: Oct 2013 Show Printable Version Email this Page

Category: Forum Display Enhancements - Version: 3.8.1 Rating:
Released: 03-21-2009 Last Update: Never Installs: 13
Template Edits
 
No support by the author.

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:

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #22  
Old 04-10-2009, 04:11 PM
BBR-APBT's Avatar
BBR-APBT BBR-APBT is offline
 
Join Date: Feb 2009
Location: Maryland
Posts: 946
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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]">
<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.
Reply With Quote
  #23  
Old 04-10-2009, 04:48 PM
BigBass BigBass is offline
 
Join Date: Jan 2009
Posts: 29
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Perfect............thank you!
Reply With Quote
  #24  
Old 04-10-2009, 05:10 PM
BBR-APBT's Avatar
BBR-APBT BBR-APBT is offline
 
Join Date: Feb 2009
Location: Maryland
Posts: 946
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Your welcome.

To the owner of this mod feel free to add my code to yours if you would like.
Reply With Quote
  #25  
Old 04-12-2009, 10:27 PM
columbonet columbonet is offline
 
Join Date: Jan 2006
Posts: 77
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by BBR-APBT View Post
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]">
<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.
Reply With Quote
  #26  
Old 04-12-2009, 10:36 PM
BBR-APBT's Avatar
BBR-APBT BBR-APBT is offline
 
Join Date: Feb 2009
Location: Maryland
Posts: 946
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by columbonet View Post
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.

Code:
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
Reply With Quote
  #27  
Old 04-12-2009, 11:10 PM
columbonet columbonet is offline
 
Join Date: Jan 2006
Posts: 77
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks. Could i get the weather.com code? this other site shows my temp as 60 one second and 53 another.
Reply With Quote
  #28  
Old 04-12-2009, 11:16 PM
BBR-APBT's Avatar
BBR-APBT BBR-APBT is offline
 
Join Date: Feb 2009
Location: Maryland
Posts: 946
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #29  
Old 04-13-2009, 09:45 AM
wwolf27 wwolf27 is offline
 
Join Date: Feb 2008
Posts: 80
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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>
Reply With Quote
  #30  
Old 04-13-2009, 09:55 AM
BBR-APBT's Avatar
BBR-APBT BBR-APBT is offline
 
Join Date: Feb 2009
Location: Maryland
Posts: 946
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by wwolf27 View Post
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>
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.
Reply With Quote
  #31  
Old 04-13-2009, 06:00 PM
columbonet columbonet is offline
 
Join Date: Jan 2006
Posts: 77
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by wwolf27 View Post
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>
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.
Reply With Quote
Reply

Thread Tools

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 08:26 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04484 seconds
  • Memory Usage 2,328KB
  • Queries Executed 26 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (3)bbcode_code
  • (4)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete