Категории
Уведомление:подпишитесь Заходите к нам в Telegram-чат
Skripters » XenForo » User Date/Time Format Settings 1.0.2

User Date/Time Format Settings 1.0.2

SaNcHeS
Опубликовано 5-02-2021, 14:42

Данное дополнение позволяет пользователям изменять настройки формата даты и времени.

Добавляет два новых пользовательских поля. Они оба необязательны и применяются индивидуально.

Оба поля по умолчанию включены для отображения при регистрации пользователя, так как форматы даты / времени могут быть очень важны для пользователей. Если это не требуется, это можно отключить в настройках полей.






Полное описание на английском


My first addon, targeted at my own annoyance for being dependent on the Language options for date and time formats.

Allows users to override the language-level date and time format settings.

Adds two new User Custom Fields:

Preferred Date Format
All (non-custom) formats from the admin panel
Full-year m/d/y and d/m/y formats
ISO 8601 YYYY-MM-DD format

Preferred Time Format
12 and 24 hour formats

They are both optional and apply individually. A user who does not select an option will get the setting defined in their selected language for that field.

If you do not wish to allow selection of both options then the relevant custom field can be disabled or removed. In addition, specific options can be removed from the user fields as well without causing problems.

To add new options, the code of the extension will need to be edited as the list of potential format strings is hardcoded. This is due to how multiselect options function, the format string can't be the option value directly and thus needs an option to format string mapping.

Both fields default to on for user registration, as Date/Time formats can be very important to users. This can be safely toggled off in the custom user field settings if that isn't desired.

Edit: Screenshots of the only user-facing UI, the two added custom fields:
Понравилось?
0
0
0

Скачать User Date/Time Format Settings 1.0.2:

User Date/Time Format Settings 1.0.2 Размер файла: 15 Kb
359
0