Update event output
authorSteve Sutton <steve@gaslightmedia.com>
Tue, 2 Sep 2014 14:03:48 +0000 (10:03 -0400)
committerSteve Sutton <steve@gaslightmedia.com>
Tue, 2 Sep 2014 14:03:48 +0000 (10:03 -0400)
Make like Keweenaw event output.

Toolkit/Events/css/event.css
assets/go.png [new file with mode: 0755]
assets/nav1bg.jpg [new file with mode: 0755]
assets/navBg.png [new file with mode: 0755]
config/eventCalendar.ini
static/7.phtml [new file with mode: 0755]

index 1cf0e28..4e43407 100755 (executable)
     width: 100%;
     display: block;
 }
+#submitWrapper {
+    margin-top: 10px;
+}
 #submitWrapper, #submitNameWrapper, #event-search input[type="image"] {
     text-align: center;
 }
diff --git a/assets/go.png b/assets/go.png
new file mode 100755 (executable)
index 0000000..2b307a9
Binary files /dev/null and b/assets/go.png differ
diff --git a/assets/nav1bg.jpg b/assets/nav1bg.jpg
new file mode 100755 (executable)
index 0000000..1fb4078
Binary files /dev/null and b/assets/nav1bg.jpg differ
diff --git a/assets/navBg.png b/assets/navBg.png
new file mode 100755 (executable)
index 0000000..51e3030
Binary files /dev/null and b/assets/navBg.png differ
index f9b75e7..26aad51 100644 (file)
@@ -25,6 +25,8 @@ flexyOptions.templateDirOrder = "reverse"
 css.ignore.regex[] = "Common/EventCalendar_V0/css/events.css"
 css.ignore.regex[] = "response/V0/css/1140.css"
 css.replace[] = MEDIA_BASE_URL "Toolkit/Events/css/event.css"
+
+front.list.sortByCategory  = Off
 ; development server configuration inherits from production and
 ; overrides values as needed
 [development : production]
diff --git a/static/7.phtml b/static/7.phtml
new file mode 100755 (executable)
index 0000000..845ca6f
--- /dev/null
@@ -0,0 +1,55 @@
+<?php
+if (defined('COMMON_EVENTS') && COMMON_EVENTS) {
+    $calendarDateArray = filter_var_array(
+        $_REQUEST,
+        array(
+            'day'   => array('filter' => FILTER_VALIDATE_INT, 'options' => array('min_range' => 1, 'max_range' => 31)),
+            'month' => array('filter' => FILTER_VALIDATE_INT, 'options' => array('min_range' => 1, 'max_range' => 12)),
+            'year'  => array('filter' => FILTER_VALIDATE_INT, 'options' => array('min_range' => date('Y'), 'max_range' => date('Y') + 2)),
+        )
+    );
+    if ($calendarDateArray['day'] && $calendarDateArray['month'] && $calendarDateArray['year']) {
+        $time = mktime(
+            0,
+            0,
+            0,
+            $calendarDateArray['month'],
+            $calendarDateArray['day'],
+            $calendarDateArray['year']
+        );
+        $_REQUEST['search'] = 1;
+        $_REQUEST['startMonth'] = $_REQUEST['endMonth'] = date('m/d/Y', $time);
+    }
+    $search  = filter_var($_REQUEST['search'], FILTER_VALIDATE_BOOLEAN);
+    if ($search && isset($_REQUEST['eventName']) && !$eventName = filter_var($_REQUEST['eventName'])) {
+        $search = false;
+    }
+    $t       = filter_var($_REQUEST['t']);
+    $eventId = filter_var($_REQUEST['eventid'], FILTER_VALIDATE_INT);
+    if (!$t && !$search && !$eventId) {
+        $_REQUEST['t'] = '30';
+    }
+    // set CommonApp define if not set
+    if (!defined('COMMON_APP_BASE')) {
+        define('COMMON_APP_BASE', '/var/www/server/CommonApps/');
+    }
+    // load the event application config files form CommonApps
+    define('COMMON_APP_NAME', 'EventCalendar');
+    define('COMMON_APP_VERSION', 'V1');
+    define('COMMON_APP_INI', 'application.ini');
+    define('COMMON_APP_SITE_INI', 'eventCalendar.ini');
+
+    define('COMMON_APP_CONTROLLER', 'IndexController');
+    $appPath = COMMON_APP_BASE . COMMON_APP_NAME . '/' . COMMON_APP_VERSION . '/';
+    define('COMMON_APP_PATH', $appPath);
+    // now only need to pull in the main file to run the app
+    // pull in admin.php file
+    unset($GLOBALS['bottomScripts']['external']);
+    require COMMON_APP_PATH . 'Bootstrap.php';
+} else {
+    $events = new Toolkit_Events_Display(
+        Toolkit_Database::getInstance()
+    );
+    echo $events->toHTML($this->keywordReplacement);
+}
+