Author Topic: Local time in Member view  (Read 33393 times)

0 Members and 1 Guest are viewing this topic.

Offline busterone

  • Australopithecus
  • *
  • Posts: 54
  • Gender: Male
  • Awaholi Gihli
Re: Local time in Member view
« Reply #30 on: June 03, 2009, 09:02:56 PM »
Great job Smokes.  :)

Offline smokester

  • Administrator
  • Q
  • *
  • Posts: 15835
  • Gender: Male
  • Da mihi castitatem et continentiam, sed noli modo!
Re: Local time in Member view
« Reply #31 on: June 04, 2009, 02:18:15 AM »
Great job Smokes.  :)

Thanks Buster, it seems to work quite well.
Don't put off until tomorrow, what you can put off until the day after.

There is an exception to every rule, apart from this one.

Offline hmed2390

  • Human
  • *****
  • Posts: 1980
  • Gender: Male
  • Oh boy what a big mess, even Mickey's on acid!
Re: Local time in Member view
« Reply #32 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
A person who won't read has no advantage over one who can't read. -Mark Twain

Offline atomicrabbit

  • Australopithecus
  • *
  • Posts: 12
Re: Local time in Member view
« Reply #33 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 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

Offline smokester

  • Administrator
  • Q
  • *
  • Posts: 15835
  • Gender: Male
  • Da mihi castitatem et continentiam, sed noli modo!
Re: Local time in Member view
« Reply #34 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 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.

Don't put off until tomorrow, what you can put off until the day after.

There is an exception to every rule, apart from this one.

Offline busterone

  • Australopithecus
  • *
  • Posts: 54
  • Gender: Male
  • Awaholi Gihli
Re: Local time in Member view
« Reply #35 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.

Offline smokester

  • Administrator
  • Q
  • *
  • Posts: 15835
  • Gender: Male
  • Da mihi castitatem et continentiam, sed noli modo!
Re: Local time in Member view
« Reply #36 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:



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.
Don't put off until tomorrow, what you can put off until the day after.

There is an exception to every rule, apart from this one.

Offline busterone

  • Australopithecus
  • *
  • Posts: 54
  • Gender: Male
  • Awaholi Gihli
Re: Local time in Member view
« Reply #37 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.  :)

Offline hmed2390

  • Human
  • *****
  • Posts: 1980
  • Gender: Male
  • Oh boy what a big mess, even Mickey's on acid!
Re: Local time in Member view
« Reply #38 on: June 16, 2009, 01:58:50 PM »
Awesome!

Thanks Buster, Smokes.
A person who won't read has no advantage over one who can't read. -Mark Twain

Offline dweez

  • Global Moderator
  • Q
  • *
  • Posts: 11610
  • Gender: Male
  • Rebel Mod
Re: Local time in Member view
« Reply #39 on: June 16, 2009, 01:59:39 PM »
* dweez ^5's busterone
--dweez

Offline smokester

  • Administrator
  • Q
  • *
  • Posts: 15835
  • Gender: Male
  • Da mihi castitatem et continentiam, sed noli modo!
Re: Local time in Member view
« Reply #40 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..
Don't put off until tomorrow, what you can put off until the day after.

There is an exception to every rule, apart from this one.

Offline smokester

  • Administrator
  • Q
  • *
  • Posts: 15835
  • Gender: Male
  • Da mihi castitatem et continentiam, sed noli modo!
Re: Local time in Member view
« Reply #41 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.
Don't put off until tomorrow, what you can put off until the day after.

There is an exception to every rule, apart from this one.

Offline hmed2390

  • Human
  • *****
  • Posts: 1980
  • Gender: Male
  • Oh boy what a big mess, even Mickey's on acid!
Re: Local time in Member view
« Reply #42 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.  :)
A person who won't read has no advantage over one who can't read. -Mark Twain

Offline ohcheap1

  • Q
  • *
  • Posts: 19082
  • Gender: Female
Re: Local time in Member view
« Reply #43 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!

Offline dweez

  • Global Moderator
  • Q
  • *
  • Posts: 11610
  • Gender: Male
  • Rebel Mod
Re: Local time in Member view
« Reply #44 on: June 16, 2009, 03:42:54 PM »
Great job everyone who was involved (I can only think of busterone and smokes off hand).
--dweez