From fd53bcd93b32c4cc215da8c8d13a23878e023179 Mon Sep 17 00:00:00 2001 From: benediktengel Date: Thu, 28 Mar 2019 22:56:36 +0100 Subject: [PATCH] name changes --- README.md | 30 ++++----- index.php | 2 +- snippets/calendar.php | 152 +++++++++++++++++++++--------------------- 3 files changed, 92 insertions(+), 92 deletions(-) diff --git a/README.md b/README.md index dcf54a5..d8701bf 100644 --- a/README.md +++ b/README.md @@ -15,12 +15,12 @@ That's it. You're done. ### Git submodule -Go to the root of your Project, copy `git submodule add https://github.com/benediktengel/G-CalendarPlugin.git site/plugins/G-CalendarPlugin` in your command line and press enter. +Go to the root of your Project, copy `git submodule add https://github.com/benediktengel/G´google-calendar-plugin.git site/plugins/google-calendar-plugin` in your command line and press enter. Done. The plugin appears in `site/plugins`. ### Composer -Copy `composer require benediktengel/G-CalendarPlugin` to your command line and press enter. +Copy `composer require benediktengel/google-calendar-plugin` to your command line and press enter. Done. Also here, the plugin appears in `site/plugins`. ## Setup @@ -28,8 +28,8 @@ Done. Also here, the plugin appears in `site/plugins`. ### 1. Set your API-Key and your calendarID in your `site/config/config.php` ```php -'benediktengel.G-CalendarPlugin.apikey' => 'YOUR-API-KEY', -'benediktengel.G-CalendarPlugin.calendarID' => 'YOUR-CALENDAR-ID' +'benediktengel.google-calendar-plugin.apikey' => 'YOUR-API-KEY', +'benediktengel.google-calendar-plugin.calendarID' => 'YOUR-CALENDAR-ID' ``` Need Help? [How to get them.](/howtogetkey.md) @@ -44,25 +44,25 @@ You did it. ## Options -- Set your API-Key: `benediktengel.G-CalendarPlugin.apikey' => 'YOUR-API-KEY'` +- Set your API-Key: `benediktengel.google-calendar-plugin.apikey' => 'YOUR-API-KEY'` - required -- Set your calendarID: `'benediktengel.G-CalendarPlugin.calendarID' => 'YOUR-CALENDAR-ID'` +- Set your calendarID: `'benediktengel.google-calendar-plugin.calendarID' => 'YOUR-CALENDAR-ID'` - required -- Change the date format: `'benediktengel.G-CalendarPlugin.formatDate' => 'd.m.Y'` +- Change the date format: `'benediktengel.google-calendar-plugin.formatDate' => 'd.m.Y'` - default: `'d.m.Y'` - optional -- Change the time format: `'benediktengel.G-CalendarPlugin.formatTime' => 'H:i'` +- Change the time format: `'benediktengel.google-calendar-plugin.formatTime' => 'H:i'` - default: `'H:i'` - optional -- What attributes of the events do you want: `'benediktengel.G-CalendarPlugin.attributes' => []` +- What attributes of the events do you want: `'benediktengel.google-calendar-plugin.attributes' => []` - default: `['title', 'dateStart','timeStart', 'dateEnd', 'timeEnd', 'description', 'location', 'url']` - possible: - `'title'` @@ -76,24 +76,24 @@ You did it. - optional -- Show only upcoming events: `'benediktengel.G-CalendarPlugin.upcoming' => true` +- Show only upcoming events: `'benediktengel.google-calendar-plugin.upcoming' => true` - default: `true` - optional - works only if `attributes` are set to default or the attribute `dateEnd` is set. -- Shorten the displayed description: `'benediktengel.G-CalendarPlugin.descriptionLength' => '300'` +- Shorten the displayed description: `'benediktengel.google-calendar-plugin.descriptionLength' => '300'` - default: `'300'` - optional - works only if `cutDescription` is true -- Don't short the description: `'benediktengel.G-CalendarPlugin.cutDescription' => true` +- Don't short the description: `'benediktengel.google-calendar-plugin.cutDescription' => true` - default: `true` - optional -- Name of the link: `'benediktengel.G-CalendarPlugin.linkName' => 'Show more.'` +- Name of the link: `'benediktengel.google-calendar-plugin.linkName' => 'Show more.'` - default: `'Show more.'` - optional @@ -133,11 +133,11 @@ You did it. - [ ] month view - [ ] week view -Wishes? Write an [issue](https://github.com/BenediktEngel/G-CalendarPlugin/issues/new) and use the label `enhancement`. +Wishes? Write an [issue](https://github.com/BenediktEngel/google-calendar-plugin/issues/new) and use the label `enhancement`. ## Problems? -Write an [issue](https://github.com/BenediktEngel/G-CalendarPlugin/issues/new) and maybe I can help you. +Write an [issue](https://github.com/BenediktEngel/google-calendar-plugin/issues/new) and maybe I can help you. ## License diff --git a/index.php b/index.php index 62fb519..ac58e43 100644 --- a/index.php +++ b/index.php @@ -1,5 +1,5 @@ [ 'calendar' => __DIR__ . '/snippets/calendar.php' ], diff --git a/snippets/calendar.php b/snippets/calendar.php index b36beea..8f7e8f8 100644 --- a/snippets/calendar.php +++ b/snippets/calendar.php @@ -3,28 +3,28 @@ $calendarID; $attributes = array(); $events = array(); -$today = new DateTime(DateTime::createFromFormat("Y-m-d H:i:s", date('Y-m-d H:i:s'))->format(option('benediktengel.G-CalendarPlugin.formatDate'))); +$today = new DateTime(DateTime::createFromFormat("Y-m-d H:i:s", date('Y-m-d H:i:s'))->format(option('benediktengel.google-calendar-plugin.formatDate'))); $i = 0; // Get Values from config.php // API-event & Calendar ID -if (option('benediktengel.G-CalendarPlugin.apikey')!= null && option('benediktengel.G-CalendarPlugin.calendarID')!= null) { - $apikey = option('benediktengel.G-CalendarPlugin.apikey'); - $calendarID = option('benediktengel.G-CalendarPlugin.calendarID'); +if (option('benediktengel.google-calendar-plugin.apikey')!= null && option('benediktengel.google-calendar-plugin.calendarID')!= null) { + $apikey = option('benediktengel.google-calendar-plugin.apikey'); + $calendarID = option('benediktengel.google-calendar-plugin.calendarID'); } else { - if ((option('benediktengel.G-CalendarPlugin.apikey')== null || option('benediktengel.G-CalendarPlugin.apikey')== "")&& (option('benediktengel.G-CalendarPlugin.calendarID')== null || option('benediktengel.G-CalendarPlugin.calendarID')== "")) { + if ((option('benediktengel.google-calendar-plugin.apikey')== null || option('benediktengel.google-calendar-plugin.apikey')== "")&& (option('benediktengel.google-calendar-plugin.calendarID')== null || option('benediktengel.google-calendar-plugin.calendarID')== "")) { trigger_error("Error: API-event and calendarID are missing!", E_USER_ERROR); - } elseif (option('benediktengel.G-CalendarPlugin.apikey')== null || option('benediktengel.G-CalendarPlugin.apikey')== "") { + } elseif (option('benediktengel.google-calendar-plugin.apikey')== null || option('benediktengel.google-calendar-plugin.apikey')== "") { trigger_error("Error: API-event is missing!", E_USER_ERROR); - } elseif (option('benediktengel.G-CalendarPlugin.calendarID')== null || option('benediktengel.G-CalendarPlugin.calendarID')== "") { + } elseif (option('benediktengel.google-calendar-plugin.calendarID')== null || option('benediktengel.google-calendar-plugin.calendarID')== "") { trigger_error("Error: CalendarID is missing!", E_USER_ERROR); } } // Attributes -if (option('benediktengel.G-CalendarPlugin.attributes') != null) { - foreach (option('benediktengel.G-CalendarPlugin.attributes') as $attribute) { +if (option('benediktengel.google-calendar-plugin.attributes') != null) { + foreach (option('benediktengel.google-calendar-plugin.attributes') as $attribute) { array_push($attributes, $attribute) ; } } @@ -42,10 +42,10 @@ foreach ($obj['items'] as $event) { $events[$i] = array(); $events[$i] += ["title" => $event['summary']]; - $events[$i] += ["datestart" => new DateTime(DateTime::createFromFormat("Y-m-d?H:i:sP", $event['start']['dateTime'])->format(option('benediktengel.G-CalendarPlugin.formatDate')))]; - $events[$i] += ["timestart" => new DateTime(DateTime::createFromFormat("Y-m-d?H:i:sP", $event['start']['dateTime'])->format(option('benediktengel.G-CalendarPlugin.formatTime')))]; - $events[$i] += ["dateEnd" => new DateTime(DateTime::createFromFormat("Y-m-d?H:i:sP", $event['end']['dateTime'])->format(option('benediktengel.G-CalendarPlugin.formatDate')))]; - $events[$i] += ["timeEnd" => new DateTime(DateTime::createFromFormat("Y-m-d?H:i:sP", $event['end']['dateTime'])->format(option('benediktengel.G-CalendarPlugin.formatTime')))]; + $events[$i] += ["datestart" => new DateTime(DateTime::createFromFormat("Y-m-d?H:i:sP", $event['start']['dateTime'])->format(option('benediktengel.google-calendar-plugin.formatDate')))]; + $events[$i] += ["timestart" => new DateTime(DateTime::createFromFormat("Y-m-d?H:i:sP", $event['start']['dateTime'])->format(option('benediktengel.google-calendar-plugin.formatTime')))]; + $events[$i] += ["dateEnd" => new DateTime(DateTime::createFromFormat("Y-m-d?H:i:sP", $event['end']['dateTime'])->format(option('benediktengel.google-calendar-plugin.formatDate')))]; + $events[$i] += ["timeEnd" => new DateTime(DateTime::createFromFormat("Y-m-d?H:i:sP", $event['end']['dateTime'])->format(option('benediktengel.google-calendar-plugin.formatTime')))]; $events[$i] += ["url" => $event['htmlLink']]; if (isset($event['description'])) { $events[$i] += ["description" => $event['description']]; @@ -68,22 +68,22 @@ } foreach ($attributes as $attirbute) { if ($attirbute == 'dateStart') { - $events[$i] += ["datestart" => new DateTime(DateTime::createFromFormat("Y-m-d?H:i:sP", $event['start']['dateTime'])->format(option('benediktengel.G-CalendarPlugin.formatDate')))]; + $events[$i] += ["datestart" => new DateTime(DateTime::createFromFormat("Y-m-d?H:i:sP", $event['start']['dateTime'])->format(option('benediktengel.google-calendar-plugin.formatDate')))]; } } foreach ($attributes as $attirbute) { if ($attirbute == 'timeStart') { - $events[$i] += ["timestart" => new DateTime(DateTime::createFromFormat("Y-m-d?H:i:sP", $event['start']['dateTime'])->format(option('benediktengel.G-CalendarPlugin.formatTime')))]; + $events[$i] += ["timestart" => new DateTime(DateTime::createFromFormat("Y-m-d?H:i:sP", $event['start']['dateTime'])->format(option('benediktengel.google-calendar-plugin.formatTime')))]; } } foreach ($attributes as $attirbute) { if ($attirbute == 'dateEnd') { - $events[$i] += ["dateEnd" => new DateTime(DateTime::createFromFormat("Y-m-d?H:i:sP", $event['end']['dateTime'])->format(option('benediktengel.G-CalendarPlugin.formatDate')))]; + $events[$i] += ["dateEnd" => new DateTime(DateTime::createFromFormat("Y-m-d?H:i:sP", $event['end']['dateTime'])->format(option('benediktengel.google-calendar-plugin.formatDate')))]; } } foreach ($attributes as $attirbute) { if ($attirbute == 'timeEnd') { - $events[$i] += ["timeEnd" => new DateTime(DateTime::createFromFormat("Y-m-d?H:i:sP", $event['end']['dateTime'])->format(option('benediktengel.G-CalendarPlugin.formatTime')))]; + $events[$i] += ["timeEnd" => new DateTime(DateTime::createFromFormat("Y-m-d?H:i:sP", $event['end']['dateTime'])->format(option('benediktengel.google-calendar-plugin.formatTime')))]; } } foreach ($attributes as $attirbute) { @@ -112,7 +112,7 @@ // Print the calendar only upcoming if (sizeof($events) != 0) { - if (option('benediktengel.G-CalendarPlugin.upcoming') == true && isset($events[0]['dateEnd'])) { + if (option('benediktengel.google-calendar-plugin.upcoming') == true && isset($events[0]['dateEnd'])) { for ($s=0; $s < sizeof($events); $s++) { if ($today <= $events[$s]['dateEnd']) { echo "
" ; @@ -121,84 +121,84 @@ } if (isset($events[$s]['datestart']) && isset($events[$s]['timestart']) && isset($events[$s]['dateEnd']) && isset($events[$s]['timeEnd'])) { echo "

"; - echo $events[$s]['datestart']->format(option('benediktengel.G-CalendarPlugin.formatDate')); - echo " ".$events[$s]['timestart']->format(option('benediktengel.G-CalendarPlugin.formatTime')); + echo $events[$s]['datestart']->format(option('benediktengel.google-calendar-plugin.formatDate')); + echo " ".$events[$s]['timestart']->format(option('benediktengel.google-calendar-plugin.formatTime')); echo " - "; - echo $events[$s]['dateEnd']->format(option('benediktengel.G-CalendarPlugin.formatDate'))." ".$events[$s]['timeEnd']->format(option('benediktengel.G-CalendarPlugin.formatTime')); + echo $events[$s]['dateEnd']->format(option('benediktengel.google-calendar-plugin.formatDate'))." ".$events[$s]['timeEnd']->format(option('benediktengel.google-calendar-plugin.formatTime')); echo "

"; } elseif (isset($events[$s]['datestart']) && isset($events[$s]['timestart']) && isset($events[$s]['dateEnd'])) { echo "

"; - echo $events[$s]['datestart']->format(option('benediktengel.G-CalendarPlugin.formatDate')); - echo " ".$events[$s]['timestart']->format(option('benediktengel.G-CalendarPlugin.formatTime')); + echo $events[$s]['datestart']->format(option('benediktengel.google-calendar-plugin.formatDate')); + echo " ".$events[$s]['timestart']->format(option('benediktengel.google-calendar-plugin.formatTime')); echo " - "; - echo $events[$s]['dateEnd']->format(option('benediktengel.G-CalendarPlugin.formatDate')); + echo $events[$s]['dateEnd']->format(option('benediktengel.google-calendar-plugin.formatDate')); echo "

"; } elseif (isset($events[$s]['datestart']) && isset($events[$s]['timestart']) && isset($events[$s]['timeEnd'])) { echo "

"; - echo $events[$s]['datestart']->format(option('benediktengel.G-CalendarPlugin.formatDate')); - echo " ".$events[$s]['timestart']->format(option('benediktengel.G-CalendarPlugin.formatTime')); + echo $events[$s]['datestart']->format(option('benediktengel.google-calendar-plugin.formatDate')); + echo " ".$events[$s]['timestart']->format(option('benediktengel.google-calendar-plugin.formatTime')); echo " - "; - echo $events[$s]['timeEnd']->format(option('benediktengel.G-CalendarPlugin.formatTime')); + echo $events[$s]['timeEnd']->format(option('benediktengel.google-calendar-plugin.formatTime')); echo "

"; } elseif (isset($events[$s]['datestart']) && isset($events[$s]['dateEnd']) && isset($events[$s]['timeEnd'])) { echo "

"; - echo $events[$s]['datestart']->format(option('benediktengel.G-CalendarPlugin.formatDate')); + echo $events[$s]['datestart']->format(option('benediktengel.google-calendar-plugin.formatDate')); echo " - "; - echo $events[$s]['dateEnd']->format(option('benediktengel.G-CalendarPlugin.formatDate'))." ".$events[$s]['timeEnd']->format(option('benediktengel.G-CalendarPlugin.formatTime')); + echo $events[$s]['dateEnd']->format(option('benediktengel.google-calendar-plugin.formatDate'))." ".$events[$s]['timeEnd']->format(option('benediktengel.google-calendar-plugin.formatTime')); echo "

"; } elseif (isset($events[$s]['timestart']) && isset($events[$s]['dateEnd']) && isset($events[$s]['timeEnd'])) { echo "

"; - echo $events[$s]['timestart']->format(option('benediktengel.G-CalendarPlugin.formatTime')); + echo $events[$s]['timestart']->format(option('benediktengel.google-calendar-plugin.formatTime')); echo " - "; - echo $events[$s]['dateEnd']->format(option('benediktengel.G-CalendarPlugin.formatDate'))." ".$events[$s]['timeEnd']->format(option('benediktengel.G-CalendarPlugin.formatTime')); + echo $events[$s]['dateEnd']->format(option('benediktengel.google-calendar-plugin.formatDate'))." ".$events[$s]['timeEnd']->format(option('benediktengel.google-calendar-plugin.formatTime')); echo "

"; } elseif (isset($events[$s]['datestart']) && isset($events[$s]['dateEnd'])) { echo "

"; - echo $events[$s]['datestart']->format(option('benediktengel.G-CalendarPlugin.formatDate')); + echo $events[$s]['datestart']->format(option('benediktengel.google-calendar-plugin.formatDate')); echo " - "; - echo $events[$s]['dateEnd']->format(option('benediktengel.G-CalendarPlugin.formatDate')); + echo $events[$s]['dateEnd']->format(option('benediktengel.google-calendar-plugin.formatDate')); echo "

"; } elseif (isset($events[$s]['timestart']) && isset($events[$s]['timeEnd'])) { echo "

"; - echo " ".$events[$s]['timestart']->format(option('benediktengel.G-CalendarPlugin.formatTime')); + echo " ".$events[$s]['timestart']->format(option('benediktengel.google-calendar-plugin.formatTime')); echo " - "; - echo $events[$s]['timeEnd']->format(option('benediktengel.G-CalendarPlugin.formatTime')); + echo $events[$s]['timeEnd']->format(option('benediktengel.google-calendar-plugin.formatTime')); echo "

"; } elseif (isset($events[$s]['datestart']) && isset($events[$s]['timestart'])) { echo "

"; - echo $events[$s]['datestart']->format(option('benediktengel.G-CalendarPlugin.formatDate')); - echo " ".$events[$s]['timestart']->format(option('benediktengel.G-CalendarPlugin.formatTime')); + echo $events[$s]['datestart']->format(option('benediktengel.google-calendar-plugin.formatDate')); + echo " ".$events[$s]['timestart']->format(option('benediktengel.google-calendar-plugin.formatTime')); echo "

"; } elseif (isset($events[$s]['datestart'])) { echo "

"; - echo $events[$s]['datestart']->format(option('benediktengel.G-CalendarPlugin.formatDate'))."

"; + echo $events[$s]['datestart']->format(option('benediktengel.google-calendar-plugin.formatDate'))."

"; } elseif (isset($events[$s]['timestart'])) { echo "

"; - echo $events[$s]['timestart']->format(option('benediktengel.G-CalendarPlugin.formatTime'))."

"; + echo $events[$s]['timestart']->format(option('benediktengel.google-calendar-plugin.formatTime'))."

"; } elseif (isset($events[$s]['dateEnd']) && isset($events[$s]['timeEnd'])) { echo "

"; - echo $events[$s]['dateEnd']->format(option('benediktengel.G-CalendarPlugin.formatDate'))." ".$events[$s]['timeEnd']->format(option('benediktengel.G-CalendarPlugin.formatTime')); + echo $events[$s]['dateEnd']->format(option('benediktengel.google-calendar-plugin.formatDate'))." ".$events[$s]['timeEnd']->format(option('benediktengel.google-calendar-plugin.formatTime')); echo "

"; } elseif (isset($events[$s]['dateEnd'])) { echo "

"; - echo $events[$s]['dateEnd']->format(option('benediktengel.G-CalendarPlugin.formatDate')); + echo $events[$s]['dateEnd']->format(option('benediktengel.google-calendar-plugin.formatDate')); echo "

"; } elseif (isset($events[$s]['timeEnd'])) { echo "

"; - echo $events[$s]['timeEnd']->format(option('benediktengel.G-CalendarPlugin.formatTime')); + echo $events[$s]['timeEnd']->format(option('benediktengel.google-calendar-plugin.formatTime')); echo "

"; } if (isset($events[$s]['location'])) { echo "

".$events[$s]['location']."

"; } if (isset($events[$s]['description'])) { - if (option('benediktengel.G-CalendarPlugin.cutDescription') == true) { - echo "

".substr($events[$s]['description'], 0, option('benediktengel.G-CalendarPlugin.descriptionLength'))."... ".option('benediktengel.G-CalendarPlugin.linkName')."

"; + if (option('benediktengel.google-calendar-plugin.cutDescription') == true) { + echo "

".substr($events[$s]['description'], 0, option('benediktengel.google-calendar-plugin.descriptionLength'))."... ".option('benediktengel.google-calendar-plugin.linkName')."

"; } else { - echo "

".$events[$s]['description']."".option('benediktengel.G-CalendarPlugin.linkName')."

"; + echo "

".$events[$s]['description']."".option('benediktengel.google-calendar-plugin.linkName')."

"; } } elseif (isset($events[$s]['url'])) { - echo "".option('benediktengel.G-CalendarPlugin.linkName').""; + echo "".option('benediktengel.google-calendar-plugin.linkName').""; } echo "
"; } @@ -213,90 +213,90 @@ } if (isset($events[$s]['datestart']) && isset($events[$s]['timestart']) && isset($events[$s]['dateEnd']) && isset($events[$s]['timeEnd'])) { echo "

"; - echo $events[$s]['datestart']->format(option('benediktengel.G-CalendarPlugin.formatDate')); - echo " ".$events[$s]['timestart']->format(option('benediktengel.G-CalendarPlugin.formatTime')); + echo $events[$s]['datestart']->format(option('benediktengel.google-calendar-plugin.formatDate')); + echo " ".$events[$s]['timestart']->format(option('benediktengel.google-calendar-plugin.formatTime')); echo " - "; - echo $events[$s]['dateEnd']->format(option('benediktengel.G-CalendarPlugin.formatDate'))." ".$events[$s]['timeEnd']->format(option('benediktengel.G-CalendarPlugin.formatTime')); + echo $events[$s]['dateEnd']->format(option('benediktengel.google-calendar-plugin.formatDate'))." ".$events[$s]['timeEnd']->format(option('benediktengel.google-calendar-plugin.formatTime')); echo "

"; } elseif (isset($events[$s]['datestart']) && isset($events[$s]['timestart']) && isset($events[$s]['dateEnd'])) { echo "

"; - echo $events[$s]['datestart']->format(option('benediktengel.G-CalendarPlugin.formatDate')); - echo " ".$events[$s]['timestart']->format(option('benediktengel.G-CalendarPlugin.formatTime')); + echo $events[$s]['datestart']->format(option('benediktengel.google-calendar-plugin.formatDate')); + echo " ".$events[$s]['timestart']->format(option('benediktengel.google-calendar-plugin.formatTime')); echo " - "; - echo $events[$s]['dateEnd']->format(option('benediktengel.G-CalendarPlugin.formatDate')); + echo $events[$s]['dateEnd']->format(option('benediktengel.google-calendar-plugin.formatDate')); echo "

"; } elseif (isset($events[$s]['datestart']) && isset($events[$s]['timestart']) && isset($events[$s]['timeEnd'])) { echo "

"; - echo $events[$s]['datestart']->format(option('benediktengel.G-CalendarPlugin.formatDate')); - echo " ".$events[$s]['timestart']->format(option('benediktengel.G-CalendarPlugin.formatTime')); + echo $events[$s]['datestart']->format(option('benediktengel.google-calendar-plugin.formatDate')); + echo " ".$events[$s]['timestart']->format(option('benediktengel.google-calendar-plugin.formatTime')); echo " - "; - echo $events[$s]['timeEnd']->format(option('benediktengel.G-CalendarPlugin.formatTime')); + echo $events[$s]['timeEnd']->format(option('benediktengel.google-calendar-plugin.formatTime')); echo "

"; } elseif (isset($events[$s]['datestart']) && isset($events[$s]['dateEnd']) && isset($events[$s]['timeEnd'])) { echo "

"; - echo $events[$s]['datestart']->format(option('benediktengel.G-CalendarPlugin.formatDate')); + echo $events[$s]['datestart']->format(option('benediktengel.google-calendar-plugin.formatDate')); echo " - "; - echo $events[$s]['dateEnd']->format(option('benediktengel.G-CalendarPlugin.formatDate'))." ".$events[$s]['timeEnd']->format(option('benediktengel.G-CalendarPlugin.formatTime')); + echo $events[$s]['dateEnd']->format(option('benediktengel.google-calendar-plugin.formatDate'))." ".$events[$s]['timeEnd']->format(option('benediktengel.google-calendar-plugin.formatTime')); echo "

"; } elseif (isset($events[$s]['timestart']) && isset($events[$s]['dateEnd']) && isset($events[$s]['timeEnd'])) { echo "

"; - echo $events[$s]['timestart']->format(option('benediktengel.G-CalendarPlugin.formatTime')); + echo $events[$s]['timestart']->format(option('benediktengel.google-calendar-plugin.formatTime')); echo " - "; - echo $events[$s]['dateEnd']->format(option('benediktengel.G-CalendarPlugin.formatDate'))." ".$events[$s]['timeEnd']->format(option('benediktengel.G-CalendarPlugin.formatTime')); + echo $events[$s]['dateEnd']->format(option('benediktengel.google-calendar-plugin.formatDate'))." ".$events[$s]['timeEnd']->format(option('benediktengel.google-calendar-plugin.formatTime')); echo "

"; } elseif (isset($events[$s]['datestart']) && isset($events[$s]['dateEnd'])) { echo "

"; - echo $events[$s]['datestart']->format(option('benediktengel.G-CalendarPlugin.formatDate')); + echo $events[$s]['datestart']->format(option('benediktengel.google-calendar-plugin.formatDate')); echo " - "; - echo $events[$s]['dateEnd']->format(option('benediktengel.G-CalendarPlugin.formatDate')); + echo $events[$s]['dateEnd']->format(option('benediktengel.google-calendar-plugin.formatDate')); echo "

"; } elseif (isset($events[$s]['timestart']) && isset($events[$s]['timeEnd'])) { echo "

"; - echo " ".$events[$s]['timestart']->format(option('benediktengel.G-CalendarPlugin.formatTime')); + echo " ".$events[$s]['timestart']->format(option('benediktengel.google-calendar-plugin.formatTime')); echo " - "; - echo $events[$s]['timeEnd']->format(option('benediktengel.G-CalendarPlugin.formatTime')); + echo $events[$s]['timeEnd']->format(option('benediktengel.google-calendar-plugin.formatTime')); echo "

"; } elseif (isset($events[$s]['datestart']) && isset($events[$s]['timestart'])) { echo "

"; - echo $events[$s]['datestart']->format(option('benediktengel.G-CalendarPlugin.formatDate')); - echo " ".$events[$s]['timestart']->format(option('benediktengel.G-CalendarPlugin.formatTime')); + echo $events[$s]['datestart']->format(option('benediktengel.google-calendar-plugin.formatDate')); + echo " ".$events[$s]['timestart']->format(option('benediktengel.google-calendar-plugin.formatTime')); echo "

"; } elseif (isset($events[$s]['datestart'])) { echo "

"; - echo $events[$s]['datestart']->format(option('benediktengel.G-CalendarPlugin.formatDate'))."

"; + echo $events[$s]['datestart']->format(option('benediktengel.google-calendar-plugin.formatDate'))."

"; } elseif (isset($events[$s]['timestart'])) { echo "

"; - echo $events[$s]['timestart']->format(option('benediktengel.G-CalendarPlugin.formatTime'))."

"; + echo $events[$s]['timestart']->format(option('benediktengel.google-calendar-plugin.formatTime'))."

"; } elseif (isset($events[$s]['dateEnd']) && isset($events[$s]['timeEnd'])) { echo "

"; - echo $events[$s]['dateEnd']->format(option('benediktengel.G-CalendarPlugin.formatDate'))." ".$events[$s]['timeEnd']->format(option('benediktengel.G-CalendarPlugin.formatTime')); + echo $events[$s]['dateEnd']->format(option('benediktengel.google-calendar-plugin.formatDate'))." ".$events[$s]['timeEnd']->format(option('benediktengel.google-calendar-plugin.formatTime')); echo "

"; } elseif (isset($events[$s]['dateEnd'])) { echo "

"; - echo $events[$s]['dateEnd']->format(option('benediktengel.G-CalendarPlugin.formatDate')); + echo $events[$s]['dateEnd']->format(option('benediktengel.google-calendar-plugin.formatDate')); echo "

"; } elseif (isset($events[$s]['timeEnd'])) { echo "

"; - echo $events[$s]['timeEnd']->format(option('benediktengel.G-CalendarPlugin.formatTime')); + echo $events[$s]['timeEnd']->format(option('benediktengel.google-calendar-plugin.formatTime')); echo "

"; } if (isset($events[$s]['location'])) { echo "

".$events[$s]['location']."

"; } if (isset($events[$s]['description']) && isset($events[$s]['url'])) { - if (option('benediktengel.G-CalendarPlugin.cutDescription') == true) { - echo "

".substr($events[$s]['description'], 0, option('benediktengel.G-CalendarPlugin.descriptionLength'))."... ".option('benediktengel.G-CalendarPlugin.linkName')."

"; + if (option('benediktengel.google-calendar-plugin.cutDescription') == true) { + echo "

".substr($events[$s]['description'], 0, option('benediktengel.google-calendar-plugin.descriptionLength'))."... ".option('benediktengel.google-calendar-plugin.linkName')."

"; } else { - echo "

".$events[$s]['description']."".option('benediktengel.G-CalendarPlugin.linkName')."

"; + echo "

".$events[$s]['description']."".option('benediktengel.google-calendar-plugin.linkName')."

"; } } elseif (isset($events[$s]['description'])) { - if (option('benediktengel.G-CalendarPlugin.cutDescription') == true) { - echo "

".substr($events[$s]['description'], 0, option('benediktengel.G-CalendarPlugin.descriptionLength'))."...

"; + if (option('benediktengel.google-calendar-plugin.cutDescription') == true) { + echo "

".substr($events[$s]['description'], 0, option('benediktengel.google-calendar-plugin.descriptionLength'))."...

"; } else { echo "

".$events[$s]['description']."

"; } } elseif (isset($events[$s]['url'])) { - echo "".option('benediktengel.G-CalendarPlugin.linkName').""; + echo "".option('benediktengel.google-calendar-plugin.linkName').""; } echo ""; }