From 1bee3374c453d3f1ba5037816d0f6151d13a2d3d Mon Sep 17 00:00:00 2001 From: Anthony Talarico Date: Tue, 29 Mar 2016 07:55:44 -0400 Subject: [PATCH] removed changes for export ical --- models/front/events/export.php | 151 ----------------------------- setup/shortcodes.php | 6 +- setup/validActions.php | 4 +- views/admin/events/editStatus.html | 2 +- views/front/events/export.html | 17 ---- 5 files changed, 4 insertions(+), 176 deletions(-) delete mode 100644 models/front/events/export.php delete mode 100644 views/front/events/export.html diff --git a/models/front/events/export.php b/models/front/events/export.php deleted file mode 100644 index 2ae4f01..0000000 --- a/models/front/events/export.php +++ /dev/null @@ -1,151 +0,0 @@ - - * @license PHP Version 3.0 {@link http://www.php.net/license/3_0.txt} - */ -class GLmMembersFront_events_export extends GlmMembersFront_events_baseAction -{ - /** - * modelAction - * - * @param bool $actionData Action Data passed to the modelAction - * - * @access public - * @return void - */ - - - - public function modelAction($actionData = false) - { - header("Content-Type: text/Calendar"); -header("Content-Disposition: inline; filename=calendar.ics"); - -echo "BEGIN:VCALENDARn"; -echo "PRODID:-//Microsoft Corporation//Outlook 12.0 MIMEDIR//ENn"; -echo "VERSION:2.0n"; -echo "METHOD:PUBLISHn"; -echo "X-MS-OLK-FORCEINSPECTOROPEN:TRUEn"; - -echo "BEGIN:VEVENTn"; -echo "CLASS:PUBLICn"; -echo "CREATED:$createdn"; -echo "DESCRIPTION:Description of the Event Goes Heren"; -echo "DTSTAMP:20120715T190000n"; -echo "DTSTART:20120715T190000n"; -echo "DTEND:20120715T210000n"; -echo "LAST-MODIFIED:0101T000000n"; -echo "LOCATION:Location_of_Eventn"; -echo "PRIORITY:5n"; -echo "SEQUENCE:0n"; -echo "SUMMARY;LANGUAGE=en-us:Summary Messagen"; -echo "TRANSP:OPAQUEn"; -echo "UID:$random_numbern"; // UID just needs to be some random number. I used rand() in PHP. -echo "X-MICROSOFT-CDO-BUSYSTATUS:BUSYn"; -echo "X-MICROSOFT-CDO-IMPORTANCE:1n"; -echo "X-MICROSOFT-DISALLOW-COUNTER:FALSEn"; -echo "X-MS-OLK-ALLOWEXTERNCHECK:TRUEn"; -echo "X-MS-OLK-AUTOFILLLOCATION:FALSEn"; -echo "X-MS-OLK-CONFTYPE:0n"; - -//Here is where you set the reminder for the event. -echo "BEGIN:VALARMn"; -echo "TRIGGER:-PT1440Mn"; -echo "ACTION:DISPLAYn"; -echo "DESCRIPTION:Reminder - Reminder Text Goes Heren"; - -echo "END:VALARMn"; -echo "END:VEVENTn"; -echo "END:VCALENDARn"; -// $status = null; -// $action = ''; -// $settings = $event = array(); -// -// if ( isset($_REQUEST['glm_event_from']) ) { -// $fromDate = filter_var($_REQUEST['glm_event_from'], FILTER_SANITIZE_STRING); -// } else { -// $fromDate = date('m/d/Y'); -// } -// $this->dateRange = "start_time >= '{$fromDate}'"; -// -// if ( isset($_REQUEST['eventId']) && $eventId = filter_var($_REQUEST['eventId'], FILTER_VALIDATE_INT)) { -// $search = true; -// $action = 'event-detail'; -// } else { -// $search = true; -// $action = 'event-detail'; -// $eventslug = get_query_var( 'eventslug' ); -// //echo '
$eventslug: ' . print_r($eventslug, true) . '
'; -// $sql = " -// SELECT id -// FROM ".GLM_MEMBERS_EVENTS_PLUGIN_DB_PREFIX. "events -// WHERE name_slug = '$eventslug'"; -// $eventId = $this->wpdb->get_var($sql); -// } -// -// $fileName = $eventslug . "ics"; -// -// $categories = $this->getCategories(); -// $eventIcs = $this->getModelEventData($eventId); -// $times = $eventIcs['times']; -// foreach($times as $time){ -// $start = $time['start_time']['timestamp']; -// } -//// echo '
', print_r($eventIcs = $this->getModelEventData($eventId)), '
'; -//// echo '
', print_r($eventIcs['times']), '
'; -// -// // note that we are using "H" instead of "g" because iCalendar's Time format -// // requires 24-hour time (see RFC 5545 section 3.3.12 for info). -// function dateToCal($timestamp) { -// return date('Ymd\THis\Z', $timestamp); -// } -// echo dateToCal($start); -// // Escapes a string of characters -// function escapeString($string) { -// return preg_replace('/([\,;])/','\\\$1', $string); -// } -// -// // for shareThis url and title variables in its span tag -// $permalink = "http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]"; -// $title = get_the_title(); -// $templateData = array( -// 'siteBaseUrl' => GLM_MEMBERS_EVENTS_SITE_BASE_URL, -// 'currentUrl' => $_SERVER['HTTP_REFERER'], -// 'categories' => $categories, -// 'fromDate' => $fromDate, -// 'event' => $event, -// 'permalink' => $permalink, -// 'title' => $title, -// 'icsFile' => $icsFile, -// 'mainImgUrl' => GLM_MEMBERS_PLUGIN_MEDIA_URL . '/images/large/' -// ); -// -// error_reporting(E_ALL ^ E_NOTICE); -// return array( -// 'status' => $status, -// 'menuItemRedirect' => false, -// 'modelRedirect' => false, -// 'view' => 'front/events/export.html', -// 'data' => $templateData, -// 'settings' => $settings -// ); - - } -} - - diff --git a/setup/shortcodes.php b/setup/shortcodes.php index 8faf519..89767f0 100644 --- a/setup/shortcodes.php +++ b/setup/shortcodes.php @@ -114,11 +114,7 @@ $glmMembersEventsShortcodes = array( 'id' => false ) ), - 'glm-members-event-export' => array( - 'plugin' => GLM_MEMBERS_EVENTS_PLUGIN_SLUG, - 'menu' => 'events', - 'action' => 'export' - ) + ); $glmMembersEventsShortcodesDescription = ' diff --git a/setup/validActions.php b/setup/validActions.php index 620a182..245998a 100644 --- a/setup/validActions.php +++ b/setup/validActions.php @@ -49,8 +49,8 @@ $glmMembersEventsAddOnValidActions = array( 'frontActions' => array( 'events' => array( 'list' => GLM_MEMBERS_EVENTS_PLUGIN_SLUG, - 'detail' => GLM_MEMBERS_EVENTS_PLUGIN_SLUG, - 'export' =>GLM_MEMBERS_EVENTS_PLUGIN_SLUG + 'detail' => GLM_MEMBERS_EVENTS_PLUGIN_SLUG + ) ) ); diff --git a/views/admin/events/editStatus.html b/views/admin/events/editStatus.html index 76def26..b84d51b 100644 --- a/views/admin/events/editStatus.html +++ b/views/admin/events/editStatus.html @@ -12,7 +12,7 @@ Member: - {if $haveMember} + {if $haveMember {$memberData.member_name} {else}