Remove timestamp

17 years 1 week ago #36015 by elke68
Remove timestamp was created by elke68
Hi there

I can't figure out how to disable the timestamp on the fields "Member Since" and "Last Online".
I only want the date to show.

THank you for anyone who can help in advance.

Cheers
Elke

Please Log in to join the conversation.

16 years 11 months ago #37176 by dorsett
Replied by dorsett on topic Re:Remove timestamp
In components/com_comprofiler/plugin/user/plug_cbmenu/cb.menu.php

you can see where these lines are output

// Member Since
if ($params->get('membersince', '1')==1) {
$mi = array(); $mi["_UE_MENU_STATUS"]["_UE_MEMBERSINCE"]["_UE_MEMBERSINCE"]=null;
$dat = cbFormatDate($user->registerDate);
if (!$dat) $dat="?";
$this->menuList->addObjectItem($mi, $dat,"", "",
"","", _UE_MEMBERSINCE_DESC,"");


but I can not find where cbFormatDate is defined. I a php newbie, but I searched all my component files and could not find it.

Please Log in to join the conversation.

16 years 11 months ago #37180 by dorsett
Replied by dorsett on topic Re:Remove timestamp
OK. This works. Just replace cbFormatDate with the php date function (us2.php.net/manual/en/function.date.php)

Around line 1130 in cb.menu.php

change

$dat = cbFormatDate($user->registerDate);

to
/*$dat = cbFormatDate($user->registerDate);*/
$dat = date("F j, Y"); //March 01, 2007


HEre are soem other common formats you can use:

// Assuming today is: March 10th, 2001, 5:16:18 pm

$today = date("F j, Y, g:i a"); // March 10, 2001, 5:16 pm
$today = date("m.d.y"); // 03.10.01
$today = date("j, n, Y"); // 10, 3, 2001
$today = date("Ymd"); // 20010310
$today = date('h-i-s, j-m-y, it is w Day z '); // 05-16-17, 10-03-01, 1631 1618 6 Fripm01
$today = date('\i\t \i\s \t\h\e jS \d\a\y.'); // It is the 10th day.
$today = date("D M j G:i:s T Y"); // Sat Mar 10 15:16:08 MST 2001
$today = date('H:m:s \m \i\s\ \m\o\n\t\h'); // 17:03:17 m is month
$today = date("H:i:s"); // 17:16:17

Please Log in to join the conversation.

16 years 11 months ago #37181 by dorsett
Replied by dorsett on topic Re:Remove timestamp
I am an idiot. IGNORE MY LAST POST. That will give you the current date. I apologize. Wish I could delete it.

Please Log in to join the conversation.

16 years 11 months ago #37183 by dorsett
Replied by dorsett on topic Re:Remove timestamp
This definitely works, although not the best way to do it.

In components/com_comprofiler/plugin/user/plug_cbmenu/cb.menu.php

line 1124 you can see where the date is set

$dat = cbFormatDate($user->registerDate);

this sets the date into a format "MM/DD/YYYY HH:MM:S"

just add this line after that one to shorten the string to only include the date.

$dat = substr($dat, 0, 10);

Like I said, not the best way to do it, but it works.

Please Log in to join the conversation.

16 years 5 months ago #50191 by darrylglenn
Replied by darrylglenn on topic Re:Remove timestamp
Found something,

search in /components/com_comprofiler/plugin/user/plug_cbmenu/plug_cbmenu.php

the line


$dat = cbFormatDate( $user->registerDate, 1, $showtime );

Now change the 1 into 2.example:

$dat = cbFormatDate( $user->registerDate, 2, $showtime );

Thats all! works for me

Post edited by: darrylglenn, at: 2007/11/14 11:54

Post edited by: darrylglenn, at: 2007/11/14 11:54

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.390 seconds

Facebook Twitter LinkedIn