![]() |
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:
|
All times are GMT. The time now is 12:50 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 | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|