News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Timezone Select (include automatic DST correction) (V1.1.2)

Started by ディン1031, November 19, 2008, 04:24:07 AM

Previous topic - Next topic

ディン1031

Link to Mod

This mods add 402 Timezones into SMF. The Calculation of the current time is based on a correct set server time. It try to calculate the UTC time and after that it add the offset to the user time. You can also select a Timezone for the complete forum, and this will be used instead of the current time. The Mod also include the Rules for Daylight Saving Time. It's possible to disable not wanted timezones and also a way to rename them is included.

All timezones and rules are based on informations from the page http://www.twinsun.com/tz/tz-link.htm and converted into a readable database version.

The mod store the important and often used data into the member table and in the $user_info. With that most time no extra queries needed for the calculation, only on DST Updates this is needed.

Current Supported Language: English (utf8) and Deutsch (German) (utf8)

I thank everyone who made the beta tests with the mod.

If you like to donate me some Money. Click Here



Version 1.0.0 (06.11.08)
!*+- First Release Public


Version 1.0.0 (10.11.08)
Updated for 1.1.7 ;)


Version 1.0.1 (13.11.08)
! Fixed the bug with the unsigned field (I need a unsigned version) (Negative Time offset work now like it should)
! Fixed a spell mistake on English Translation.


Version 1.0.2 (16.11.08)
! Replace all & into & better for HTML output
! Correct typo in options
! No HTML in page titles
* Removed some XHTML problems
* Better readable code... (i don't think so, but okay... :P)


Version 1.0.3 (19.11.08)
! Forgotten </tr> on Search and List Page insert
! English Spelling mistakes fixed
! Forgotten <b> on Profile Page


Version 1.0.6 (03.12.08)
! Fixed a php bug that only happen on Server with DST, with that the last Sunday couldn't calculated (European Server often have this problem!)
- Upgrade included


Version 1.0.8 (08.12.08)
! Eval bug on default and not set timezones
! Eval bug on enabled but not set default timezone or never set option settings.
! Profile page changes reset the timezone (fixed)


Version 1.1.0 (04.02.09)
! Fixed the sometimes not correct Local User Time... at profile page
+ Add the Replace for the %Z with the user based timezone short cut (Work on server time only if it enabled to fix the server time)


Version 1.1.1 (06.02.09)
! Fixed Database Entries
+ Add ETC master zone, with that you can also select and utc+ based time =).
- Upgrade included



Legend:
! Bugfix
+ New Features
* Changed
- Info Only
Support only via MOD Thread! NO PM Support!
My Forum: ayu][kult Forum
My Mods: My Small Mod Collection
My Parser: DIN1031's ModParser
Current Info: More away the next days, because i've to much work to do :x

Sabre™

#1
Good stuff mate, great to see it finally accepted.
Installing on another forum.

Thanks :)


EDIT:
getting this error on install
13.  Execute Modification  TimezonesSelectEnglish-utf8.xml  Modification parse error
14. Execute Modification - Modification parse error
Do NOT give admin and/or ftp details to just anybody, see if they are trust worthy first!!  Do your homework ;)


ディン1031

#2
Quote from: Sabre™ on November 19, 2008, 04:39:16 AM
Good stuff mate, great to see it finally accepted.
Installing on another forum.

Thanks :)


EDIT:
getting this error on install
13.  Execute Modification  TimezonesSelectEnglish-utf8.xml  Modification parse error
14. Execute Modification - Modification parse error

Hmmm strange at morning it work fine, but i will test it later at home after my work and study :).

Bye
DIN1031
Support only via MOD Thread! NO PM Support!
My Forum: ayu][kult Forum
My Mods: My Small Mod Collection
My Parser: DIN1031's ModParser
Current Info: More away the next days, because i've to much work to do :x

PLAYBOY

Well, it looks like a nice mod. But i have some concerns,

1- We need it for 2.x also :)
2- It should support more languages or at least English (Normal, not UTF8)
3- I can translate it to turkish if you write what i should translate here.

Thank you. Seems like a nice work.

Qayyom Ashraf

I am using SMF 1.1.7 with default theme, and during installation facing these errors

Please guide me to solve the problem

Qayyom Ashraf  |  Karachi-PK |::.www.JangForum.Com.::|


ディン1031

#6
Quote from: qayyom on November 19, 2008, 09:15:22 AM
I am using SMF 1.1.7 with default theme, and during installation facing these errors

Please guide me to solve the problem
Quote from: Sabre™ on November 19, 2008, 04:39:16 AM
Good stuff mate, great to see it finally accepted.
Installing on another forum.

Thanks :)


EDIT:
getting this error on install
13.  Execute Modification  TimezonesSelectEnglish-utf8.xml  Modification parse error
14. Execute Modification - Modification parse error

So Please used the fixed version... i forgot each time to test it on an Linux system with a case sensitive file system. The 1.0.3 Fix should work now ;).

Quote from: PLAYBOY on November 19, 2008, 06:40:31 AM
Well, it looks like a nice mod. But i have some concerns,

1- We need it for 2.x also :)
2- It should support more languages or at least English (Normal, not UTF8)
3- I can translate it to turkish if you write what i should translate here.

Thank you. Seems like a nice work.
English is standard ?_?. And Supported. Other languages will come (Manu0875 currently work on the German Version).

If you give me an Turkish Translation than i can insert it. You need only to translate the TimezonesSelectEnglish.xml or TimezonesSelectEnglish-utf8.xml to your language.

The Database itself could be a problem, i think it's hard to translate all the 402 Timezones... but you can change it to anyway you like (The option is available for this) ;).

The SMF 2.0.x compatible Version will come sometime later at the moment I've a lot of other stuff to do.

Bye
DIN1031
Support only via MOD Thread! NO PM Support!
My Forum: ayu][kult Forum
My Mods: My Small Mod Collection
My Parser: DIN1031's ModParser
Current Info: More away the next days, because i've to much work to do :x

Sabre™

#7
Thanks mate :)

I got an error on the load.php and inserted where code was modified by other mods, except one section toward the end.

I had no idea how to integrate this with what had already been modified, could you look at it and add this part for me please
//Fix the local time :)
if(!empty($modSettings['timezones_enable']))
$memberContext[$user]['local_time'] = local_userTime($user);

return true;
}

// Load a theme, by ID.


You will see what I mean when you look at it.

Thank you :)
Do NOT give admin and/or ftp details to just anybody, see if they are trust worthy first!!  Do your homework ;)


ディン1031

#8
Quote from: Sabre™ on November 19, 2008, 04:30:52 PM
Thanks mate :)

I got an error on the load.php and inserted where code was modified by other mods, except one section toward the end.

I had no idea how to integrate this with what had already been modified, could you look at it and add this part for me please
//Fix the local time :)
if(!empty($modSettings['timezones_enable']))
$memberContext[$user]['local_time'] = local_userTime($user);

return true;
}

// Load a theme, by ID.


You will see what I mean when you look at it.

Thank you :)
In your case

Search for

return true;
}


//This is the universial load colors function, can be used by each person who need it :)
//I think it's intressting for mod Creators =D
//SMF 1.1.x Version


And replace with


//Fix the local time :)
if(!empty($modSettings['timezones_enable']))
$memberContext[$user]['local_time'] = local_userTime($user);

return true;
}


//This is the universial load colors function, can be used by each person who need it :)
//I think it's intressting for mod Creators =D
//SMF 1.1.x Version


Hmm the problem here is this is the best search part that i can use to add this... (One of my own mods use the same possition *drop*).

But i think i will change the way of insert in the next days so that this could not happen any more :)

Bye
DIN1031
Support only via MOD Thread! NO PM Support!
My Forum: ayu][kult Forum
My Mods: My Small Mod Collection
My Parser: DIN1031's ModParser
Current Info: More away the next days, because i've to much work to do :x

Sabre™

#9
Thanks mate :)

I am now getting this error when I view my profile summary
Undefined variable: user
File: /******/Sources/Subs-TimeZone.php
Line: 592


I have not touched this template.
Any ideas whats wrong?>

I have attached my profile template incase you need to look at its layout also.

Thank You :)

Do NOT give admin and/or ftp details to just anybody, see if they are trust worthy first!!  Do your homework ;)


ディン1031

Quote from: Sabre™ on November 20, 2008, 03:27:11 PM
Thanks mate :)

I am now getting this error when I view my profile summary
Undefined variable: user
File: /******/Sources/Subs-TimeZone.php
Line: 592


I have not touched this template.
Any ideas whats wrong?>

I have attached my profile template incase you need to look at its layout also.

Thank You :)
Uhhh so long beta testing and no one did have this error oO.
Okay you found a bug, i will fix it.

Bye
DIN1031
Support only via MOD Thread! NO PM Support!
My Forum: ayu][kult Forum
My Mods: My Small Mod Collection
My Parser: DIN1031's ModParser
Current Info: More away the next days, because i've to much work to do :x

Sabre™

Oh ok.
ummm..  sorry??  lol
Glad we've found it now, as only 90 people will need to update the fix.

Thank You for your assistance ディン1031 :)
Do NOT give admin and/or ftp details to just anybody, see if they are trust worthy first!!  Do your homework ;)


ディン1031

Quote from: Sabre™ on November 21, 2008, 01:20:17 AM
Oh ok.
ummm..  sorry??  lol
Glad we've found it now, as only 90 people will need to update the fix.

Thank You for your assistance ディン1031 :)
Yeah but i will make it easy for them ;D



Version 1.0.4 (21.11.08)
! Remove the eval $user error on local_userTime
! Moved the Position for local_userTime load, make it more compatible to other mods
! Add the missing Help text item

Upgrade included ;).
Support only via MOD Thread! NO PM Support!
My Forum: ayu][kult Forum
My Mods: My Small Mod Collection
My Parser: DIN1031's ModParser
Current Info: More away the next days, because i've to much work to do :x

Sabre™

I have the site time set to Hong Kong, and if anyone chooses any zone in Australia, Asia, America and Europe(maybe others, but that is all Ive checked) they cannot access their profile summary page, and receive this error message
Database Error: Unknown column 'Europe' in 'field list'
File: ******/Sources/Subs.php
Line: 634


and the other zones etc etc..
Some zones are ok and work fine.

This occurred after the new update.
So I uninstalled, went in via phpmyadmi and saw the tables still there, so I dropped them, then reinstalled, and its still the same.

Any ideas mate?

regards
Do NOT give admin and/or ftp details to just anybody, see if they are trust worthy first!!  Do your homework ;)


ディン1031

Quote from: Sabre™ on November 21, 2008, 04:31:28 PM
I have the site time set to Hong Kong, and if anyone chooses any zone in Australia, Asia, America and Europe(maybe others, but that is all Ive checked) they cannot access their profile summary page, and receive this error message
Database Error: Unknown column 'Europe' in 'field list'
File: ******/Sources/Subs.php
Line: 634


and the other zones etc etc..
Some zones are ok and work fine.

This occurred after the new update.
So I uninstalled, went in via phpmyadmi and saw the tables still there, so I dropped them, then reinstalled, and its still the same.

Any ideas mate?

regards
Okay i must look into this, thats really strange... but i will try to narrow down why this happen.

Bye
DIN1031
Support only via MOD Thread! NO PM Support!
My Forum: ayu][kult Forum
My Mods: My Small Mod Collection
My Parser: DIN1031's ModParser
Current Info: More away the next days, because i've to much work to do :x

Sabre™

Yeah, I restored the forum to an old backup, then installed the updated mod again.
Same thing.
So I reinstalled the old backup again, and installed the old package, the subs-timezone error occured again, but everything worked fine.
I even tried installing the new subs-timezone file over the old lol
As expected, I received the above error.

Be great when you find the problem mate :)
Happy hunting lol ;)
Do NOT give admin and/or ftp details to just anybody, see if they are trust worthy first!!  Do your homework ;)


ディン1031

Quote from: Sabre™ on November 23, 2008, 04:14:11 AM
Yeah, I restored the forum to an old backup, then installed the updated mod again.
Same thing.
So I reinstalled the old backup again, and installed the old package, the subs-timezone error occured again, but everything worked fine.
I even tried installing the new subs-timezone file over the old lol
As expected, I received the above error.

Be great when you find the problem mate :)
Happy hunting lol ;)
This error is since the beta 2 in it oO but there was a other bug who not load this bug xD.

But now it work fine :)

Version 1.0.5 (23.11.08)
! Fixed the not correct sql table format
! Fixed the not escaped timezone name
- Upgrade included :)
Support only via MOD Thread! NO PM Support!
My Forum: ayu][kult Forum
My Mods: My Small Mod Collection
My Parser: DIN1031's ModParser
Current Info: More away the next days, because i've to much work to do :x

Sabre™

#17
Unknown column 'America' in 'field list'
File: ****/htdocs/Sources/Subs.php
Line: 634


For the db, there are only 2 tables to remove when I restore my forum yeah?
There isnt another edit to the db Im missing?

Just trying to think of why this is happening.

Ive never had the beta version on this forum. Its a new setup, probably a week and a half old.

Cheers
Do NOT give admin and/or ftp details to just anybody, see if they are trust worthy first!!  Do your homework ;)


ディン1031

#18
Quote from: Sabre™ on November 23, 2008, 04:22:26 PM
Unknown column 'America' in 'field list'
File: ****/htdocs/Sources/Subs.php
Line: 634


For the db, there are only 2 tables to remove when I restore my forum yeah?
There isnt another edit to the db Im missing?

Just trying to think of why this is happening.

Ive never had the beta version on this forum. Its a new setup, probably a week and a half old.

Cheers
Normal this should fixed now, because it update the datbase oO.
It will alter the missing tables... hmmm i think i'm a idiot...
Did i forgot to update the master files *gohiddingsomewhere*

So i updated the packaged so that the correct Subs-Timezone.php is in it.
If someone not use the Upgrade function update only that file.

Bye
DIN1031
Support only via MOD Thread! NO PM Support!
My Forum: ayu][kult Forum
My Mods: My Small Mod Collection
My Parser: DIN1031's ModParser
Current Info: More away the next days, because i've to much work to do :x

Sabre™

Quote from: ディン1031 on November 24, 2008, 01:00:12 AM
Did i forgot to update the master files *gohiddingsomewhere*

lol
Good job mate!!
NO ERRORS!! lol

Thank You for your assistance mate, a brilliant mod that should be considered for the next SMF version.

Cheers :)
Do NOT give admin and/or ftp details to just anybody, see if they are trust worthy first!!  Do your homework ;)


Advertisement: