Warning: The author of this contribution does not provide support for it anymore.

Top Five

Changing the date format (to remove the time) - Top Five

Changing the date format (to remove the time)

by ashleyquick » Thu Oct 20, 2011 3:17 am

Hi all! Hey is it possible to change the Joined Date format in the Newest User column? I want to remove the time (and possibly another change to the format as well).

Thanks!
User avatar
ashleyquick
Registered User
Posts: 192
Joined: Wed May 28, 2003 4:42 pm

Re: Changing the date format (to remove the time)

by RMcGirr83 » Thu Oct 20, 2011 9:44 am

Open the html file and remove this

<br /> {L_JOINED}: {top_five_newest.REG_DATE}
In times of change, learners inherit the earth, while the learned find themselves beautifully equipped to deal with a world that no longer exists - Eric Hoffer
Former Modifications/Extensions Team Member | My extensions
Appreciate the extensions/mods/support then buy me a beer
All requests for support via PM will be ignored
User avatar
RMcGirr83
Recognised Extension Developer
Posts: 21034
Joined: Wed Jun 22, 2005 4:33 pm
Location: Your display
Name: Rich McGirr
Contact:

Re: Changing the date format (to remove the time)

by ashleyquick » Thu Oct 20, 2011 2:27 pm

RMcGirr83 wrote:Open the html file and remove this

<br /> {L_JOINED}: {top_five_newest.REG_DATE}


To clarify, I want to keep the date ... I just want the time to be removed (ie 6:24 pm). I would also like to change the date format slightly.
User avatar
ashleyquick
Registered User
Posts: 192
Joined: Wed May 28, 2003 4:42 pm

Re: Changing the date format (to remove the time)

by RMcGirr83 » Thu Oct 20, 2011 10:29 pm

Open the includes/top_five.php file, find this

'REG_DATE' => $user->format_date($row['user_regdate']),

and change the $user->format_date to use the PHP date function instead.
In times of change, learners inherit the earth, while the learned find themselves beautifully equipped to deal with a world that no longer exists - Eric Hoffer
Former Modifications/Extensions Team Member | My extensions
Appreciate the extensions/mods/support then buy me a beer
All requests for support via PM will be ignored
User avatar
RMcGirr83
Recognised Extension Developer
Posts: 21034
Joined: Wed Jun 22, 2005 4:33 pm
Location: Your display
Name: Rich McGirr
Contact:

Re: Changing the date format (to remove the time)

by ashleyquick » Fri Oct 21, 2011 1:42 am

This worked:

Code: Select all

'REG_DATE'         => $user->format_date($row['user_regdate'], 'D M jS, Y'),


Thanks!
User avatar
ashleyquick
Registered User
Posts: 192
Joined: Wed May 28, 2003 4:42 pm