Jump to content


[Hack]Add date and time to Last Shout block (last_urlo.php)


  • You cannot reply to this topic
No replies to this topic

#1 visiblesoul

  • Administrators
  • 551 posts
  • Location:Earth
  • Texas

Posted 04 May 2006 - 10:26 AM

To add the date and time to the MKPortal "Last Shout" block (last_urlo.php)...

FIND in /mkportal/blocks/last_urlo.php:
$DB->query( "SELECT id, idaut, name, message FROM mkp_urlobox ORDER BY `id` DESC LIMIT $limit");
REPLACE WITH:
//$DB->query( "SELECT id, idaut, name, message FROM mkp_urlobox ORDER BY `id` DESC LIMIT $limit");
$DB->query( "SELECT id, idaut, name, message, time FROM mkp_urlobox ORDER BY `id` DESC LIMIT $limit");
FIND:
$idu = $urlo['id'];
ADD BELOW:
$time = $mklib->create_date($urlo['time'], normal);
Date format options are short (d M Y), time (H:i), small (F Y), normal (l, d F Y). For default (l, d F Y H:i) time format use...
$time = $mklib->create_date($urlo['time']);
Keep in mind you can also edit the time formatting in functions.php (function create_date).


FIND:
		$content .= "
				<tr>
				  <td class="tdglobal">$umes
				  </td>
				</tr>
				";
REPLACE WITH:
		$content .= "
				<tr>
				  <td class="tdglobal">$umes
				  </td>
				</tr>
				<tr>
				  <td class="tdglobal">$time
				  </td>
				</tr>
				";
FIND:
unset($message);
ADD BELOW:
unset($time);



Please note that I offer free support on this forum in my free time. Depending on how much work I have backlogged it may take me a week or more to answer questions. I am not ignoring you. I answer everyone but please be patient. Thanks.

Disclaimer: All forum posts, including code examples, on this forum are offered for free in the hope that they will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Use code examples at your own risk.

"If at first you don't succeed, keep on suckin' til you do succeed." -Curly Howard





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users