Diasfora

Site Related => Site Suggestions => Topic started by: ohcheap1 on May 31, 2009, 03:37:23 PM

Title: Local time in Member view
Post by: ohcheap1 on May 31, 2009, 03:37:23 PM
I would like to be heard please.Like you could avoid me even if you tried........I would love it if each persons local time was shown someway with their avatar. It would enhance my internet experience.  ;D
Title: Re: Local time in Member view
Post by: smokester on May 31, 2009, 04:02:56 PM
I would like to be heard please.Like you could avoid me even if you tried........I would love it if each persons local time was shown someway with their avatar. It would enhance my internet experience.  ;D

Sorta the wrong thread for this but I have researched that possibility in the past and there is no modification that can do it automatically.  I can't begin to get my head around how to hack it in by modifying the template files, but it does sound possible in theory.  There may be a way of linking to a world time clock in a member's signature section, but that would be an optional addition by each member.  I'll have a look round to see if it can be done that way.
Title: Re: Local time in Member view
Post by: ohcheap1 on May 31, 2009, 04:25:58 PM
11:25 pm Indie. I thought we were only 4 hours dif? It is 6:25pm now
Title: Re: Local time in Member view
Post by: smokester on May 31, 2009, 04:30:07 PM
I remember 8ullfrog or someone on D having a firefox plugin that displayed the current world clocks, so you could tell instantly what time it was for a member that you knew the location of.  I kind of know them in my head anyway.
Title: Re: Local time in Member view
Post by: ohcheap1 on May 31, 2009, 04:30:54 PM
I fixed it. But you know me.......I dont want to have to actually work for the information I want to see it by the avatar.  ;D I have to admit, I did forget about that option. Thanks Indie.
Title: Re: Local time in Member view
Post by: knownassociate on May 31, 2009, 04:33:31 PM
If it can be done, I think it would be very cool. One of the interesting aspects of spending time with people online is the difference in time, seasons and weather. At least to me it is. :D
Title: Re: Local time in Member view
Post by: ohcheap1 on May 31, 2009, 04:42:26 PM
OC1 do you guys change your clock in the summer and winter. ?
Yep, my state just started doing daylight savings time after fighting it for as long as I've been around.

If it can be done, I think it would be very cool. One of the interesting aspects of spending time with people online is the difference in time, seasons and weather. At least to me it is. :D
Maybe its a chick thing but I agree.  ;D
Title: Re: Local time in Member view
Post by: laama on May 31, 2009, 04:45:08 PM
I must chance my clock in the spring and autumn.
Currently my time is 01:45 in monday.
Title: Re: Local time in Member view
Post by: knownassociate on May 31, 2009, 04:54:58 PM
Yep, my state just started doing daylight savings time after fighting it for as long as I've been around.
Maybe its a chick thing but I agree.  ;D

I don't think it is just a chick thing, OC, because it is one of the first things the guys I talk with want to know.

We've done 'Spring forward/Fall back' in CA for as long as I can remember.
Title: Re: Local time in Member view
Post by: smokester on May 31, 2009, 05:11:18 PM
Bad news is it doesn't look easy.  I can't link a clock to my signature either without using HTML which is both a security risk and not really possible as I do not believe you can embed a flash clock or use javascript. I have tried this before and couldn't get it to work but you could always display your location in the avatar section, and then a world clock add on in firefox would help to see the member's time quickly.

Title: Re: Local time in Member view
Post by: knownassociate on May 31, 2009, 06:42:41 PM
I have no more room for text by my avatar so I put it where my sig would be...
Title: Re: Local time in Member view
Post by: busterone on May 31, 2009, 10:26:07 PM
Bad news is it doesn't look easy.  I can't link a clock to my signature either without using HTML which is both a security risk and not really possible as I do not believe you can embed a flash clock or use javascript. I have tried this before and couldn't get it to work but you could always display your location in the avatar section, and then a world clock add on in firefox would help to see the member's time quickly.


I just tried an experiment with the posts template by adding  $context['current_time'] to the avatar area.
It screwed the post alignments up and unfortunately only displays the time according to each logged user. Everyone will see the time differently according to their own timezone settings. It does have potential to work with some code changes. I am not sure I can do that myself either. I will check with someone that may though, and get back to you if you want to try it.  :)
Title: Re: Local time in Member view
Post by: jacktheripper305 on June 01, 2009, 01:44:57 AM
I'm by no means a developer, and I know little about coding, but I have an idea; would it be possible to read the system clock for each user, and display it somehow? or would that open up too many security holes?
Title: Re: Local time in Member view
Post by: knownassociate on June 01, 2009, 01:50:12 AM
Good luck, guys, you brainstorm I'll go round up the cheerleaders. ;) I know you'll figure it out!
Title: Re: Local time in Member view
Post by: knownassociate on June 01, 2009, 02:03:56 AM
How much coffee have you drank?! :D
Title: Re: Local time in Member view
Post by: hmed2390 on June 01, 2009, 02:04:19 AM
Just enough.  :D
Title: Re: Local time in Member view
Post by: smokester on June 01, 2009, 03:24:07 AM
I'm by no means a developer, and I know little about coding, but I have an idea; would it be possible to read the system clock for each user, and display it somehow? or would that open up too many security holes?

That was my first instinct but the system clock would only reflect the time according to your own time setting and not other people's.

I just tried an experiment with the posts template by adding  $context['current_time'] to the avatar area.
It screwed the post alignments up and unfortunately only displays the time according to each logged user. Everyone will see the time differently according to their own timezone settings. It does have potential to work with some code changes. I am not sure I can do that myself either. I will check with someone that may though, and get back to you if you want to try it.  :)

Thanks as always Buster for your advice and input.  I was going to request this mod over on SMF and see what people would come up with, but after looking around at many types of forum, I have noticed that it has not been acheived anywhere I can find other than embedding a world clock via HTML.  That said you may have noticed the Countdown mod I use here that does calculate the time accurately for each member in relation with their time setting (the "CD" in the button list) that would suggest to me that a custom BBCode tag may be able to solve the problem and allow it in the signature field.  Either that or there may be a clock that can be installed seperately on the site and easily linked to?

I will chop these posts out and start another thread for this as it is quite interesting.
Title: Re: Local time in Member view
Post by: knownassociate on June 01, 2009, 10:18:04 AM
I'm way out of my element and this may have no connection at all, but remember the member maps? Did those have a local time connected to each member? Would this be usable?
Title: Re: Local time in Member view
Post by: smokester on June 01, 2009, 10:50:07 AM
I'm way out of my element and this may have no connection at all, but remember the member maps? Did those have a local time connected to each member? Would this be usable?

Do you mean this (http://www.diasfora.co.uk/index.php?topic=1084.0) thread?  That is the sort of thing I was trying with an embedded world clock.
Title: Re: Local time in Member view
Post by: busterone on June 01, 2009, 11:03:57 AM
ahh, i know what she is referring to now. I remember (you know the place. I am not sure if I should name where) We once had the google member map mod as trial. You have to install the mod and obtain a map key from google. Then set the permissions for each membergroup to be able to pin their position on the world map. There is also a permission setting for who can view the map.  That map was kinda cool, but it did not display the time zones.

It was scrapped because of conflict with other modifications I think, but that was done before I was on staff, so I am not even certain of that.
Title: Re: Local time in Member view
Post by: laama on June 01, 2009, 05:09:03 PM
Memorandum:My timezone is GMT+2

Time now:02:09 in tuesday night.
Title: Re: Local time in Member view
Post by: smokester on June 02, 2009, 04:29:18 AM
Ok, look at my sig and tell me if it is working ok please?
Title: Re: Local time in Member view
Post by: ohcheap1 on June 02, 2009, 10:33:35 AM
It is but I thought you were 4 hours ahead of me? It's 12:33pm here. I like it Smokes!! Can we use it yet?
Title: Re: Local time in Member view
Post by: smokester on June 02, 2009, 01:42:11 PM
It is but I thought you were 4 hours ahead of me? It's 12:33pm here. I like it Smokes!! Can we use it yet?

It varies depending on DST.  

It can be used but unfortunately dweez or myself will have to change them manually, as I believe only us two have the ability to handle the HTML tag.  Not a problem and if you would like to start a thread for people to opt in for it (or we can just use this one if members are aware of it), I will change theirs ASAP.  

Couple of things to take into consideration: Firstly you can choose a clock from here (http://www.clocklink.com/gallery.php) but I would advise against the bigger clocks as it will lengthen each page, secondly, I do not want to make the allowed characters to large (set to 300 at the mo, most of which will be used up by the code) so adding other quotes (they usually use a lot of characters) along with the clocks I would also advise against. Adding your normal signature image in conjunction will probably be ok, but I am not going to start trying to style them one by one (meaning where things are positioned - unless explicitly laid out for me).

Lastly, those who do opt in should state their + or - offset from GMT, and I am not promising this is going to work out ling term, as there may be issues with using so much embedded flash in regards to page load time and may affect some people's system resources.
Title: Re: Local time in Member view
Post by: smokester on June 02, 2009, 02:06:35 PM
I don't have a sig and have ever one else's sig turned off.

But if you need a hand manually change them let me know.

Oh, I forgot that some people have their view turned off.  Thanks for the offer indie but changing them is that same old chestnut of a problem we had with the arcade games hi-scores I believe.

One further thing is that after looking at just how fancy some of the clocks can be on that site, I would probably prefer that the basic digital one that I am using with a choice of colour be used, or another clock similarly as basic.
Title: Re: Local time in Member view
Post by: laama on June 02, 2009, 05:03:48 PM
Ok, look at my sig and tell me if it is working ok please?
Sorry for delay.

It works,but it is dim.
Title: Re: Local time in Member view
Post by: ohcheap1 on June 03, 2009, 02:58:09 PM
Oh, I forgot that some people have their view turned off.  Thanks for the offer indie but changing them is that same old chestnut of a problem we had with the arcade games hi-scores I believe.

One further thing is that after looking at just how fancy some of the clocks can be on that site, I would probably prefer that the basic analogue one that I am using with a choice of colour be used, or another clock similarly as basic.

I do, I do, I do!! Can you have an image put in there too? Geesh, Smokes that's alot of work to do, I would let Indie take the reigns since he sadly has an abundance of time on his hands.  :'( Me too for that matter  :'(
Title: Re: Local time in Member view
Post by: smokester on June 03, 2009, 03:23:05 PM
I do, I do, I do!! Can you have an image put in there too? Geesh, Smokes that's alot of work to do, I would let Indie take the reigns since he sadly has an abundance of time on his hands.  :'( Me too for that matter  :'(

Only those that can use the html tag can add these, which is just dweez and myself.  I meant to say "digital" not "analogue" on the last page and I have done yours now with a -5 hour offset - is that correct? 
Title: Re: Local time in Member view
Post by: ohcheap1 on June 03, 2009, 03:26:00 PM
I LOVE IT!!! THANKS SMOKES. OK, since mine is done if anyone else is interested you are allowed to request it now.  ;D
Title: Re: Local time in Member view
Post by: smokester on June 03, 2009, 03:32:03 PM
You will have to remember that you cannot now edit your own sig without losing the clock.  No biggy really as all you have to do is ask myself or dweez to re-apply the html tags to the code.
Title: Re: Local time in Member view
Post by: busterone on June 03, 2009, 09:02:56 PM
Great job Smokes.  :)
Title: Re: Local time in Member view
Post by: smokester on June 04, 2009, 02:18:15 AM
Great job Smokes.  :)

Thanks Buster, it seems to work quite well.
Title: Re: Local time in Member view
Post by: hmed2390 on June 04, 2009, 08:32:43 AM
You will have to remember that you cannot now edit your own sig without losing the clock.  No biggy really as all you have to do is ask myself or dweez to re-apply the html tags to the code.

Be that as it may, it's still awesome smokes, thanks. I really like this whole idea, makes it all the more fun when realizing who should be awake and who should be asleep. ;D
Title: Re: Local time in Member view
Post by: atomicrabbit on June 04, 2009, 12:29:00 PM
I don't know much about SMF, but isn't there a Time Offset in each user's profile?

Can't you use a bit of php to create a time based on the user's offset??  Maybe using the php date() function (http://us3.php.net/manual/en/function.date.php) with the timezone parameters. If the Time Offset value that's already in the user's profile is not enough, can't you just create a new parameter for Timezone and use that in the php code???

I don't see what the problem is to create a local time feature for each user without the help of a third party flash app. I know a lot about php, flash and javascript programming, so please feel free to ask me any questions.

Maybe once you get the timezone of the user, you can use javascript to display a real-time clock
Title: Re: Local time in Member view
Post by: smokester on June 05, 2009, 02:32:31 AM
I don't know much about SMF, but isn't there a Time Offset in each user's profile?

Can't you use a bit of php to create a time based on the user's offset??  Maybe using the php date() function (http://us3.php.net/manual/en/function.date.php) with the timezone parameters. If the Time Offset value that's already in the user's profile is not enough, can't you just create a new parameter for Timezone and use that in the php code???

I don't see what the problem is to create a local time feature for each user without the help of a third party flash app. I know a lot about php, flash and javascript programming, so please feel free to ask me any questions.

Maybe once you get the timezone of the user, you can use javascript to display a real-time clock

Thanks for the input atomicrabbit and I'm glad to have such technical advice.  I know an amount of PHP, JS etc that I could fit in an eggcup and not much else, that said, it is enough to envisage how things could possibly be done.

You would think that this would be fairly straighforward and just needs a field hacked into the sidebar/avatar section with the appropriate function attached.  But to date, in all the research I have done with this, it has never been done?  These forums have a magnitude of modifications available and I have seen this mod requested for other forums other than SMF - still it has not been acheived (although I am not suggesting that someone has tried hard enough).

Buster posted this earlier:

I just tried an experiment with the posts template by adding  $context['current_time'] to the avatar area.
It screwed the post alignments up and unfortunately only displays the time according to each logged user. Everyone will see the time differently according to their own timezone settings. It does have potential to work with some code changes. I am not sure I can do that myself either. I will check with someone that may though, and get back to you if you want to try it.  :)

and I have faith that it really isn't a gimme if he has problems getting it to work.

Do you have Apache running locally?  If so you can install 1.19 in your localhost and see if you can hack the template to get it to work.  If you do it would be a very popular modification I bet and with an added paypal donation in the script, it might be worth your while having a go?

Thanks again AR and buster, and everyone for that matter who has contributed in one way or another.

Title: Re: Local time in Member view
Post by: busterone on June 05, 2009, 07:09:25 AM
If you are up to it Atomic, I am all for it myself. My PhP skills stopped short on this. I am sure there has to be a way.
The only concern I have is how much it would pound the database on each page request, since there are already multiple functions hitting it simultaneously for each page load. On a small forum, it probably would not be too much, but on a forum with 4 thousand + page views a day, it could add up quickly.
Title: Re: Local time in Member view
Post by: smokester on June 16, 2009, 01:50:49 PM
Forget what Buster said as he has indeed come up with the solution and has incorporated it in his own place:

(http://i267.photobucket.com/albums/ii319/smokeyb53/time.jpg)

I will install it here in the morning when it is quiet - so don't forget to set your local time correctly (can be done through your profile settings).

Thanks Buster.
Title: Re: Local time in Member view
Post by: busterone on June 16, 2009, 01:56:38 PM
No problem at all. You all are welcome. I loved the idea and was determined it could be done. Thanks goes to Duncan at SMF support forum as well.  :)
Title: Re: Local time in Member view
Post by: hmed2390 on June 16, 2009, 01:58:50 PM
Awesome!

Thanks Buster, Smokes.
Title: Re: Local time in Member view
Post by: dweez on June 16, 2009, 01:59:39 PM
/me ^5's busterone
Title: Re: Local time in Member view
Post by: smokester on June 16, 2009, 02:10:33 PM
It is so easy I will do it now as it worked ok on our testing site.

Don't anyone hold their breath though..
Title: Re: Local time in Member view
Post by: smokester on June 16, 2009, 02:19:36 PM
It is done so you can all delete the clock from your sig.

Anyone experience any problems with this, please post them here.

Thanks for the effort Buster.
Title: Re: Local time in Member view
Post by: hmed2390 on June 16, 2009, 02:27:17 PM
It is done so you can all delete the clock from your sig.

Can you delete it for me?  :D ;D

Thanks again Buster.  :)
Title: Re: Local time in Member view
Post by: ohcheap1 on June 16, 2009, 03:42:38 PM
You guys are AWESOME!!! This is SO excellent. Cant think of any other cliches to type so....Thanks!
Title: Re: Local time in Member view
Post by: dweez on June 16, 2009, 03:42:54 PM
Great job everyone who was involved (I can only think of busterone and smokes off hand).
Title: Re: Local time in Member view
Post by: smokester on June 17, 2009, 04:31:23 AM
Great job everyone who was involved (I can only think of busterone and smokes off hand).

There was also a man named Duncan that was quite instrumental. 

All hail Duncan!
Title: Re: Local time in Member view
Post by: dweez on June 17, 2009, 08:15:56 AM
/me ^5's Duncan too
Title: Re: Local time in Member view
Post by: knownassociate on June 17, 2009, 09:24:20 AM
(http://2coolfishing.com/ttmbforum/images/smilies/fireworks.gif)
FireworksSee? I knew that you guys would figure it out!

Great big ATTA BOYs to the three of you, Smokes, Buster And Duncan!.

Now we shall have to come up with something perhaps a bit more difficult....anyone got an idea? ;D

Now you know why I never bothered with the one in the signature, that is how sure I was you would do it.(http://2coolfishing.com/ttmbforum/images/smilies/fireworks.gif)(http://2coolfishing.com/ttmbforum/images/smilies/fireworks.gif)(http://2coolfishing.com/ttmbforum/images/smilies/fireworks.gif)(http://2coolfishing.com/ttmbforum/images/smilies/fireworks.gif)(http://2coolfishing.com/ttmbforum/images/smilies/fireworks.gif)
Title: Re: Local time in Member view
Post by: hmed2390 on June 22, 2009, 06:46:38 AM
Now you know why I never bothered with the one in the signature, that is how sure I was you would do it.

cuz everybody loves a suck up.  ::)

 :D ;) :)
Title: Re: Local time in Member view
Post by: smokester on June 22, 2009, 03:12:42 PM
cuz everybody loves a suck up.

Change the last word and you're on the money.
Title: Re: Local time in Member view
Post by: dweez on June 22, 2009, 11:59:21 PM
Suck down?  Does that really make sense?  I guess as long as "suck" is in there somewhere.
Title: Re: Local time in Member view
Post by: hmed2390 on June 23, 2009, 01:15:42 AM
I think he meant the second to last word. :D
Title: Re: Local time in Member view
Post by: smokester on June 23, 2009, 03:59:56 PM
Suck down?  Does that really make sense?  I guess as long as "suck" is in there somewhere.

Can't remember mentioning antonyms?  "off" would have been my guess...
Title: Re: Local time in Member view
Post by: JackFrost on June 23, 2009, 04:25:35 PM
My clock is off by 2 hours...

for instance, as I type this, the local time is 3:25pm, but my clock says it's 5:25pm.

Any chance I can get that adjusted? ;D

and is there any way to add a carriage return between the clock and the personal saying?
Title: Re: Local time in Member view
Post by: smokester on June 23, 2009, 05:17:04 PM
My clock is off by 2 hours...

for instance, as I type this, the local time is 3:25pm, but my clock says it's 5:25pm.

Any chance I can get that adjusted? ;D

and is there any way to add a carriage return between the clock and the personal saying?

Ok I have done that for you.

For future reference this is something we can all do through our Profile settings.  Simply go to the "Look and Layout Preferences" section and adjust your time offset.  The forum is set to -6hrs GMT I believe so in Jack's case an offset of -2 did the trick.  If you have problems, just ask one of the staff for help.
Title: Re: Local time in Member view
Post by: JackFrost on June 24, 2009, 09:51:43 AM
Ok I have done that for you.

For future reference this is something we can all do through our Profile settings.  Simply go to the "Look and Layout Preferences" section and adjust your time offset.  The forum is set to -6hrs GMT I believe so in Jack's case an offset of -2 did the trick.  If you have problems, just ask one of the staff for help.

Sorry, I thought that was like the time thing in the signatures where we had to ask to get it added/changed...

Shoulda looked for m'self...  ;D

Oh, but how about that carriage return between the personal saying and the clock?  ;)
Title: Re: Local time in Member view
Post by: smokester on June 24, 2009, 10:22:55 AM
Oh, but how about that carriage return between the personal saying and the clock?  ;)

Ok, I've done that as I believe you wanted it.
Title: Re: Local time in Member view
Post by: JackFrost on June 24, 2009, 02:18:06 PM
Ok, I've done that as I believe you wanted it.

Awesome, that looks so much better!  ;D

Thanks, smokes!
Title: Re: Local time in Member view
Post by: ohcheap1 on August 06, 2009, 09:54:17 AM
What do we do to get our clocks on the right time? I just noticed a few that were outta sync with the old clock and didnt know how to change them. And any new members might want to get theirs accurate as well.
Title: Re: Local time in Member view
Post by: smokester on August 06, 2009, 01:43:39 PM
What do we do to get our clocks on the right time? I just noticed a few that were outta sync with the old clock and didnt know how to change them. And any new members might want to get theirs accurate as well.

Perhaps you should read the post 4 up from yours..
Title: Re: Local time in Member view
Post by: hmed2390 on August 07, 2009, 01:00:18 AM
Perhaps you should read the post 4 up from yours..

I'll be sweet and quote it just in case.  ;D :D
kidding OC.  ;) :)

Ok I have done that for you.

For future reference this is something we can all do through our Profile settings.  Simply go to the "Look and Layout Preferences" section and adjust your time offset.  The forum is set to -6hrs GMT I believe so in Jack's case an offset of -2 did the trick.  If you have problems, just ask one of the staff for help.
Title: Re: Local time in Member view
Post by: ohcheap1 on August 07, 2009, 09:29:30 AM
Perhaps you should read the post 4 up from yours..
Perhaps I should of........ :P
Title: Re: Local time in Member view
Post by: smokester on October 31, 2010, 09:30:13 AM
Simply go to the "Look and Layout Preferences" section and adjust your time offset.  The forum is set to -6hrs GMT I believe so in Jack's case an offset of -2 did the trick.  If you have problems, just ask one of the staff for help.

For those who now have to reset their local time offset according to the forums one due to daylight-saving, please refer to the quote above for help in doing so.