aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason Oster <parasytic@users.sourceforge.net>2009-05-21 15:06:12 +0000
committerJason Oster <parasytic@users.sourceforge.net>2009-05-21 15:06:12 +0000
commit8ae45367719ad076fb4c762c4acdf17b9479e4bd (patch)
tree55f4f97c83c84b54cf82ccc5096250d2e1f5dd93
parent2a5657581cc895a12f1e5a37abadf7229d086473 (diff)
downloadphpicalendar-8ae45367719ad076fb4c762c4acdf17b9479e4bd.tar.gz
phpicalendar-8ae45367719ad076fb4c762c4acdf17b9479e4bd.tar.bz2
phpicalendar-8ae45367719ad076fb4c762c4acdf17b9479e4bd.zip
Make title generation more concise
-rw-r--r--functions/date_functions.php10
1 files changed, 5 insertions, 5 deletions
diff --git a/functions/date_functions.php b/functions/date_functions.php
index d722c17..9eba84e 100644
--- a/functions/date_functions.php
+++ b/functions/date_functions.php
@@ -163,7 +163,7 @@ function chooseOffset($time, $timezone = '') {
function makeTitle($arr, $time) {
global $timeFormat, $dateFormat_week;
- $event_text = chopToWordCount(sanitizeForWeb(urldecode($arr["event_text"])), 25);
+ $event_text = chopToWordCount(sanitizeForWeb(urldecode($arr["event_text"])), 20);
if ($time == -1) {
$start = localizeDate($dateFormat_week, $arr['start_unixtime']);
$end = localizeDate($dateFormat_week, ($arr['end_unixtime'] - 60));
@@ -176,11 +176,11 @@ function makeTitle($arr, $time) {
if ($start != $end) $title = "$event_text\n$start - $end";
}
- if (!empty($arr['description'])) {
- $title .= "\n\nDescription: " . chopToWordCount(sanitizeForWeb(urldecode($arr['description'])), 100);
- }
if (!empty($arr['location'])) {
- $title .= "\n\nLocation: " . chopToWordCount(sanitizeForWeb(urldecode($arr['location'])), 25);
+ $title .= "\nLocation: " . chopToWordCount(sanitizeForWeb(urldecode($arr['location'])), 20);
+ }
+ if (!empty($arr['description'])) {
+ $title .= "\n\n" . chopToWordCount(sanitizeForWeb(urldecode($arr['description'])), 80);
}
$title = trim($title);

© 2014-2024 Faster IT GmbH | imprint | privacy policy