Skip to:
Content

bbPress.org

Opened 19 years ago

Closed 18 years ago

Last modified 18 years ago

#695 closed enhancement (fixed)

user definable long date format option

Reported by: _ck_'s profile _ck_ Owned by:
Milestone: 0.9 Priority: normal
Severity: normal Version: 0.8.2.1
Component: Back-end Keywords: has-patch
Cc:

Description

Not everywhere in the world uses "F j, Y, h:i A" and this is hardcoded into several functions.

Should be user definable, at least in config.php, with a fallback default?

Attachments (1)

695.r988.patch (5.1 KB) - added by livibetter 18 years ago.

Download all attachments as: .zip

Change History (8)

#1 @mdawaffe
19 years ago

Can you point out specific places where the format is hardcoded?

A date format option sounds reasonable. Note, though, that the "standard" format is (or should be) fully internationalized; those that install a language should get the date formatted in a way that's acceptable for that language.

#2 @_ck_
19 years ago

Oh my mistake this is actually in the default template(s) for search, not in the bbPress engine itself. It was a late night, sorry.

But yeah, it would be nice to give bbPress an admin definable option that template/plugin authors could access. Probably next to the timezone option?

#3 @mdawaffe
18 years ago

  • Milestone set to 0.8.4 & WP-Taxonomy

I think we probably need some kind of options page in the admin for things like this.

We may even, dare I suggest it, want to put all of our options in the DB rather than in config.php.

#4 @sambauers
18 years ago

We do need a way to change this somewhere. It's particularly annoying for people from other english speaking countries with different formats for strings like this. I shouldn't have to install a full language file to change "F j, Y, h:i A" to the Australian "jS F Y, h:i A" for example.

#5 @livibetter
18 years ago

  • Keywords has-patch added

I made a patch. not sure is that a acceptable solution.

Add three options datetime_format, date_format and time_format. (all have fail-back default values by using bb_datetime_format_i18n)

Add a new function bb_datetime_format_i18n to bb-includes/locale.php. This function generates date/time in local time (GMT + gmt_offset option).

"Registered" in user list of admin interface is local time.
"Member Since" in profile page uses date_format
Time in search result of Kakumei template uses datetime_format

#6 @sambauers
18 years ago

  • Resolution set to fixed
  • Status changed from new to closed

(In [1160]) Custom datetime and date formats in options. Props livibetter. Fixes #695

#7 @sambauers
18 years ago

(In [1161]) Custom datetime and date formats in options for 0.8 branch. Props livibetter. See #695

Note: See TracTickets for help on using tickets.