From 2e6c6e4646596c2485a6fb7bce491deb9c3ad95c Mon Sep 17 00:00:00 2001 From: Karl 'vollmerk' Vollmer Date: Wed, 27 Dec 2006 18:38:14 +0000 Subject: added X ago to the recently played --- templates/show_recently_played.inc.php | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'templates/show_recently_played.inc.php') diff --git a/templates/show_recently_played.inc.php b/templates/show_recently_played.inc.php index 164d797b..3693dc27 100644 --- a/templates/show_recently_played.inc.php +++ b/templates/show_recently_played.inc.php @@ -18,6 +18,10 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + +/* Define the time places starting at 0 */ +$time_unit = array('',_('seconds ago'),_('minutes ago'),_('hours ago'),_('days ago'),_('weeks ago'),_('months ago'),_('years ago')); + ?> @@ -26,10 +30,22 @@ + = 1) { + $final = $amount; + $time_place++; + $amount = floor($amount/60); + } + + $time_string = $final . ' ' . $time_unit[$time_place]; + $song->format_song(); ?> @@ -41,6 +57,7 @@ +
 
f_link; ?> f_album_link; ?> f_artist_link; ?>
-- cgit