Simple Machines Community Forum

Customizing SMF => Modifications and Packages => Topic started by: wintstar on October 26, 2021, 02:29:18 PM

Title: Priority timezones plus
Post by: wintstar on October 26, 2021, 02:29:18 PM
Link to the mod (https://custom.simplemachines.org/index.php?mod=4297)

Priority timezones plus

This mod displays in the profile of the member (Time zone) and in the Admin Center in the setting "Forum default timezone" (Configuration => Features and Options) shows the timezone with city names. By entering the 2-character ISO country code (Show timezones of these countries first) they will be displayed first in the dropdown
of the server's time zone.

With this mod it will be easier for those who are not so often on the Internet to set the correct time zone.

Live Demo click here (https://www.stephan-frank.de/board/mod.php).

Many thanks to Sesquipedalian (https://www.simplemachines.org/community/index.php?topic=578597.msg4096468#msg4096468)

Requirement for the installation is SMF 2.1.RC4 and php 7.2 or higher

Changelog
v1.1
Bug missing globale $txt solved. Many thanks to Sesquipedalian (https://www.simplemachines.org/community/index.php?topic=579413.msg4101706#msg4101706)
Title: Re: Priority timezones plus
Post by: Shambles on October 26, 2021, 04:50:25 PM
Quote from: wintstar... for those who are not so often on the Internet ...

Who are these people?   ???  :o
Title: Re: Priority timezones plus
Post by: wintstar on October 26, 2021, 06:44:28 PM
Quote from: Shambles on October 26, 2021, 04:50:25 PM
Quote from: wintstar... for those who are not so often on the Internet ...

Who are these people?   ???  :o

Is this an error message? Please post here only sensibly useful contributions and post your question in another topic.
Title: Re: Priority timezones plus
Post by: Sesquipedalian on October 30, 2021, 02:05:24 PM
You might want to make this change, @wintstar:

Code (Find) Select
global $tztxt;
Code (Replace) Select
global $tztxt, $txt;
That will display the localized version of the city name rather than the raw TZID value. For example:
Before: [UTC+02:00] - Europe/Busingen (CEST/CET)
After:  [UTC+02:00] - B├╝singen (CEST/CET)
Title: Re: Priority timezones plus
Post by: wintstar on October 30, 2021, 06:26:57 PM
Quote from: Sesquipedalian on October 30, 2021, 02:05:24 PMCode (Find) Select Expand
global $tztxt;Code (Replace) Select Expand
global $tztxt, $txt;

Thank you @Sesquipedalian for pointing this out. Will create an update for the mod.
Title: Re: Priority timezones plus
Post by: wintstar on November 03, 2021, 09:12:24 AM
Priority timezones plus Mod updated to v1.1.

Changelog
v1.1
Bug missing globale $txt solved. Many thanks to Sesquipedalian (https://www.simplemachines.org/community/index.php?topic=579413.msg4101706#msg4101706)