php forum
php mysql forum
php mysql smarty
 
Topic Options
#311785 - 10/19/06 05:08 PM Dates and Times a la 6.x
Micky Offline
Member

Registered: 02/11/04
Posts: 184
Loc: Bern, Switzerland
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


Attachments
2280-Dates_and_Times_a_la_6.jpg


_________________________
Gruss Micky

Golf Diesel Forum

Top
#311787 - 10/19/06 06:59 PM Re: Dates and Times a la 6.x [Re: Micky]
AllenAyres Offline

I type Like navaho

Registered: 03/10/00
Posts: 25580
Loc: Texas
danke micky smile
_________________________
- Allen wavey
- What Drives You?

Top
#311788 - 10/19/06 09:54 PM Re: Dates and Times a la 6.x [Re: AllenAyres]
Carte Blanche Offline
Newbie

Registered: 10/08/06
Posts: 21
Loc: Auckland, NZ
Hey Micky, thank you very much, nice to see smile

Top



Moderator:  sirdude 
Latest Posts
[7.2.1] - Naked shoutbox
by bellaonline
05/05/12 05:00 PM
[7.x] Stop Forum Spam Integration v0.4
by bellaonline
05/05/12 03:53 PM
Shout Box

(Views)Popular Topics
Known public proxy servers 1689885
Integrated Index Page (IIP) 5.3.1 555705
Finished-[6.5.2] Games Arcade Deluxe v1.9 501236
Integrated Index Page (IIP) 5.1.1 415112
TLD Bv2.1 Released - Threads Links Directory 396822
[6.0x] Who's Online 4.0.0 [Finished] 389412
Finished-[6.5.1] Integrated Index Page (IIP) 6.5 330423
Q & A 298663
Slash UBB 266936
[6.3.x] [beta] Hit Hack 2.0 227970
Forum Stats
13621 Members
59 Forums
37191 Topics
295716 Posts

Max Online: 686 @ 06/28/07 07:04 AM

 

 

 
fusionbb message board php hacks