removed changes for export ical
authorAnthony Talarico <talarico@gaslightmedia.com>
Tue, 29 Mar 2016 11:55:44 +0000 (07:55 -0400)
committerAnthony Talarico <talarico@gaslightmedia.com>
Tue, 29 Mar 2016 11:55:44 +0000 (07:55 -0400)
models/front/events/export.php [deleted file]
setup/shortcodes.php
setup/validActions.php
views/admin/events/editStatus.html
views/front/events/export.html [deleted file]

diff --git a/models/front/events/export.php b/models/front/events/export.php
deleted file mode 100644 (file)
index 2ae4f01..0000000
+++ /dev/null
@@ -1,151 +0,0 @@
-<?php
-
-/**
- * export.php
- *
- */
-
-require_once GLM_MEMBERS_EVENTS_PLUGIN_CLASS_PATH . '/data/dataEvents.php';
-require_once GLM_MEMBERS_EVENTS_PLUGIN_PATH . '/models/front/events/baseAction.php';
-
-/**
- * GLmMembersFront_event_detail
- *
- * @uses      GlmDataEvents
- * @package   GlmMemberEvents
- * @version   0.0.1
- * @copyright Copyright (c) 2010 All rights reserved.
- * @author    Steve Sutton <steve@gaslightmedia.com>
- * @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 '<pre>$eventslug: ' . print_r($eventslug, true) . '</pre>';
-//            $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 '<pre>', print_r($eventIcs = $this->getModelEventData($eventId)), '</pre>';
-////        echo '<pre>', print_r($eventIcs['times']), '</pre>';
-//                
-//         // 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
-//        );  
-
-    } 
-}
-
-
index 8faf519..89767f0 100644 (file)
@@ -114,11 +114,7 @@ $glmMembersEventsShortcodes = array(
             'id' => false
         )
     ),
-    'glm-members-event-export' => array(
-        'plugin'     => GLM_MEMBERS_EVENTS_PLUGIN_SLUG,
-        'menu'       => 'events',
-        'action'     => 'export'
-        )
+    
 );
 
 $glmMembersEventsShortcodesDescription = '
index 620a182..245998a 100644 (file)
@@ -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
+
         )
     )
 );
index 76def26..b84d51b 100644 (file)
@@ -12,7 +12,7 @@
         <tr>
             <th>Member:</th>
             <td>
-        {if $haveMember}
+        {if $haveMember
                 {$memberData.member_name}
         {else}
                 <select name="ref_dest">
diff --git a/views/front/events/export.html b/views/front/events/export.html
deleted file mode 100644 (file)
index 2b12d60..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-<!DOCTYPE html>
-<!--
-To change this license header, choose License Headers in Project Properties.
-To change this template file, choose Tools | Templates
-and open the template in the editor.
--->
-<html>
-    <head>
-        <title>TODO supply a title</title>
-        <meta charset="UTF-8">
-        <meta name="viewport" content="width=device-width, initial-scale=1.0">
-    </head>
-    <body>
-        <a class="glm-read-more" href="{$siteBaseUrl}event-detail/{$event.name_slug}/?glm_event_from={$fromDate|unescape:"html"}">Read More</a>
-        <div>TODO write content</div>
-    </body>
-</html>