MyBB Community Forums

Full Version: date/time formats UCP v.s. ACP
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Why can the admin set the date and time formats to any PHP supported format, but the users are limited to a predefined selection?

Would it not be best to make the ACP use the same drop down options listed in init.php that the users are limited to?

If the admin wants to add a custom format, just edit init.php.
(2011-09-23, 11:03 PM)pavemen Wrote: [ -> ]Would it not be best to make the ACP use the same drop down options listed in init.php that the users are limited to?

If the admin wants to add a custom format, just edit init.php.
That doesn't change anything for the user, it just makes it more difficult for the admin. Many webmasters (not just those who run forums) run with php.chm open on our desktops most of the time, if we forget a format - we work on this stuff for real. And being limited to a dozen formats, or having a dropdown that goes off the bottom of the screen, is a lot more difficult than typing in a format.

In some cases it is easier to edit a few things in different files in the ACP than opening a bunch of files in an editor. You're always free to edit the files manually if you choose, though.
This is not about general PHP use, its about MyBB.

How is asking the admin to manually enter a valid PHP format easier than picking from a dozen or so predefined options? The admin could edit those predefined if he/she wanted if he/she is advanced enough? Right now, MyBB defaults to m-d-Y h:i A that if the admin changes can not get back to the default very easily.

We have enough questions about how to install, how to add a forum, etc (super easy questions) but we are expecting the admin to be able to create valid date/time formats.

Plus always having a predefined list sure does make my plugin creation a lot easier!
" Would it not be best to make the ACP use the same drop down options listed in init.php
that the users are limited to ..
" <-- yes, AND this thread may be moved to suggestions !
(2011-09-24, 04:25 AM)pavemen Wrote: [ -> ]How is asking the admin to manually enter a valid PHP format easier than picking from a dozen or so predefined options?
That limits you to just those options, unless you want to hack the core.

Maybe a dropdown but you could also type into it? We shouldn't force a user who doesn't want to know anything about coding to learn it, and we shouldn't force a programmer into using just a small subset of a format.

Quote:Plus always having a predefined list sure does make my plugin creation a lot easier!
Library (write it and stick it into your code snippet library) a date format dropdown for your plugins and just paste it into each one.

(2011-09-26, 12:34 AM)Rukbat Wrote: [ -> ]That limits you to just those options, unless you want to hack the core.

Maybe a dropdown but you could also type into it? We shouldn't force a user who doesn't want to know anything about coding to learn it, and we shouldn't force a programmer into using just a small subset of a format.
I think there are a lot fewer advanced admins than not and hacking the core files is a viable options for thos eusers, versus asking less knowledgeable admin to figure out the correct code. An editable dropdown would be cool, but it does not help my issue.
(2011-09-26, 12:34 AM)Rukbat Wrote: [ -> ]Library (write it and stick it into your code snippet library) a date format dropdown for your plugins and just paste it into each one.
The issue i am having my plugin is dealing with user vs MyBB date and time formats used by PHP and the possible JS formats from a script I need/want to use. Since the ACP formats are manually entered, I can't use a prefined list from init.php to find a valid format for "use default". All I can do is assume when coding the JS for the possible formats.
(2011-09-26, 02:15 AM)pavemen Wrote: [ -> ]and hacking the core files is a viable options for thos eusers,
Not really. Hacking the core files means applying the same hack every time there's an update. And, as with 1.6->2.0, when there's a (probably) total change in the code, it means digging through it all over again.

The admin time/date format and the user time/date format should be totally separate - one shouldn't affect the other. (Maybe just a "what's the user's time/date format" hook for developers?)
there is the Patches plugin that handles core edits very well between updates. plus like I said, its a limited amount of advanced users that would need the change anyway.

The admin time/date format is not the admin as a user, but its the board default in the ACP that I am worried about. The admin as a user has the same issues as a regular user. The UCP selects from a predefined array in init.php or the "board default", which is manually entered and fully customizable via the ACP.