From 66a51f37b2ddde059f4c3923228aca4325cb7d89 Mon Sep 17 00:00:00 2001 From: rabuzarus <> Date: Tue, 9 Jun 2015 14:26:47 +0200 Subject: [PATCH 1/5] use title in events reminder not description --- boot.php | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/boot.php b/boot.php index 5994b2030a..57f2315781 100644 --- a/boot.php +++ b/boot.php @@ -1858,9 +1858,11 @@ if(! function_exists('get_events')) { $md = datetime_convert('UTC','UTC',$rr['start'],'Y/m'); $md .= "/#link-".$rr['id']; - $title = substr(strip_tags(bbcode($rr['desc'])),0,32) . '... '; - if(! $title) - $title = t('[No description]'); + $title = substr($rr['summary'],0,32) . '... '; + + $description = substr(strip_tags(bbcode($rr['desc'])),0,32) . '... '; + if(! $description) + $description = t('[No description]'); $strt = datetime_convert('UTC',$rr['convert'] ? $a->timezone : 'UTC',$rr['start']); @@ -1872,7 +1874,8 @@ if(! function_exists('get_events')) { $today = ((substr($strt,0,10) === datetime_convert('UTC',$a->timezone,'now','Y-m-d')) ? true : false); $rr['link'] = $md; - $rr['title'] = $title; + $rr['title'] =$title; + $rr['description'] = $desciption; $rr['date'] = day_translate(datetime_convert('UTC', $rr['adjust'] ? $a->timezone : 'UTC', $rr['start'], $bd_format)) . (($today) ? ' ' . t('[today]') : ''); $rr['startime'] = $strt; $rr['today'] = $today; From 5f088954bee79a23173bc134f08903496a57fa82 Mon Sep 17 00:00:00 2001 From: rabuzarus <> Date: Thu, 11 Jun 2015 00:43:34 +0200 Subject: [PATCH 2/5] make full title without dots --- boot.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/boot.php b/boot.php index 57f2315781..ac3e950a95 100644 --- a/boot.php +++ b/boot.php @@ -1858,7 +1858,10 @@ if(! function_exists('get_events')) { $md = datetime_convert('UTC','UTC',$rr['start'],'Y/m'); $md .= "/#link-".$rr['id']; - $title = substr($rr['summary'],0,32) . '... '; + $title = strip_tags(html_entity_decode(bbcode($rr['summary']),ENT_QUOTES,'UTF-8')); + + if(strlen($title) > 35) + $title = substr($title,0,32) . '... '; $description = substr(strip_tags(bbcode($rr['desc'])),0,32) . '... '; if(! $description) From d23440af1518c1d89f2a71516d155b1defb1ccb7 Mon Sep 17 00:00:00 2001 From: rabuzarus <> Date: Thu, 25 Jun 2015 13:43:41 +0200 Subject: [PATCH 3/5] use colorbox to display upcomming events --- view/templates/events_reminder.tpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/view/templates/events_reminder.tpl b/view/templates/events_reminder.tpl index df163b8151..9aceb3f1cb 100644 --- a/view/templates/events_reminder.tpl +++ b/view/templates/events_reminder.tpl @@ -4,7 +4,7 @@ {{/if}} From bc2117c68ac31e9e683010b93dc089ba88511e0e Mon Sep 17 00:00:00 2001 From: rabuzarus <> Date: Thu, 25 Jun 2015 13:50:48 +0200 Subject: [PATCH 4/5] one whitespace --- boot.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/boot.php b/boot.php index ac3e950a95..e6a2a3a204 100644 --- a/boot.php +++ b/boot.php @@ -1877,7 +1877,7 @@ if(! function_exists('get_events')) { $today = ((substr($strt,0,10) === datetime_convert('UTC',$a->timezone,'now','Y-m-d')) ? true : false); $rr['link'] = $md; - $rr['title'] =$title; + $rr['title'] = $title; $rr['description'] = $desciption; $rr['date'] = day_translate(datetime_convert('UTC', $rr['adjust'] ? $a->timezone : 'UTC', $rr['start'], $bd_format)) . (($today) ? ' ' . t('[today]') : ''); $rr['startime'] = $strt; From b6b000dd59cbb55771541d0e217ee24a7336573c Mon Sep 17 00:00:00 2001 From: rabuzarus <> Date: Thu, 25 Jun 2015 14:21:12 +0200 Subject: [PATCH 5/5] delete $md (event-links) because event ID is used --- boot.php | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/boot.php b/boot.php index e6a2a3a204..feb7533010 100644 --- a/boot.php +++ b/boot.php @@ -1852,12 +1852,6 @@ if(! function_exists('get_events')) { $skip = 0; foreach($r as &$rr) { - if($rr['adjust']) - $md = datetime_convert('UTC',$a->timezone,$rr['start'],'Y/m'); - else - $md = datetime_convert('UTC','UTC',$rr['start'],'Y/m'); - $md .= "/#link-".$rr['id']; - $title = strip_tags(html_entity_decode(bbcode($rr['summary']),ENT_QUOTES,'UTF-8')); if(strlen($title) > 35) @@ -1875,8 +1869,7 @@ if(! function_exists('get_events')) { } $today = ((substr($strt,0,10) === datetime_convert('UTC',$a->timezone,'now','Y-m-d')) ? true : false); - - $rr['link'] = $md; + $rr['title'] = $title; $rr['description'] = $desciption; $rr['date'] = day_translate(datetime_convert('UTC', $rr['adjust'] ? $a->timezone : 'UTC', $rr['start'], $bd_format)) . (($today) ? ' ' . t('[today]') : '');