Simple Machines Community Forum

Customizing SMF => Modifications and Packages => Topic started by: Mick. on April 17, 2010, 12:00:47 PM

Title: Weather In Posts v.1
Post by: Mick. on April 17, 2010, 12:00:47 PM
Link to Mod (http://custom.simplemachines.org/mods/index.php?mod=2496)

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.

Title: Re: Weather In Posts v.1
Post by: More-to-life on April 18, 2010, 10:44:10 AM
Is there anyway this could be adapted for use in the UK?
Title: Re: Weather In Posts v.1
Post by: Mick. on April 18, 2010, 10:47:07 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 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.
Title: Re: Weather In Posts v.1
Post by: Mick. 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.
Title: Re: Weather In Posts v.1
Post by: rd on April 18, 2010, 11:02:53 AM
What about the Netherlands?
Title: Re: Weather In Posts v.1
Post by: Cutter65 on April 18, 2010, 11:22:01 AM
Great add on Bluedevil, thanks for putting this together!  8)

Works great!

Cutter
Title: Re: Weather In Posts v.1
Post by: Mick. on April 18, 2010, 11:28:02 AM
For testing purposes..... i need a UK / Netherlands city and country.
Title: Re: Weather In Posts v.1
Post by: Arantor on April 18, 2010, 11:45:15 AM
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.
Title: Re: Weather In Posts v.1
Post by: Mick. on April 18, 2010, 12:18:07 PM
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.
Title: Re: Weather In Posts v.1
Post by: More-to-life on April 18, 2010, 01:04:28 PM
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!
Title: Re: Weather In Posts v.1
Post by: aussieherps on April 19, 2010, 08:05:39 PM
Would love this for an aussie forum if possible.
Title: Re: Weather In Posts v.1
Post by: MATTEK on April 19, 2010, 08:31:53 PM
What about Canadian weather?
Title: Re: Weather In Posts v.1
Post by: 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. :)
Title: Re: Weather In Posts v.1
Post by: Mick. on April 22, 2010, 11:51:13 AM
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 ;)
Title: Re: Weather In Posts v.1
Post by: 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!
Title: Re: Weather In Posts v.1
Post by: Mick. on April 24, 2010, 06:56:18 PM
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?  ;)
Title: Re: Weather In Posts v.1
Post by: Martin12 on April 24, 2010, 08:21:05 PM
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
Title: Re: Weather In Posts v.1
Post by: 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:

(http://i44.tinypic.com/wbbhas.png)
Title: Re: Weather In Posts v.1
Post by: Mick. 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:

(http://i44.tinypic.com/wbbhas.png)

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.   
Title: Re: Weather In Posts v.1
Post by: Kimmie on May 04, 2010, 03:45:32 PM
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:

(http://i44.tinypic.com/wbbhas.png)

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.
Title: Re: Weather In Posts v.1
Post by: Mick. on May 04, 2010, 03:58:59 PM
Now i know how NAO feels.
Title: Re: Weather In Posts v.1
Post by: Arantor on May 04, 2010, 04:05:46 PM
And so another mod author gets disheartened because the community fails to understand what goes into modding.

I liked the mod. :)
Title: Re: Weather In Posts v.1
Post by: Sabre™ on May 04, 2010, 06:18:57 PM
(http://www.woolywonder.com/forums/images/smilies/violin.gif)
Title: Re: Weather In Posts v.1
Post by: More-to-life on May 05, 2010, 08:58:09 AM
Quote from: Kimmie on May 04, 2010, 03:45:32 PM
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.

BD your doing a great job keep up the good work

Kimmie your not born with manners it's something your taught

Seems maybe you were playing kick about with your friends on that day

You can't please all of the people all of the time
Title: Re: Weather In Posts v.1
Post by: Kimmie on May 05, 2010, 04:53:29 PM
Quote from: Arantor on May 04, 2010, 04:05:46 PM
And so another mod author gets disheartened because the community fails to understand what goes into modding.

I liked the mod. :)


Quote from: welshbikers on May 05, 2010, 08:58:09 AM
Quote from: Kimmie on May 04, 2010, 03:45:32 PM
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.

BD your doing a great job keep up the good work

Kimmie your not born with manners it's something your taught

Seems maybe you were playing kick about with your friends on that day

You can't please all of the people all of the time

To both of you, ALL I did was ask a simple question and got a sarcastic answer. I HAVE manners until someone disrespects my intelligence. Dont even know what "kick about" even means (must be a welsh thing) lol, but okie dokie. Its NOT that I didnt like the mod, I asked to see if a simple change could be made because I DID like the mod, thats it, nothing more, just wanted to see if there was a work around so folks wouldnt have to look at all that garbled mess..lol. If the mod auths dont want to support their mods and answer questions pertaining to them, then perhaps they shouldnt make them? I see all the time on here, people making requests with mods, why is mine any different?  lol


The sheer thought of asking 7000+ people to not put anything in that box other than a city and a state is proposterous because its not gonna happen..lol.
Title: Re: Weather In Posts v.1
Post by: Arantor on May 05, 2010, 04:58:34 PM
The attitude was what was different. You asked a question, got an answer that didn't quite work for you, then simply said what amounts to, "Fine, I won't use the mod, it looks rubbish anyway"

Speaking from experience, that kind of thing feels insensitive when you receive it, and it can hurt. It's why Nao isn't supporting Aeva here, it's why I'm no longer writing mods freely (I have written a grand total of 4 mods since the turn of the year, only 1 of them published under my own name)
Title: Re: Weather In Posts v.1
Post by: Mick. on May 05, 2010, 05:02:39 PM
Quote from: Kimmie on May 05, 2010, 04:53:29 PM


The sheer thought of asking 7000+ people to not put anything in that box other than a city and a state is proposterous because its not gonna happen..lol.

You dont have forum rules?  Is the global newsletter broke in your forum?
Title: Re: Weather In Posts v.1
Post by: Arantor on May 05, 2010, 05:06:51 PM
How about emptying the field out in the database?
Title: Re: Weather In Posts v.1
Post by: Sabre™ on May 05, 2010, 09:25:02 PM
Kimmie, You could also alter the mod to have its own field named 'weather' which wont have an effect on the location field ;)
Obviously a little more work than adding another field, but doable :)
Title: Re: Weather In Posts v.1
Post by: dmacleo on May 07, 2010, 03:48:55 PM
just fyi, trying to d/l using package manager gives empty file error. manual d/l then upload works fine though and installed on default theme fine.
I look fwd to using it, thank you.
Title: Re: Weather In Posts v.1
Post by: Martin12 on May 16, 2010, 01:38:36 PM
I went ahead and played around with HW3 and tweaked it so the badges would show if there was a weather alert. I also added some nice icons and removed the time. If anyone wants to use them they are welcome to. Just change out the http://www.observingstars.com in the code of this mod with http://www.twctoday.com  (Make sure you leave the /weather/ and everything after it)
(http://img37.imageshack.us/img37/6397/testnp.png)
Title: Re: Weather In Posts v.1
Post by: Mick. on May 16, 2010, 01:40:40 PM
Quote from: Martin12 on May 16, 2010, 01:38:36 PM
I went ahead and played around with HW3 and tweaked it so the badges would show if there was a weather alert. I also added some nice icons and removed the time. If anyone wants to use them they are welcome to. Just change out the http://www.observingstars.com in the code of this mod with http://www.twctoday.com  (Make sure you leave the /weather/ and everything after it)
(http://img37.imageshack.us/img37/6397/testnp.png)

Very cool martin.   I wonder how much stress users will put in your servers.?
Title: Re: Weather In Posts v.1
Post by: Martin12 on May 16, 2010, 01:45:45 PM
Quote from: bluedevil on May 16, 2010, 01:40:40 PM
Quote from: Martin12 on May 16, 2010, 01:38:36 PM
I went ahead and played around with HW3 and tweaked it so the badges would show if there was a weather alert. I also added some nice icons and removed the time. If anyone wants to use them they are welcome to. Just change out the http://www.observingstars.com in the code of this mod with http://www.twctoday.com  (Make sure you leave the /weather/ and everything after it)
(http://img37.imageshack.us/img37/6397/testnp.png)

Very cool martin.   I wonder how much stress users will put in your servers.?
Actually I was surprised at how light this is! I created a few hundred in just a few seconds. I am glad its so efficient! The beauty of HW3 is the fact there are so many people using this as well so if you do loose a source its easy to just replace the url and having it working again. I wish I found out about this years ago. Haha 8)
Title: Re: Weather In Posts v.1
Post by: Nao 尚 on May 16, 2010, 03:17:20 PM
Quote from: bluedevil on May 04, 2010, 03:58:59 PM
Now i know how NAO feels.
Join the club, mate!  8)
Title: Re: Weather In Posts v.1
Post by: Arantor on May 16, 2010, 03:19:24 PM
Nao, bluedevil: Who votes we start a fan club for mod authors who... y'know...

Oh wait, I'm already doing that at the moment ;D
Title: Re: Weather In Posts v.1
Post by: Mick. on May 16, 2010, 03:21:11 PM
Quote from: Arantor on May 16, 2010, 03:19:24 PM
Nao, bluedevil: Who votes we start a fan club for mod authors who... y'know...

Oh wait, I'm already doing that at the moment ;D

fan club?   lol
Title: Re: Weather In Posts v.1
Post by: Arantor on May 16, 2010, 03:23:00 PM
Fan club was the wrong word, but a club for people who dislike mod users who don't care about the effort and time...
Title: Re: Weather In Posts v.1
Post by: Mick. on May 16, 2010, 03:26:25 PM
Quote from: Arantor on May 16, 2010, 03:23:00 PM
Fan club was the wrong word, but a club for people who dislike mod users who don't care about the effort and time...

lol..... that'd be too much to handle.  Between you two, i bet y'all have a great membership.
Title: Re: Weather In Posts v.1
Post by: Arantor on May 16, 2010, 04:01:25 PM
I'll be selling my mods there, and I'm hopeful others will too :)
Title: Re: Weather In Posts v.1
Post by: rd on May 16, 2010, 04:14:27 PM
Quote from: Arantor on May 16, 2010, 04:01:25 PM
I'll be selling my mods there, and I'm hopeful others will too :)

And I will be buying.
Title: Re: Weather In Posts v.1
Post by: aussieherps on August 03, 2010, 12:01:53 AM
Hi guys

If I have a source for my countries weather, where do I change things so they will work for my forum?

Thhanks in advance.
Todd
Title: Re: Weather In Posts v.1
Post by: aussieherps on August 13, 2010, 11:52:42 PM
is this thread no longer supported??
Title: Re: Weather In Posts v.1
Post by: AllanD on March 15, 2011, 08:34:39 PM
is there a way to have this work globally for every user not just a particular country
Title: Re: Weather In Posts v.1
Post by: Mick. on March 15, 2011, 09:17:36 PM
Quote from: CrazieGrafix on March 15, 2011, 08:34:39 PM
is there a way to have this work globally for every user not just a particular country

Not that im aware of.
Title: Re: Weather In Posts v.1
Post by: AllanD on March 16, 2011, 10:24:30 AM
ok thank you for answering
Title: Re: Weather In Posts v.1
Post by: dry3210 on June 27, 2011, 01:08:28 AM
bluedevil,
  Any chance on getting the coding that would work in a portal block (specifically simpleportal)?  I already have a bunch of crap (not really crap but mods) in the posts but would love to have this in a block that would come up per user.
Title: Re: Weather In Posts v.1
Post by: mxcape21 on August 23, 2011, 04:28:45 PM
I have one minor problem with this mod installed on SMF 2.0 curve theme, it works great for all other groups and members but always says " The current conditions are currently unavailable" for admin only.
What could be causing this?

Thanks for such a great mod!
Title: Re: Weather In Posts v.1
Post by: K4EEO on October 25, 2013, 09:31:37 PM
now using smf 2.0.6 and this mod still works great for me.. thanks!