User Date/Time Format Settings 1.1.1

XF 2.1 / 2.2 User Date/Time Format Settings 1.1.1

Add-on xenforo 2

Ressources et modules complémentaires pour XenForo 2

Styles xenforo 2

Styles / Thèmes et apparence pour xenforo 2

Templates xenforo 2

Codes pour modifier les templates sur xenforo 2

Section Premium

Add-on et Styles pour membre Premium
User Date/Time Format Settings 1.1.1

XF 2.1 / 2.2 User Date/Time Format Settings 1.1.1

Catégorie Catégorie Add-Ons
Titre du sujet Titre du sujet User Date\/Time Format Settings 1.1.1
Auteur de la discussion Auteur de la discussion laurent68
Date de début Date de début
Réponses Réponses 5
Affichages Affichages 418
Réaction Réaction 0
Dernier message par Dernier message par laurent68

laurent68

Fondateur

Staff
fondateur
Réputation: 100%
Discussions
4 855
Messages
12 608
Solutions
85
J'aime
7 890
Points
198
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 :
  1. 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
  2. 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 :

.png


.png


Télécharger V1.0.0 :

Version 1.0.1 Bugfix : Ensure Profile is valid
Fixes errors when installed with Custom Fields Permissions.

Télécharger V1.0.1 :

Version 1.0.2 Maintenance update :

Add support url for add-on
On install, initialize display order to reliably be added to the end of the user custom fields

Télécharger V1.0.2 :

Version 1.0.3 - Bugfix update : Compatibility fix when Custom Field Permissions add-on is installed and XenForo master data is rebuilt.

Télécharger V1.0.3 :

Version 1.1.0 Maintaince update :

- Require php 7.2+
- Require Xenforo 2.2+
- Streamline code to use php 7.2+ features, and rework installer

Télécharger V1.1.0 :

Version 1.1.1 php compatibility : php 8.4+ compatibility fixes.

Télécharger V1.1.1 :
 
Contenu similaire Les plus vues Voir plus
Retour
Haut Bas