The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
Location Based Weather Template Mod Details »» | |||||||||||||||||||||||||
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:
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
|
Comments |
#2
|
|||
|
|||
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!
|
#3
|
||||
|
||||
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
|
#4
|
|||
|
|||
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! |
#5
|
||||
|
||||
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
|
#6
|
|||
|
|||
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! |
#7
|
||||
|
||||
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? |
#8
|
|||
|
|||
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! |
#9
|
||||
|
||||
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 |
#10
|
|||
|
|||
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!!! |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|