1
BigJim
How to change recent comments time & date format
  • 2008/11/15 4:16

  • BigJim

  • Just popping in

  • Posts: 78

  • Since: 2007/7/16


Hi there, can anyone tell me how I can change the time and date format on the recent comments block?

I would like it to be the same as the time/date format for the newbb recent posts block where it can say today / yesterday for those very recent posts.

Right now the comments block will just show a 2008/11/15 10:45 format, even if the post was made that day.

Can anyone help? thanks

2
Anonymous
Re: How to change recent comments time & date format
  • 2008/11/15 9:35

  • Anonymous

  • Posts: 0

  • Since:


In 2.3.x, date format settings are found in /language/yourlanguage/global.php on lines 167 - 169.

I've altered mine to be:

define("_DATESTRING","d/m/Y H:i:s");
define("_MEDIUMDATESTRING","d/m/Y H:i");
define("_SHORTDATESTRING","d/m/Y");


Also checkout lines 28 - 31 of /language/yourlanguage/locale.php

Mine reads:

define("_TODAY", "\T\o\d\a\y H:i");
define("_YESTERDAY", "\Y\e\s\\t\e\\r\d\a\y H:i");
define("_MONTHDAY", "d/m/Y H:i");
define("_YEARMONTHDAY", "d/m/Y H:i");

HTH

3
ghia
Re: How to change recent comments time & date format
  • 2008/11/15 9:46

  • ghia

  • Community Support Member

  • Posts: 4953

  • Since: 2008/7/3 1


In Newbb/CBB 3.08, this date formats for Today, etc are used in the blocks. Which version do you have?

4
BigJim
Re: How to change recent comments time & date format
  • 2008/11/16 8:30

  • BigJim

  • Just popping in

  • Posts: 78

  • Since: 2007/7/16


Thanks for the replies guys

I'm using XOOPS 2.0.18 and newbb 3.08.

So my newbb block shows the time / date using today / yesterday but my recent comments block in the system doesn't.

Is there some code in the newbb module I need to copy to system?

thanks again

5
Anonymous
Re: How to change recent comments time & date format
  • 2008/11/16 9:22

  • Anonymous

  • Posts: 0

  • Since:


The date/time format for all "system" functions is set using the language files.

For the 2.0.18.x version it's lines 160-162 of /language/your-language/global.php

Use the commented-out php date-format codes in the lines below.

CBB date formats are set using files in the /Frameworks folder and so are completely separate from the system function - this explains the difference.

6
sailjapan
Re: How to change recent comments time & date format

Quote:
CBB date formats are set using files in the /Frameworks folder and so are completely separate from the system function - this explains the difference.

Why would they do that?
Never let a man who does not believe something can be done, talk to a man that is doing it.

7
Anonymous
Re: How to change recent comments time & date format
  • 2008/11/16 14:27

  • Anonymous

  • Posts: 0

  • Since:


In 2.0.x? Dunno mate

I used Frameworks 1.22 with 2.0.18.2 and the date/time settings for modules which us Frameworks (inc CBB3.0x)are found here:

/Frameworks/compat/language/your-language/local.php (lines 16-19)

There's a few threads on here about it - Search is your friend

This is in addition to the aforementioned language files in the language folder for "system".

All a bit confusing for the newbies.

8
trabis
Re: How to change recent comments time & date format
  • 2008/11/16 14:41

  • trabis

  • Core Developer

  • Posts: 2269

  • Since: 2006/9/1 1


Yup, yesterday I had the same problem when upgrading newbb1.x to cbb3.x
and ended up at:

/Frameworks/compat/language/english/local.php (lines 16-19)

I had to make a copy of the english folder and name it "portuguese" and then make the necessary changes.

Using XOOPS 2.0.17 (or equivalent, lol)

9
ghia
Re: How to change recent comments time & date format
  • 2008/11/16 16:06

  • ghia

  • Community Support Member

  • Posts: 4953

  • Since: 2008/7/3 1


Quote:
Why would they do that?

Because XOOPS uses only a fix date format and the developers wanted on the forum to imitate the adapting date format from other forums (PHPBB?).

10
sailjapan
Re: How to change recent comments time & date format

Quote:
Because XOOPS uses only a fix date format

Ah, so we can expect a different date format in 3.0 then
Never let a man who does not believe something can be done, talk to a man that is doing it.

Login

Who's Online

457 user(s) are online (337 user(s) are browsing Support Forums)


Members: 0


Guests: 457


more...

Donat-O-Meter

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

Latest GitHub Commits