Python Forum
Poll: How should python-forum display dates?
You do not have permission to vote in this poll.
December, 11th 2016
0%
0 0%
11th December, 2016
0%
0 0%
2016-12-11
16.67%
2 16.67%
Other answer, please explain below
8.33%
1 8.33%
Keep current default, i.e. 12-11-2016
0%
0 0%
Dec-11-2016
33.33%
4 33.33%
11-Dec-2016
8.33%
1 8.33%
Dec 11 2016
8.33%
1 8.33%
11 Dec 2016
25.00%
3 25.00%
Dec/11/2016
0%
0 0%
11/Dec/2016
0%
0 0%
Total 12 vote(s) 100%
* You voted for this item. [Show Results]

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Date format
#41
(Dec-18-2016, 08:51 AM)Kebap Wrote: Maybe we just add them to the list and be done with it?

That seems reasonable. And it gives me an excuse to drag the discussion to a fifth page.
Craig "Ichabod" O'Brien - xenomind.com
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures
Reply
#42
Im trying to figure out how to add them to the list at this point. The default is easy because there is just a date string field in ACP. But in User CP you have to change the template to add the options. One would think it would be easy....but  Tongue


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

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?
Recommended Tutorials:
Reply
#43
(Dec-19-2016, 02:47 AM)metulburr Wrote: but im not sure how to add options to this?
Looks like date formats are defined in /inc/init.php, and the only thing you need to do to make an option available is adding it to the $date_formats array.
Reply
#44
Nice i was looking for this Big Grin
So those options are no in your guys User CP
thanks stranac
Recommended Tutorials:
Reply


Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020