News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

[BETA] Timezone Select 1.0 Beta 2.1

Started by ディン1031, August 09, 2008, 05:52:12 PM

Previous topic - Next topic

ディン1031

So this is the First Beta of a Timezone Select Based Time calculation for SMF.
Why Beta? Because this mod use a converted TZ Rule Database, and I'm not 100% sure if i really use everything correct... I convert the Database from this site -> http://www.twinsun.com/tz/tz-link.htm

What does the mod do:
This mods add 402 Timezones into SMF. The Calculation of the current time is based on a correct set server. 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 board, and this will be used instead of the current time. The Mod also include the Rules for Daylight Time Saving, and i hope it work correct (i tested it, but i'm not 100% sure if everthing work correct). It's possible to disable not wanted timezones, also a way to rename them is included.

So feel free to test it, and report errors here, so that i can look for fixes =).

I Attached some pictures how the mod look like and also the Package for the first beta 8).

1.0 Beta 1.1
! Fix the small mistake in the installer =). Thx to vbgamer45

1.0 Beta 2
+ Open the UTC fix Option... never thought that i found a so terrible set server...
! Small spelling mistake fixed (secod -> second)

1.0 Beta 2.1
! Fixes some Mistakes in the TZ Database

If you like to upgrade replace the ManageTimezones.php, ManageTimezones.template.php and Subs-TimeZone.php than you're up to date ;).
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

[SiNaN]

I'll try it. But what I see from the screen shots, just awesome.
Former SMF Core Developer | My Mods | SimplePortal

Deprecated

#2
Wow! Even before I read Sinan's reply the word that popped into my head is "awesome!"

As far as I understand it, SMF has no time zones other than the admin capability to set offset from the server and members to set offset from forum time. I was expecting I would have to just manually move the whole forum one hour when daylight savings time goes off, this helping most of my members who are in the US but screwing up international members, perhaps people whose governments don't have such silly polices as believing they can save daylight, a renewable resource anyway... ;)

As far as I'm concerned this feature is a MUST HAVE for the next release of SMF because the absence of any daylight savings time handling makes the package less professional.

ETA: question withdrawn

Dragooon

Very nice!

@Deprecated, its not submitted ATM, its attached to its first post.

Deprecated

Doh! I just quit drinking coffee yesterday and my brain finds caffeine is a necessary fuel. I lost the zip link within all the jpg links. You know, forest, trees? ;)

Well I'll download the thing right now and test it! :D

Sabre™

#5
Damn!!
I really wanted to play with this, but after 2 attempts, I just cannot get it to install.
I lose the site, and this is whats displayed
Template Parse Error!
There was a problem loading the /Themes/default/languages/Modifications.english.php template or language file.
Please check the syntax and try again - remember, single quotes (') often have to be escaped with a slash (\).
To see more specific error information from PHP, try accessing the file directly..


Its a fresh install of smf 1.1.5, so Im guessing it maybe conflicting with one of the mods I have installed.
1. TinyPortal 0.983
2. Spoiler Tag 0.3.3a
3. Colorized Membergroups 1.0
4. Profile_Visitors 4.0
5. Auto Embed Video/Audio Clips 3.1.2
6. PageEar (Pagepeel) 1.1
7. Ultimate Profile


Im HOPING its a fixable conflict, and not just "My Bad Luck!!" lol
Your mod looks great btw mate :)  and I agree with Deprecated, smf should implement this feature

Cheers

P.S..
Sorry, I forgot to mention, there was something about an "unexpected "T" string"..
I forgot to copy that part over, so Im not sure on the correct text.
But if my recall is anything but loose, THATS 98% correct.
Do NOT give admin and/or ftp details to just anybody, see if they are trust worthy first!!  Do your homework ;)


Deprecated

As far as I'm concerned this is a MUST HAVE modification. If I have any trouble I'll remove all mods and install this first.

ディン1031

Quote from: Sabre™ on August 10, 2008, 07:54:14 PM
Damn!!
I really wanted to play with this, but after 2 attempts, I just cannot get it to install.
I lose the site, and this is whats displayed
Template Parse Error!
There was a problem loading the /Themes/default/languages/Modifications.english.php template or language file.
Please check the syntax and try again - remember, single quotes (') often have to be escaped with a slash (\).
To see more specific error information from PHP, try accessing the file directly..


Its a fresh install of smf 1.1.5, so Im guessing it maybe conflicting with one of the mods I have installed.
1. TinyPortal 0.983
2. Spoiler Tag 0.3.3a
3. Colorized Membergroups 1.0
4. Profile_Visitors 4.0
5. Auto Embed Video/Audio Clips 3.1.2
6. PageEar (Pagepeel) 1.1
7. Ultimate Profile


Im HOPING its a fixable conflict, and not just "My Bad Luck!!" lol
Your mod looks great btw mate :)  and I agree with Deprecated, smf should implement this feature

Cheers

P.S..
Sorry, I forgot to mention, there was something about an "unexpected "T" string"..
I forgot to copy that part over, so Im not sure on the correct text.
But if my recall is anything but loose, THATS 98% correct.
<file name="$languagedir/Modifications.english.php">
<operation>
<search position="end"></search>
<add><![CDATA[
//Timezone Setting
$txt['manage_timezones'] = 'Timezones';
$txt['timezones_desc'] = 'Manage the Timezones';
$txt['timezones_settings_desc'] = 'Here you can set everything based on timezone based timecalculation.';
$txt['timezones_settings'] = 'Settings';
$txt['timezones_enable'] = 'Enable the Timezone System';
$txt['timezones_standard'] = 'Standard Timezone';
$txt['timezones_none'] = 'No Standard Timezone';
$txt['timezones_info_desc'] = 'Timezone infomation about this server.';
$txt['timezones_info'] = 'Informations';
$txt['timezones_nothing'] = 'No Standard Timezone';
$txt['timezones_useStandard'] = 'Use the standard timezone instead of over time offset';
$txt['timezones_enableRegister'] = 'Select Timezone on Registration';
$txt['timezones_search'] = 'Search the Timezone';
$txt['timezones_search_short'] = 'Search';
$txt['timezones_search_desc'] = 'Search for timezones to edit the the name or disable them';
$txt['timezones_includeDisabled'] = 'Include Disabled Timeszones';
$txt['timezones_searchFor'] = 'Search for';
$txt['timezones_noTimezonesFound'] = 'Sorry, no timezone found';
$txt['timezones_clickNameReturn'] = 'Click on the name, than you will return to the last page you visited and the selected zone should be selected';
$txt['timezones_show_worldpart'] = 'Show Timezones for';
$txt['timezones_utcFix'] = 'UTC Timefix in Seconds';
$txt['timezones_selectField'] = 'Format for the Select Pulldown';
$txt['timezones_tryDetectZone'] = 'Try to detect user timezone';
$txt['timezones_forumStandard'] = 'Forum Standard Timezone';
$txt['timezones_select_zone'] = 'Select your Timezone';
$txt['timezones_unkown'] = 'Unkown';
$txt['timezones_DST_Update'] = 'Next daylight saving update';
$txt['timezones_DST_NoUpdate'] = 'No daylight saving';
$txt['timezones_timeInformations'] = 'Current Timezone Informations';
$txt['timezones_servertime'] = 'Current Servertime';
$txt['timezones_utctime'] = 'Calculated UTC Time';
$txt['timezones_utctimefix_before'] = 'This time have a';
$txt['timezones_utctimefix_after'] = 'secods fix included.';
$txt['timezones_smftime'] = 'SMF Time settings';
$txt['timezones_timezoneEnabled'] = 'Timezones system is <b>enabled</b>';
$txt['timezones_timezoneDisabled'] = 'Timezones system is <b>disabled</b>';
$txt['timezones_calculatedSMFTime'] = 'Calculated Standard zone time';
$txt['timezones_calculatedSMFZone'] = 'Current SMF Standard Timezone';
$txt['timezones_calculatedSMFDTS'] = 'Next calculated daylight saving update';
$txt['timezones_standaradtime'] = 'Timeinformations about the Server';
$txt['timezones_DisableAll'] = 'Disable all timezones for';
$txt['timezones_EnableAll'] = 'Enable all timezones for';
$txt['timezones_edit'] = 'Edit Timezone Infomation';
$txt['timezones_zone'] = 'Timezone name';
$txt['timezones_comment'] = 'Timezone comment';
$txt['timezones_save'] = 'Save Timezone';
$txt['timezones_disableTimezone'] = 'Disable Timezone';


//Please don't forget the %yearVersion it's needed for show the tz database version
$txt['timezones_information_about'] = '
The Time Zone script is based on a correct calculated <a href="http://en.wikipedia.org/wiki/UTC">UTC</a>
time, so please check if this time is correct outputed.
All the rules for the timezone daylight saving are based on the Unix TZ Database, for more informationes
about this go to this page <a href="http://www.twinsun.com/tz/tz-link.htm">http://www.twinsun.com/tz/tz-link.htm</a>.
This tool will only calculate DTS for the year %yearVersion and higher, and it will ignore all &quot;only&quot; and &quot;old years&quot; rules.';

//Timezone Listentries
$txt['timezones_name'] = 'Name';
$txt['timezones_worldpart'] = 'Worldpart';
$txt['timezones_city_land'] = 'City/Land';
$txt['timezones_country_name'] = 'Country';
$txt['timezones_country_code'] = 'Short';
$txt['timezones_designator'] = 'Designator';
$txt['timezones_offset'] = 'Offset';
$txt['timezones_dst'] = 'DST';
$txt['timezones_dst_yes'] = 'Yes';
$txt['timezones_dst_no'] = 'No';
$txt['timezones_disabled'] = 'disabled';

//Worldpartslists
$txt['timezones_Africa'] = 'Africa';
$txt['timezones_America'] = 'America';
$txt['timezones_Antarctica'] = 'Antarctica';
$txt['timezones_Arctic'] = 'Arctic';
$txt['timezones_Asia'] = 'Asia';
$txt['timezones_Atlantic'] = 'Atlantic';
$txt['timezones_Australia'] = 'Australia';
$txt['timezones_Europe'] = 'Europa';
$txt['timezones_Indian'] = 'Indian';
$txt['timezones_Pacific'] = 'Pacific';
]]></add>

Can you post you modification.english.php? :X
Normal there should be no error...

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™

Thanks mate, I located and fixed the problem.

When adding my own text for another mod, I forgot to add   ;  to finish it :D lol

This mod is great!!
Thanks champ :)
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 August 11, 2008, 04:55:48 AM
Thanks mate, I located and fixed the problem.

When adding my own text for another mod, I forgot to add   ;  to finish it :D lol

This mod is great!!
Thanks champ :)
Good to hear =).

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


vbgamer45

Awesome idea for a mod!

Saw one thing in install file

CREATE TABLE IF NOT EXISTS smf_timezone_dtsrules

Should use db_prefix
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

ディン1031

Quote from: vbgamer45 on August 17, 2008, 09:41:05 PM
Awesome idea for a mod!

Saw one thing in install file

CREATE TABLE IF NOT EXISTS smf_timezone_dtsrules

Should use db_prefix
Oh did i overseen that :D

Thanks i will fix it asap =).

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

ディン1031

#13
1.0 Beta 2
+ Open the UTC fix Option... never thought that i found a so terrible set server...
! Small spelling mistake fixed (secod -> second)

1.0 Beta 2.1
! Fix some Mistakes in the TZ Database

If you like to upgrade replace the ManageTimezones.php, ManageTimezones.template.php and Subs-TimeZone.php than you're up to date ;).

To Update the Datbase on old betas, use the attached script.

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™

Hi champ.
Where does this go??
"UpdateTZDBtoBeta2.1.php"

Sorry, but I dont know
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 August 21, 2008, 08:29:55 PM
Hi champ.
Where does this go??
"UpdateTZDBtoBeta2.1.php"

Sorry, but I dont know
Only unpack it and upload the php file into the forum base directory and call the php file with the browser =).
Than it will upgrade the data :).

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

ディン1031

Updated the mod so that it also work in 1.1.6 =).

If nothing occur until next month, than i think i can release it as mod =).

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



ディン1031

I think no problems until now, it's time to prepare an release for this mod. :)

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™

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


StaticFX

I used the Package install... worked PERFECTLY

Excellent work!!! Time for Release!


ディン1031

I found a small bug on the automatic server dts update, i need to fix that first ;).
Than i can release 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™

Hi mate, Im having trouble uninstalling this manually. (had a bad backup, now reinstalling everything)
I removed everything, and lost my site. Every page was a white screen.
On my second attempt, I removed each template individually, and it wasnt until I removed the 2 in the source file till I got the blank pages again.
I re inserted all again manually, and have come to ask what I missed.

For the db, I just dropped the tables, is this correct, or do I need to run a query or something?

So when the tables are dropped, and all files removed, I lose the site.

Any/all assistance is appreciated
Thanks for you time :)

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 05, 2008, 12:53:04 PM
Hi mate, Im having trouble uninstalling this manually. (had a bad backup, now reinstalling everything)
I removed everything, and lost my site. Every page was a white screen.
On my second attempt, I removed each template individually, and it wasnt until I removed the 2 in the source file till I got the blank pages again.
I re inserted all again manually, and have come to ask what I missed.

For the db, I just dropped the tables, is this correct, or do I need to run a query or something?

So when the tables are dropped, and all files removed, I lose the site.

Any/all assistance is appreciated
Thanks for you time :)

regards
Why did you not use the uninstall feature of the mod?

Hmmm there are many possibilites why this could happen id that you could remove to much.
I would say as first step remove that what the mod install and if you do all correct than the forums should normal work. Do not remove files or tables before you not removed all changes of the .mod 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™

My latest, and only backup of my site was corrupt, so this and other mods are incomplete and dont have the uninstall feature :-/
If I recall, the mod only touches the language files, and inserts 2 templates into the sources dir, and 1 into the default theme... correct?
I have tried removing the 3 templates a few times now, leaving the db untouched, and Im still getting blank pages.
As long as I leave the Subs-TimeZone template in the source dir, the site will be ok.
Any ideas why?

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


ディン1031

#26
Quote from: Sabre™ on November 06, 2008, 06:07:08 AM
My latest, and only backup of my site was corrupt, so this and other mods are incomplete and dont have the uninstall feature :-/
If I recall, the mod only touches the language files, and inserts 2 templates into the sources dir, and 1 into the default theme... correct?
I have tried removing the 3 templates a few times now, leaving the db untouched, and Im still getting blank pages.
As long as I leave the Subs-TimeZone template in the source dir, the site will be ok.
Any ideas why?

Thanks mate :)
It's because the mod change more things :)

Look into the TimezonesSelect1.1.x.mod there are many change for the source, too.
For example permissions, the subs file loading (a important file for the mod) ;).

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™

Ahhh ok, cheers.
I will have to have another look.
Thanks mate, I'll get back to ya with my result lol ;)
Do NOT give admin and/or ftp details to just anybody, see if they are trust worthy first!!  Do your homework ;)


ディン1031

So i finally released the mod at the mod site, it will take some time until it will be shown, but if this happen than i will close the thread and the support moves to that thread ;). (I will also remove the package file from this thread).

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

Burke ♞ Knight

#29
Din,

When the admin sets the default timezone, then a member sets the timezone in his profile, it reverses what the set timezone is. Example:

Admin has set to New York, Eastern Time. Time is November 13, 2008, 07:51:56 AM

Member sets timezone in his profile to New York, Eastern Time. Time is November 13, 2008, 12:51:56 PM

There should be way to have it so if the member selects the same timezone as the admin has preset that it does not conflict like that.

Basically, it seems to just un-do the timesetting, and shows the UTC time to the member.
Yes, this is on a test site, not an active site. ;)

Other than that, this mod is great, and no other problems. :)

ディン1031

Quote from: BurkeKnight on November 13, 2008, 07:56:25 AM
Din,

When the admin sets the default timezone, then a member sets the timezone in his profile, it reverses what the set timezone is. Example:

Admin has set to New York, Eastern Time. Time is November 13, 2008, 07:51:56 AM

Member sets timezone in his profile to New York, Eastern Time. Time is November 13, 2008, 12:51:56 PM

There should be way to have it so if the member selects the same timezone as the admin has preset that it does not conflict like that.

Basically, it seems to just un-do the timesetting, and shows the UTC time to the member.
Yes, this is on a test site, not an active site. ;)

Other than that, this mod is great, and no other problems. :)
Huu, normal it should irgnore the forums default.
But if you right than the bug is in the final, too (I was sure that i tested this).
But i will look into it ;).

(My to do list is so long know *g*, time to reduce it) :X.
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

ディン1031

Quote from: BurkeKnight on November 13, 2008, 07:56:25 AM
Din,

When the admin sets the default timezone, then a member sets the timezone in his profile, it reverses what the set timezone is. Example:

Admin has set to New York, Eastern Time. Time is November 13, 2008, 07:51:56 AM

Member sets timezone in his profile to New York, Eastern Time. Time is November 13, 2008, 12:51:56 PM

There should be way to have it so if the member selects the same timezone as the admin has preset that it does not conflict like that.

Basically, it seems to just un-do the timesetting, and shows the UTC time to the member.
Yes, this is on a test site, not an active site. ;)

Other than that, this mod is great, and no other problems. :)
This is a mistake on my installer... i add an unsigned where i should not add it... (It's since the the first beta wrong xD, and i did not test it on my finished final installer.)

To fix this use on phpMyAdmin follow command:

ALTER TABLE `{$db_prefix}portalmembers` CHANGE `timezone_offset` `timezone_offset` INT( 10 ) NOT NULL 

The {$db_prefix} must be replaced with you prefix for the database.

You can also only remove the unsigned option on the field "timezone_offset" with the edit function.

I really did only use positive values so i could not see this bug oO. (And it's so long out now xD.).

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

Burke ♞ Knight

Did you fix the submitted package?
If so, I'll be eagerly awaiting it's approval. :)

Costa

ディン1031, awesome!
If you want one translation to Portuguese please, post here
I'll test this in my forum (with backup :P )

Wich versions of SMF this work?

Farewell
- Costa
Hugo "Costa" Fernandes - PT SMF
Todas as MP's a pedir ajuda são sujeitas a radioactividade, microondas, queimadas e atiradas borda fora.

"At least someone appreciates the fact that I am doing and not thinking..."
"Laziness is counter-revolutionary."

ディン1031

#34
@Costa: Please wait until the offical release on the costumize site :). (Than i'm happy with every translation i get, i add some new part to it for the final release.)
@BurkeKnight: I fixed it only the submitted package, because why should i update the beta... when i'm waiting for the approve :)

http://custom.simplemachines.org/mods/index.php?mod=1504 <- this will be the link if the mod is approved. :)

(But i will post it again when it is approved) :D

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

Costa

Hugo "Costa" Fernandes - PT SMF
Todas as MP's a pedir ajuda são sujeitas a radioactividade, microondas, queimadas e atiradas borda fora.

"At least someone appreciates the fact that I am doing and not thinking..."
"Laziness is counter-revolutionary."

ディン1031

So the final release is done.

You can download the mod now here and the official support for it goes also to that topic.

http://custom.simplemachines.org/mods/index.php?mod=1504

Topic Solved, Thread Closed.

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

Advertisement: