Weather In Posts v.1

Started by Mick., April 17, 2010, 12:00:47 PM

Previous topic - Next topic

Mick.

Link to Mod

Adds Weather Sticker On Users Posts under their avatars in post view if Location is filled out with city,state or just the zip code.

It uses SMF's integrated "location" field in the profile edit area. 

Note** It only works in 50 USA states.

Note:  Weather Updates are each hour.

How to Use:   Type your location in "modify profile".  ie. Las Vegas,NV

To change text color open:
Themes/default/Display.template.php

Find:
   echo'
   <img src="http://www.observingstars.com/weather/hw3.php?forecast=hourly&pands=', $message['member']['location'],  '&config=png&alt=hwicc&hwvttf=&daysonly=1&hwvbg=transparent&hwvtc=black&hwvusettf=0" border=0 width=166 height=77></img> <br />';


Replace:
black
with your desired color. ie. blue, red, yellow.   Hex code also supported.  Do not use the # sign.  Just ie. 224466 is fine.


More-to-life

Is there anyway this could be adapted for use in the UK?
UK Bike Forum - The biggest motorcycle forum magazine in Wales UK.
Gear Up Magazine - Gear Up Motorcycle Magazine.
United Bikers UK Motorcycle Forum - A Brand New UK Bike Forum.
Used Cars South Wales - Search For Your Next Used Car In Laleston, Bridgend, South Wales.
Bikers Of Wales Motorcycle Website - Motorbike Info
Honda - Honda UK

Mick.

Quote from: welshbikers on April 18, 2010, 10:44:10 AM
Is there anyway this could be adapted for use in the UK?

I dont see why not..  the problem would be finding a UK based website that offers "weather stickers".

I could google that to see if its available.

Mick.

Quote from: welshbikers on April 18, 2010, 10:44:10 AM
Is there anyway this could be adapted for use in the UK?

I found a provider.... let me put it together and load it here.

rd

What about the Netherlands?

Cutter65

Great add on Bluedevil, thanks for putting this together!  8)

Works great!

Cutter

Mick.

For testing purposes..... i need a UK / Netherlands city and country.

Arantor

UK city: London, Edinburgh, Cardiff, Birmingham

Country... well, it's made up of England, Wales, Scotland, Northern Ireland. If you're after "states", they're called counties, and some examples are West Sussex, Devon, Somerset, Cornwall.

Mick.

I updated the ZIP for a better image look.  Now it uses a different provider and a transparent background.   See post #1.

Uninstall previous ZIP and delete from the mod list in admin.   Install new ZIP.



......im still working on a international weather sticker.

More-to-life

Quote from: bluedevil on April 18, 2010, 10:50:45 AM
Quote from: welshbikers on April 18, 2010, 10:44:10 AM
Is there anyway this could be adapted for use in the UK?

I found a provider.... let me put it together and load it here.

Fair play now thats what i call support ;D

Well done that man!
UK Bike Forum - The biggest motorcycle forum magazine in Wales UK.
Gear Up Magazine - Gear Up Motorcycle Magazine.
United Bikers UK Motorcycle Forum - A Brand New UK Bike Forum.
Used Cars South Wales - Search For Your Next Used Car In Laleston, Bridgend, South Wales.
Bikers Of Wales Motorcycle Website - Motorbike Info
Honda - Honda UK

aussieherps

Would love this for an aussie forum if possible.
http://aussieherps.com">snakes lizards spiders turtles and much more

MATTEK

What about Canadian weather?
SMF 2.0.1

Like Comics, Books, Movies or T.V. Shows? Read about them here!!

Sabre™

Looks like you're going to get requests for alot of countries mate. lol
Good job with this mod, those which 'were' using the old version will be happy to see this. :)
Do NOT give admin and/or ftp details to just anybody, see if they are trust worthy first!!  Do your homework ;)


Mick.

Quote from: Sabre™ on April 22, 2010, 04:17:47 AM
Looks like you're going to get requests for alot of countries mate. lol
Good job with this mod, those which 'were' using the old version will be happy to see this. :)

Thanx Sabre.

Im still working on locating a website that offers international weather stickers.  The problem i found is, these international weather stickers have the website's logo on them.  Im not liking that.    ...and others parse different than the US ones.

Ive been thinking of adding my own images in a separate folder and call them from there but at the same time call the forecast from whatever website.

Im still diggin' on it ;)

Martin12

Thanks so much for redesigning the format of this! :) I remember you showed me in my mod request topic how you were able to fix and bring to life that old weather mod. I am glad you were able to customize it more. That was my biggest gripe! FANTASTIC job!

Mick.

Quote from: Martin12 on April 24, 2010, 06:49:04 PM
Thanks so much for redesigning the format of this! :) I remember you showed me in my mod request topic how you were able to fix and bring to life that old weather mod. I am glad you were able to customize it more. That was my biggest gripe! FANTASTIC job!

Looks much better dont it?  ;)

Martin12

Oh wow. I just realized that this data came from a HAMweather script! Now I can host the weather images and data on my own site. Perfect in case the other source go down. Why on earth did I not see that!

Good work

Kimmie

Sometimes people will put random sayings in the Location box such as "Right Here", or "On the Best Forum Ever", etc. Is there a way to set it so that if they do not type in a City, State that it wont show anything there at all? 

This is what it shows now:


Mick.

Quote from: Kimmie on May 04, 2010, 01:22:59 AM
Sometimes people will put random sayings in the Location box such as "Right Here", or "On the Best Forum Ever", etc. Is there a way to set it so that if they do not type in a City, State that it wont show anything there at all? 

This is what it shows now:



If its empty, then nothing shows.   If your users want to add garble, then obviously it would look for the gabled city.   Tell your users to use the location for whats intended.   

Kimmie

Quote from: bluedevil on May 04, 2010, 10:04:44 AM
Quote from: Kimmie on May 04, 2010, 01:22:59 AM
Sometimes people will put random sayings in the Location box such as "Right Here", or "On the Best Forum Ever", etc. Is there a way to set it so that if they do not type in a City, State that it wont show anything there at all? 

This is what it shows now:



If its empty, then nothing shows.   If your users want to add garble, then obviously it would look for the gabled city.   Tell your users to use the location for whats intended.   

I have 7,000+ members do you know how difficult it will be to get everyone to do that?  lol. I just wont use this mod, it messes up all the icons right there anyways (splits them up, puts 2 above the weather image, and 4 below it)..lol.

Advertisement: