MyBB Community Forums

Full Version: add additional date formats
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
In User CP i would like to add options users wanted.

Dec 18 2016
18 Dec 2016
Dec-18-2016
18-Dec-2016

How can i add these option into User CP list of date and time formats?

EDIT:
It looks like in template usercp_options_date_format there is the value of this for all the options
<option value="{$key}"{$selected}>{$dateformat}</option>
But i cant find dateformat value anywhere in the code or templates? And i cant just add the options below this as then the option is on every other line in UserCP

EDIT2:
And i dont mind editing core files


EDIT3:
in usercp.php i see on line 1087

    $date_format_options = $dateformat = '';
    foreach($date_formats as $key => $format)
    {
        $selected = '';
        if(isset($user['dateformat']) && $user['dateformat'] == $key)
        {
            $selected = " selected=\"selected\"";
        }

        $dateformat = my_date($format, TIME_NOW, "", 0);
        eval("\$date_format_options .= \"".$templates->get("usercp_options_date_format")."\";");
    }
but im not sure how to add options to this?
anyone?
If I was able to access my Site right now I'd help you, but have you looked at the Templates in ACP, I mean I would've looked for you but I can't login to my site since the DNS is failing on me.
There is no need for you to be making core edits. This is already built into MyBB.

User CP >> Edit Options >> Date Format
[Image: 30107ee0dd855c01b46bb219969d5cdd.png]

User CP >> Edit Options >> Time Format
[Image: 4c3dc732ac7f611626414065d6878883.png]
(2016-12-21, 04:30 AM)Nasyr Wrote: [ -> ]There is no need for you to be making core edits. This is already built into MyBB.

User CP >> Edit Options >> Date Format
[Image: 30107ee0dd855c01b46bb219969d5cdd.png]

User CP >> Edit Options >> Time Format
[Image: 4c3dc732ac7f611626414065d6878883.png]
This is not what i listed though. I want these option in there too

Quote:Dec 18 2016
18 Dec 2016
Dec-18-2016
18-Dec-2016







found the location to edit which is a core edit to add options
/inc/init.php