[2.0.6] Today At/Yesterday At

The cleanup is complete. This forum is now read only.
Post Reply

Rating:

Excellent!
40
71%
Very Good
13
23%
Good
0
No votes
Fair
1
2%
Poor
2
4%
 
Total votes: 56

Extensions Robot
Extensions Robot
Extensions Robot
Posts: 28717
Joined: Sat Aug 16, 2003 7:36 am

[2.0.6] Today At/Yesterday At

Post by Extensions Robot »

MOD Name: Today At/Yesterday At
Author: netclectic
MOD Description: Will show Today At if the post was posted today. Will show Yesterday At if the post was posted yesterday

MOD Version: 1.3.1

Download File: TodayYesterday_install.mod
mods overview page: View
File Size: 7724 Bytes

Security Score:
Last edited by Extensions Robot on Mon Apr 30, 2007 12:29 am, edited 1 time in total.
(this is a non-active account manager for the phpBB Extension Customisations Team)
wGEric
Former Team Member
Posts: 8805
Joined: Sun Oct 13, 2002 3:01 am
Location: Friday
Name: Eric Faerber
Contact:

Post by wGEric »

MOD Validated/Released

Notes:
This MOD changes the normal date for when the post was made to \'Today at\' or \'Yesterday at\' if it was posted today or yesterday.

Example:
5 Apr 2004 12:01 am

Will become
Today at 12:01 am



Edit: It works on 2.0.8
netclectic
Former Team Member
Posts: 4439
Joined: Wed Mar 13, 2002 3:08 pm
Location: Omnipresent
Contact:

Post by netclectic »

Cheers :)
Defend the game:
Image
User avatar
kender
Registered User
Posts: 109
Joined: Fri Apr 02, 2004 11:32 pm
Location: Great Lakes Region, USA

Post by kender »

not compatible with

Categories hierarchy MOD by Ptirhiik

Code: Select all

#
#-----[ OPEN ]------------------------------
# 
index.php 

#
#-----[ FIND ]-----------------------------------
# 
$last_post = $last_post_time . '<br />';

#
#-----[ REPLACE WITH ]-----------------------------------
# 

								// OLD
								// $last_post = $last_post_time . '<br />';
								//
                                // MOD - TODAY AT - BEGIN
								//
								if ( $board_config['time_today'] < $forum_data[$j]['post_time'])
								{ 
									$last_post = sprintf($lang['Today_at'], create_date($board_config['default_timeformat'], $forum_data[$j]['post_time'], $board_config['board_timezone'])) . '<br />'; 
								}
								else if ( $board_config['time_yesterday'] < $forum_data[$j]['post_time'])
								{ 
									$last_post = sprintf($lang['Yesterday_at'], create_date($board_config['default_timeformat'], $forum_data[$j]['post_time'], $board_config['board_timezone'])) . '<br />'; 
								}
								else
								{ 
									$last_post = $last_post_time . '<br />'; 
								} 
                                // MOD - TODAY AT - END

the line to find was removed by the categories hirearchy mod, and placed in the includes/functions_categories_hierarchy.php file, and though you can add that line there, it isnt a complete fix for this mod to be effective
Sick of overpaying for cable?
free dish network
helviox
Registered User
Posts: 65
Joined: Thu Mar 13, 2003 12:27 pm
Location: Málaga, Spain

Post by helviox »

Great! Thanks netclectic. I've been looking for it for months. :D
helviox
Registered User
Posts: 65
Joined: Thu Mar 13, 2003 12:27 pm
Location: Málaga, Spain

Post by helviox »

Done. Works perfectly :wink:
bennyvo
Registered User
Posts: 56
Joined: Wed Mar 31, 2004 6:05 am

Post by bennyvo »

Code: Select all

#
#-----[ OPEN ]------------------------------
# 
index.php 

#
#-----[ FIND ]-----------------------------------
# 
$last_post = $last_post_time . '<br />';

#
#-----[ REPLACE WITH ]-----------------------------------
# 

								// OLD
								// $last_post = $last_post_time . '<br />';
								//
                                // MOD - TODAY AT - BEGIN
								//
								if ( $board_config['time_today'] < $forum_data[$j]['post_time'])
								{ 
									$last_post = sprintf($lang['Today_at'], create_date($board_config['default_timeformat'], $forum_data[$j]['post_time'], $board_config['board_timezone'])) . '<br />'; 
								}
								else if ( $board_config['time_yesterday'] < $forum_data[$j]['post_time'])
								{ 
									$last_post = sprintf($lang['Yesterday_at'], create_date($board_config['default_timeformat'], $forum_data[$j]['post_time'], $board_config['board_timezone'])) . '<br />'; 
								}
								else
								{ 
									$last_post = $last_post_time . '<br />'; 
								} 
                                // MOD - TODAY AT - END

#
#-----[ OPEN ]------------------------------
# 
I couldn't not find

Code: Select all

$last_post = $last_post_time . '<br />';
instead i found

Code: Select all

$last_post = $last_post_time . <br />;
Will that be the same if i replace it?

Code: Select all

#
#-----[ OPEN ]------------------------------
# 
language/lang_english/lang_main.php 

#
#-----[ FIND ]-----------------------------------
# 
?>

#
#-----[ BEFORE, ADD ]-----------------------------------
# 

// MOD - TODAY AT - BEGIN
$lang['Today_at'] = "Today at %s"; // %s is the time
$lang['Yesterday_at'] = "Yesterday at %s"; // %s is the time
// MOD - TODAY AT - END
I could not find this ?> in the lang_main.php file, can someone help me? I use 2.06 phpbb
where about can i place this code

Code: Select all

// MOD - TODAY AT - BEGIN
$lang['Today_at'] = "Today at %s"; // %s is the time
$lang['Yesterday_at'] = "Yesterday at %s"; // %s is the time
// MOD - TODAY AT - END
netclectic
Former Team Member
Posts: 4439
Joined: Wed Mar 13, 2002 3:08 pm
Location: Omnipresent
Contact:

Post by netclectic »

They should be <br /> and ?>

what browser do you use?
what editor are you using?

when i download the file using Firefox or IE they appear correctly.
Defend the game:
Image
bennyvo
Registered User
Posts: 56
Joined: Wed Mar 31, 2004 6:05 am

Post by bennyvo »

I use EditPlus.

where is

Code: Select all

?>
I have no problem using editplus, just couldn't find that weird code.

My browser is IE.
netclectic
Former Team Member
Posts: 4439
Joined: Wed Mar 13, 2002 3:08 pm
Location: Omnipresent
Contact:

Post by netclectic »

Something must be messing with the file when it's being downloaded, as it definitly appears correctly in the file when i download it here and nobody else has reported a problem with it.

Do you use any download tools?
Defend the game:
Image
bennyvo
Registered User
Posts: 56
Joined: Wed Mar 31, 2004 6:05 am

Post by bennyvo »

no, i download phpbb 2.06 in a zip file. then i install a fresh new phpbb in my computer (i have php and mysql on my pc) and then try install this mod.

here is the language/lang_english/lang_main.php (I haven't install any others mods)

Code: Select all

code removed by wGEric - Don't post large chunks of code.  Its just a big waste.
I still could not find that code.
bennyvo
Registered User
Posts: 56
Joined: Wed Mar 31, 2004 6:05 am

Post by bennyvo »

I think this code

Code: Select all

?>
is this code

Code: Select all

?>
is it?

sorry about that, i download http://www.phpbb.com/files/mods/TodayYe ... nstall.mod in a .html format then rename to .txt that's why i get that weird code isntead of ?>

:D thanks
User avatar
kender
Registered User
Posts: 109
Joined: Fri Apr 02, 2004 11:32 pm
Location: Great Lakes Region, USA

Post by kender »

yes
Sick of overpaying for cable?
free dish network
Klatu
Registered User
Posts: 25
Joined: Tue Apr 06, 2004 7:22 pm
Contact:

Post by Klatu »

messed up the time on my board big time, had to find some hack that set my timezones right :-/
Chizwolfe
Registered User
Posts: 46
Joined: Wed Oct 29, 2003 2:53 am
Contact:

Post by Chizwolfe »

hmmmmm... i installed the mod and got nothing... 2.0.6, didn't affect anything at all... still the same...

I do have Categories hierarchy MOD by Ptirhiik installed... what do I need to do to fix this???

Thanks!

Chiz
Post Reply

Return to “[2.0.x] MOD Database Cleanup”