1
khuhner
CBB 3.04 Date Format Change
  • 2006/8/22 2:25

  • khuhner

  • Quite a regular

  • Posts: 232

  • Since: 2006/1/6 3


In posts, the date the user registered is shown under their avatar in the format YYYY/mm/dd.

I have searched the Admin section thinking there was an option to change the format, but no luck. I also looked through several php files looking for where $topic_post.poster.regdate is defined but no luck. I'm using CBB 3.04 and XOOPS 2.0.13.2.

Where can I change the date format for CBB?

Kurt

2
msdana
Re: CBB 3.04 Date Format Change
  • 2006/8/22 2:56

  • msdana

  • Just can't stay away

  • Posts: 817

  • Since: 2005/12/11


I *think* that you change it in the globals.php file. Check out this FAQ on changing date and time formats. I had to do this a couple of months ago and I *believe* this is the way.

HTH
[size=x-small]If God is watching us, the least we can do is be entertaining.[/size]
Graphic Worx : Xoops Themes

3
khuhner
Re: CBB 3.04 Date Format Change
  • 2006/8/29 21:42

  • khuhner

  • Quite a regular

  • Posts: 232

  • Since: 2006/1/6 3


Quote:

msdana wrote:
I *think* that you change it in the globals.php file. Check out this FAQ on changing date and time formats. I had to do this a couple of months ago and I *believe* this is the way.

HTH


Yea, checked there and I have all three dates:

define("_DATESTRING","n/j/Y G:i:s");
define("_MEDIUMDATESTRING","n/j/Y G:i");
define("_SHORTDATESTRING","n/j/Y");


set as I like, yet CBB is displaying a different way.

Short of hacking a template/module, anyone have any suggestions?

4
msdana
Re: CBB 3.04 Date Format Change
  • 2006/8/29 21:53

  • msdana

  • Just can't stay away

  • Posts: 817

  • Since: 2005/12/11


I just ran across this the other day with one of my sites. You can change this in modules/newbb/language/english/main.php.

HTH
[size=x-small]If God is watching us, the least we can do is be entertaining.[/size]
Graphic Worx : Xoops Themes

5
khuhner
Re: CBB 3.04 Date Format Change
  • 2006/8/29 21:56

  • khuhner

  • Quite a regular

  • Posts: 232

  • Since: 2006/1/6 3


Quote:

msdana wrote:
I just ran across this the other day with one of my sites. You can change this in modules/newbb/language/english/main.php.

HTH


thanks, but this file contains the text for the item (e.g. "Joined:"). I'm looking to change from YYYY/MM/DD to DD/MM/YYYY.

Kurt

6
msdana
Re: CBB 3.04 Date Format Change
  • 2006/8/29 22:12

  • msdana

  • Just can't stay away

  • Posts: 817

  • Since: 2005/12/11


Sorry about that, but when I changed this in modules/newbb/language/english/main.php:

Quote:
// !!IMPORTANT!! insert '\' before any char among reserved chars: "a", "A","B","c","d","D","F","g","G","h","H",
"i","I","j","l","L","m","M","n","O","r","s","S","t",
"T","U","w","W","Y","y","z","Z"
// insert double '\' before 't', 'r', 'n'
define("_MD_TODAY", "\T\o\d\a\y G:i:s");
define("_MD_YESTERDAY", "\Y\e\s\\t\e\\r\d\a\y G:i:s");
define("_MD_MONTHDAY", "n/j G:i:s");
define("_MD_YEARMONTHDAY", "Y/n/j G:i");


the joined date changed...

Obviously your system is different than mine
[size=x-small]If God is watching us, the least we can do is be entertaining.[/size]
Graphic Worx : Xoops Themes

7
khuhner
Re: CBB 3.04 Date Format Change
  • 2006/8/29 22:35

  • khuhner

  • Quite a regular

  • Posts: 232

  • Since: 2006/1/6 3


Quote:

msdana wrote:
Sorry about that, but when I changed this in modules/newbb/language/english/main.php:

Quote:
// !!IMPORTANT!! insert '\' before any char among reserved chars: "a", "A","B","c","d","D","F","g","G","h","H",
"i","I","j","l","L","m","M","n","O","r","s","S","t",
"T","U","w","W","Y","y","z","Z"
// insert double '\' before 't', 'r', 'n'
define("_MD_TODAY", "\T\o\d\a\y G:i:s");
define("_MD_YESTERDAY", "\Y\e\s\\t\e\\r\d\a\y G:i:s");
define("_MD_MONTHDAY", "n/j G:i:s");
define("_MD_YEARMONTHDAY", "Y/n/j G:i");


the joined date changed...

Obviously your system is different than mine


Thanks. I tracked it down to user.php in newbb/class. the Format in there is Y-m-d. So I changed it there. So you noticed yours changed just by adding the backslashes?


Thanks,
Kurt

8
khuhner
Re: CBB 3.04 Date Format Change
  • 2006/8/29 23:48

  • khuhner

  • Quite a regular

  • Posts: 232

  • Since: 2006/1/6 3


Quote:

msdana wrote:
Sorry about that, but when I changed this in modules/newbb/language/english/main.php:

Quote:
// !!IMPORTANT!! insert '\' before any char among reserved chars: "a", "A","B","c","d","D","F","g","G","h","H",
"i","I","j","l","L","m","M","n","O","r","s","S","t",
"T","U","w","W","Y","y","z","Z"
// insert double '\' before 't', 'r', 'n'
define("_MD_TODAY", "\T\o\d\a\y G:i:s");
define("_MD_YESTERDAY", "\Y\e\s\\t\e\\r\d\a\y G:i:s");
define("_MD_MONTHDAY", "n/j G:i:s");
define("_MD_YEARMONTHDAY", "Y/n/j G:i");


the joined date changed...

Obviously your system is different than mine


Thanks MSDANA...I changed the format. Curious as to why several modules use different date formats, that are not easily changed.

Thanks again,
Kurt

9
allnewtome
Re: CBB 3.04 Date Format Change
  • 2006/9/8 21:05

  • allnewtome

  • Not too shy to talk

  • Posts: 175

  • Since: 2005/11/30


Just to keep this up-to-date, the first suggestion (main.php) works on xbb 3.05 without needing the second (user.php).

The original appears commented out & an alternative is below it.

//define("_MD_TODAY", "Today G:i:s");
//define("_MD_YESTERDAY", "Yes\te\rday G:i:s");
//define("_MD_MONTHDAY", "n/j G:i:s");
//define("_MD_YEARMONTHDAY", "Y/n/j G:i");

define("_MD_TODAY""Today G:i");
define("_MD_YESTERDAY""Yes\te\rday G:i");
define("_MD_MONTHDAY""j/n/y G:i");
define("_MD_YEARMONTHDAY""j/n/y G:i");

Login

Who's Online

431 user(s) are online (136 user(s) are browsing Support Forums)


Members: 0


Guests: 431


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Oct 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits