Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > General > Member Archives
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Location Based Weather Template Mod Details »»
Location Based Weather Template Mod
Version: , by joeydood joeydood is offline
Developer Last Online: Apr 2011 Show Printable Version Email this Page

Version: Unknown Rating:
Released: 09-30-2003 Last Update: Never Installs: 0
 
No support by the author.

guys, this is my very first attempt at a sort-of serious modification...

i run a motorcycle web site, www.rocketmadness.com. it's important for the riders to know the local weather conditions and the members range from all over Louisiana and the south.

so i devised a template hack to pull the member's location field and insert it into the form's value field for submission to weather.yahoo.com. you could easily substitute it for any weather site's form...

installation is a snap!

acp | templates | modify
locate postbit templates
locate postbit

scroll down to where you see the 'Posts: $post[posts]< br>
add the following before the < td>:

PHP Code:
<form method=get action="http://search.weather.yahoo.com/search/weather2" name=form1 target="_new">
<
INPUT TYPE="hidden" NAME="p" VALUE="$post[field2]size=21>&nbsp;<font size="1" face="Verdana"><input type=submit 
value
="My Weather"></form
now, on each post, every member has a button that says 'My Weather' that takes them to their local weather conditions and forcast!

YOU COULD DO THIS WITH ANY FORM!!! add a user field to their profiles for favorite sports team and submit it for the latest sports scores and events!

Show Your Support

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

Comments
  #2  
Old 09-30-2003, 07:32 PM
joeydood joeydood is offline
 
Join Date: Sep 2003
Posts: 30
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

p.s., if someone else has done this before, my apologies... i needed this badly and well i searched the site with no luck. i CONSIDERED ip-based weather but well u know the headaches in that!
Reply With Quote
  #3  
Old 10-07-2003, 06:45 AM
MindTrix's Avatar
MindTrix MindTrix is offline
 
Join Date: Apr 2002
Location: United Kingdom
Posts: 1,833
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Errrrrrrrrrmmmmmm ok I installed it but all you've really done is make a button appear linking to yahoo weather :s Isnt really a template mod is it, its just a link?? Thanks for sharin tho
Reply With Quote
  #4  
Old 10-07-2003, 11:44 AM
joeydood joeydood is offline
 
Join Date: Sep 2003
Posts: 30
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

yes, correct. that's all it does.

it passes the user's field2 (a user's 'location' in my db) to the yahoo weather via the yahoo weather form.

not sure exactly what kind of mod it is, i'm new to your classifications.

n-joy!
Reply With Quote
  #5  
Old 10-07-2003, 11:47 AM
MindTrix's Avatar
MindTrix MindTrix is offline
 
Join Date: Apr 2002
Location: United Kingdom
Posts: 1,833
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ummmmm ok didnt for me, I got my location as Uk and when clicking the link it mearly takes me to the front page of yahoo weather
Reply With Quote
  #6  
Old 10-07-2003, 12:16 PM
joeydood joeydood is offline
 
Join Date: Sep 2003
Posts: 30
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

you have to be a bit more specific than just 'uk'. that's like me putting usa in my location.

if you want LOCAL weather put in your LOCATION, not your entire COUNTRY.

for instance, just 'london' works fine. there's only one london. however there are are many different areas for which the weather is reported in the UK.

good luck!
Reply With Quote
  #7  
Old 10-07-2003, 12:25 PM
MindTrix's Avatar
MindTrix MindTrix is offline
 
Join Date: Apr 2002
Location: United Kingdom
Posts: 1,833
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ahh i gotcha, yeah works fine. Couple of things tho more like requests


1.Couldnt you somehow have it so that either
a) The weather is shown in a users post bit, like if its cloudy a lil cloud appears, or somet simple like this?
b) Instead of going to the ugly yahoo page a java page loads up with the info ur lookin for?

Also cud it be set so that MY WEATHER doesnt show on everybodys post bit, it only appears to THAT user under their postbit? Like errm My Weather button would only show for me underneath my posts, I wudnt see it in anyone elses ya no?
Reply With Quote
  #8  
Old 10-07-2003, 12:47 PM
joeydood joeydood is offline
 
Join Date: Sep 2003
Posts: 30
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

MAN! those are great ideas!!! i like the thought of just using the little icon on your page or post for your local weather conditions...

actually, i've kind of changed the mod a bit... on my site now, there's just one icon on the top of each page, 'Your Weather'. that way you don't have to look for your posts, etc. to find YOUR icon.

technically, i guess i could write my own page that the 'Your Weather' icon points to... pass the location to this custom page and it would instantly grab the weather in a pre-formatted layout.

i'll have to give this some thought!

but you know, the only problem with retrieving the icon from a weather site back to your vB site is that some ding-dongs put things like location: the playboy mansion; location: a warm moist hole... (no kidding on that!) so then i'm not sure about what icon would be returned by the weather site...

but you've given me some things to consider! location based weather has been a long-time holy grail to me as, like i said in a previous post... we ride sportbikes and weather conditions are very important to us.

i tried to find IP based weather hacks, etc. sheesh let the members put their location in their ucp and BAM!!! of course this isn't really a hack but heck my members love it!
Reply With Quote
  #9  
Old 10-07-2003, 12:53 PM
MindTrix's Avatar
MindTrix MindTrix is offline
 
Join Date: Apr 2002
Location: United Kingdom
Posts: 1,833
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hmmm well how about havin a tiny link under each postbit sayin somet like "View your local weather" and then when clicked it takes them to a custom VB page displayin the info. And also in the USER CP next too PRIVATE MESSAGES put LOCAL WEATHER just for the sake of it .

As for them enterin stupid locations i know wut ya mean, i own a rap board so go figure lol. But they shud just get what i got, when i had UK. You just get the weather home page.

Wud b nice just havin like a Sun picture in postbit if its sunny for u, Or Rain if its rainy etc
Reply With Quote
  #10  
Old 10-07-2003, 12:55 PM
joeydood joeydood is offline
 
Join Date: Sep 2003
Posts: 30
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

sounds kewl man i think that shall be the next step!

and omg i can just imagine what they put in a RAP board. and i thought SPORT BIKE RIDERS were crazy!!!
Reply With Quote
Reply


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 10:56 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.04194 seconds
  • Memory Usage 2,297KB
  • Queries Executed 23 (?)
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
  • (1)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (10)postbit_onlinestatus
  • (10)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