UBB.Dev
Posted By: Micky Dates and Times a la 6.x - 10/20/2006 12:08 AM
Hi,
I find also to change the old date and time in ubbt 6.x more nicely than in ubbt 7.0 ... around the time you go in libs/ubbthreads.inc.php

##
##In ubbthreads.inc.php
##

#
# Find this:
#

Code

// Is it today or yesterday?
if( !$full && ($origtime > ($midnight - 86400)) && $diff > -1) {
if( $origtime > $midnight ) {
if ($diff < 3600) {
$minutes = intval($diff / 60);
$seconds = $diff - ($minutes * 60);
if ($seconds == 1) {
$seconds_print = sprintf($ubbt_lang['SECOND_AGO'],$seconds);
} else {
$seconds_print = sprintf($ubbt_lang['SECONDS_AGO'],$seconds);
}
$minutes_print = "";
if ($minutes) {
if ($minutes == 1) {
$minutes_print = sprintf($ubbt_lang['MINUTE_AGO'],$minutes) . " ";
} else {
$minutes_print = sprintf($ubbt_lang['MINUTES_AGO'],$minutes) . " ";
}
}
$parts = array("","{$minutes_print}{$seconds_print} {$ubbt_lang['AGO']}");
} else {
$parts = array( $ubbt_lang['TODAY_AT'], date( "$time_format", $time ) );
}
} else {
$parts = array( $ubbt_lang['YESTERDAY_AT'], date( "$time_format", $time ) );
}
}

if( !count( $parts ) ) {
$parts = explode( '|', @date($timeformat, $time) );
}

#
# Change to:
#

Code
		// Is it today or yesterday?
if( !$full && ($origtime > ($midnight - 86400)) && $diff > -1) {
/* if( $origtime > $midnight ) {
if ($diff < 3600) {
$minutes = intval($diff / 60);
$seconds = $diff - ($minutes * 60);
if ($seconds == 1) {
$seconds_print = sprintf($ubbt_lang['SECOND_AGO'],$seconds);
} else {
$seconds_print = sprintf($ubbt_lang['SECONDS_AGO'],$seconds);
}
$minutes_print = "";
if ($minutes) {
if ($minutes == 1) {
$minutes_print = sprintf($ubbt_lang['MINUTE_AGO'],$minutes) . " ";
} else {
$minutes_print = sprintf($ubbt_lang['MINUTES_AGO'],$minutes) . " ";
}
}
$parts = array("","{$minutes_print}{$seconds_print} {$ubbt_lang['AGO']}");
} else {
$parts = array( $ubbt_lang['TODAY_AT'], date( "$time_format", $time ) );
}
} else {
$parts = array( $ubbt_lang['YESTERDAY_AT'], date( "$time_format", $time ) );
} */
}

if( !count( $parts ) ) {
$parts = explode( '|', @date($timeformat, $time) );
}


Then you go to the Control Panel on Clear Cache and click the button below to clear the cached information.
Ready, now you have the date and time from ubbt 6.x

Attached picture 2280-Dates_and_Times_a_la_6.jpg
Posted By: AllenAyres Re: Dates and Times a la 6.x - 10/20/2006 1:59 AM
danke micky smile
Posted By: Carte Blanche Re: Dates and Times a la 6.x - 10/20/2006 4:54 AM
Hey Micky, thank you very much, nice to see smile
© UBB.Developers