From 3547842a4f194a04ac027425988c6b84273c3989 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Thu, 24 Nov 2005 08:25:09 +0100 Subject: feed editor improvements --- backend.php | 19 +++++++++++-------- functions.php | 8 ++++++++ 2 files changed, 19 insertions(+), 8 deletions(-) diff --git a/backend.php b/backend.php index 0ee60a3f8..1ff981ace 100644 --- a/backend.php +++ b/backend.php @@ -1165,8 +1165,8 @@ print "

"; print " - - + + - "; $lnum = 0; @@ -1226,6 +1223,9 @@ print ""; + + $edit_title = truncate_string($edit_title, 40); + $edit_link = truncate_string($edit_link, 60); print ""; @@ -1257,7 +1257,10 @@ print ""; - + + $edit_title = truncate_string($edit_title, 40); + $edit_link = truncate_string($edit_link, 60); + print ""; print ""; @@ -1320,9 +1323,9 @@ } - if (!$line["last_updated"]) $line["last_updated"] = "Never"; +/* if (!$line["last_updated"]) $line["last_updated"] = "Never"; - print ""; + print ""; */ print ""; diff --git a/functions.php b/functions.php index e479c28b7..817e6d71c 100644 --- a/functions.php +++ b/functions.php @@ -701,4 +701,12 @@ initialize_user_prefs($link, 1); } } + + function truncate_string($str, $max_len) { + if (strlen($str) > $max_len) { + return substr($str, 0, $max_len) . "..."; + } else { + return $str; + } + } ?> -- cgit v1.2.3
 Select Select Title @@ -1185,9 +1185,6 @@ Purge Days - Last updated -
" . $edit_title . "$edit_title$edit_link" . $line["last_updated"] . "" . $line["last_updated"] . "