From: Steve Sutton Date: Wed, 6 Aug 2014 17:00:33 +0000 (-0400) Subject: Adding the seasonator (TCCVB) X-Git-Tag: V1.0^2~117 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;h=d3a1dac8dac1f4867da9d2ab1b4deeef46c462d3;p=web%2FKeweenaw.git Adding the seasonator (TCCVB) This is coming from Traversecity website. Has 5 images for the navigation section. There are 4 seasons. Each season has 5 images. They can select from any season, will switch out all images in nav. --- diff --git a/Toolkit/Database.php b/Toolkit/Database.php index f6e6521..81fe383 100644 --- a/Toolkit/Database.php +++ b/Toolkit/Database.php @@ -147,6 +147,12 @@ class Toolkit_Database $stmt->bindValue(':schema', 'ckimages', PDO::PARAM_STR); $stmt->execute(); + if (defined('SEASONATOR') && SEASONATOR) { + // define seasonator search path + $stmt->bindValue(':schema', 'seasonator', PDO::PARAM_STR); + $stmt->execute(); + } + if (defined('RETAIL_SHOP') && RETAIL_SHOP) { $stmt->bindValue(':schema', 'retail_shop', PDO::PARAM_STR); $stmt->execute(); diff --git a/Toolkit/Seasonator/Database/application.sql b/Toolkit/Seasonator/Database/application.sql new file mode 100644 index 0000000..3316231 --- /dev/null +++ b/Toolkit/Seasonator/Database/application.sql @@ -0,0 +1,15 @@ +CREATE SCHEMA seasonator; +GRANT ALL ON SCHEMA seasonator TO nobody; +-- +-- Tables +-- + +\i ./tables/seasons.sql +\i ./tables/season.sql + +-- +-- data +--- + +\i ./data/season.sql +\i ./data/seasons.sql \ No newline at end of file diff --git a/Toolkit/Seasonator/Database/data/season.sql b/Toolkit/Seasonator/Database/data/season.sql new file mode 100644 index 0000000..3b67488 --- /dev/null +++ b/Toolkit/Seasonator/Database/data/season.sql @@ -0,0 +1 @@ +INSERT INTO seasonator.season (name) VALUES ('winter'); \ No newline at end of file diff --git a/Toolkit/Seasonator/Database/data/seasons.sql b/Toolkit/Seasonator/Database/data/seasons.sql new file mode 100644 index 0000000..4fa22b5 --- /dev/null +++ b/Toolkit/Seasonator/Database/data/seasons.sql @@ -0,0 +1,4 @@ +INSERT INTO seasonator.seasons (season) VALUES ('winter'); +INSERT INTO seasonator.seasons (season) VALUES ('spring'); +INSERT INTO seasonator.seasons (season) VALUES ('summer'); +INSERT INTO seasonator.seasons (season) VALUES ('fall'); \ No newline at end of file diff --git a/Toolkit/Seasonator/Database/tables/season.sql b/Toolkit/Seasonator/Database/tables/season.sql new file mode 100644 index 0000000..19ec587 --- /dev/null +++ b/Toolkit/Seasonator/Database/tables/season.sql @@ -0,0 +1,12 @@ +DROP TABLE IF EXISTS seasonator.season; + +CREATE TABLE seasonator.season +( + id SERIAL, + name TEXT NOT NULL, + last_update TIMESTAMP (0) NOT NULL DEFAULT now(), + PRIMARY KEY (id) +); + +GRANT ALL ON seasonator.season TO nobody; +GRANT ALL ON seasonator.season_id_seq TO nobody; \ No newline at end of file diff --git a/Toolkit/Seasonator/Database/tables/seasons.sql b/Toolkit/Seasonator/Database/tables/seasons.sql new file mode 100644 index 0000000..0385371 --- /dev/null +++ b/Toolkit/Seasonator/Database/tables/seasons.sql @@ -0,0 +1,16 @@ +DROP TABLE IF EXISTS seasonator.seasons CASCADE; + +CREATE TABLE seasonator.seasons +( + id SERIAL, + season TEXT UNIQUE NOT NULL, + image1 TEXT, + image2 TEXT, + image3 TEXT, + image4 TEXT, + image5 TEXT, + PRIMARY KEY (id) +); + +GRANT ALL on seasonator.seasons_id_seq to nobody; +GRANT ALL on seasonator.seasons to nobody; \ No newline at end of file diff --git a/Toolkit/Seasonator/IndexController.php b/Toolkit/Seasonator/IndexController.php new file mode 100644 index 0000000..214e8fa --- /dev/null +++ b/Toolkit/Seasonator/IndexController.php @@ -0,0 +1,94 @@ + + * @copyright 2012 Gaslight Media + * @license Gaslight Media + * @version SVN: $Id: IndexController.php 11152 2012-06-14 13:54:58Z steve $ + * @link <> + */ + +/** + * Toolkit_Seasonator_IndexController + * + * Creates objects of class Season. Fields here need to be + * the same as the database table fields. This class represents the + * table seasons. + * + * @category Toolkit + * @package Seasonator + * @author Steve Sutton + * @copyright 2012 Gaslight Media + * @license Gaslight Media + * @version SVN: $Id: IndexController.php 11152 2012-06-14 13:54:58Z steve $ + * @link <> + */ +class Toolkit_Seasonator_IndexController + extends Toolkit_BaseControllerAbstract + implements Toolkit_IController +{ + /** + * Default action for Controller + * + * @return string + */ + public function indexAction() + { + $GLOBALS['topScripts'][] = MEDIA_APP_BASE_URL + . 'libjs/jquery/jquery-1.7.2.min.js'; + $GLOBALS['styleSheets'][] + = BASE_URL . 'Toolkit/Seasonator/css/styles.css'; + $GLOBALS['styleSheets'][] + = GLM_APP_BASE_URL . 'libjs/jqueryui/1.8.13/' . + 'development-bundle/themes/start/jquery.ui.all.css'; + $GLOBALS['bottomScripts'][] + = GLM_APP_BASE_URL . 'libjs/jqueryui/1.8.13/' . + 'development-bundle/ui/jquery-ui-1.8.13.custom.js'; + $GLOBALS['bottomScripts'][] + = BASE_URL . 'Toolkit/Seasonator/js/listSeasons.js'; + $tpl = new HTML_Template_Flexy( + $this->registry->applicationConfig->flexyOptions->toArray() + ); + $tpl->compile('seasons.html'); + $page = new stdClass(); + $page->baseUrl = BASE_URL; + $e = $tpl->getElements(); + $seasonName = $this->getSeasonName(); + $page->currentSeason = $seasonName; + $page->season = $seasonName; + if ($seasonName) { + $e['season']->value = $seasonName; + } + $page->navData = $this->getSeasons(); + $html = $tpl->bufferedOutputObject($page, $e); + return $html; + } + + protected function getSeasons() + { + $mainNavs = new Toolkit_Seasonator_MainNavigation($this->registry); + return $mainNavs->getAllSeasons(); + } + + /** + * Returns the season class object or null if not found + * + * @return Toolkit_Seasonator_Season|null + */ + protected function getSeasonName() + { + $seasonMapper = new Toolkit_Seasonator_Season(); + $season = $seasonMapper->fetchById( + Toolkit_Database::getInstance(), + 1 + ); + return ($season) ? $season->getName() : null; + } + +} diff --git a/Toolkit/Seasonator/MainNavigation.php b/Toolkit/Seasonator/MainNavigation.php new file mode 100644 index 0000000..539f680 --- /dev/null +++ b/Toolkit/Seasonator/MainNavigation.php @@ -0,0 +1,140 @@ + + * @copyright 2012 Gaslight Media + * @license Gaslight Media + * @version SVN: $Id$ + * @link <> + */ + +/** + * Toolkit_Seasonator_MainNavigation + * + * Creates the elements of the main navigation based on the season + * + * @category Toolkit + * @package Seasonator + * @author Steve Sutton + * @copyright 2012 Gaslight Media + * @license Gaslight Media + * @version SVN: $Id$ + * @link <> + */ +class Toolkit_Seasonator_MainNavigation +{ + private $_registry; + + private $_seasons = array( + 'winter', + 'spring', + 'summer', + 'fall' + ); + + /** + * Constructor for Class + * + * @param Toolkit_Registry $registry + */ + public function __construct(Toolkit_Registry $registry) + { + $this->_registry = $registry; + } + + /** + * Returns the navigation array for a season + * + * @param type $season Season name of the nav items + * + * @return type + */ + private function _getNavDataForSeason($season) + { + $navData = array(); + try { + $sql = " + SELECT id + FROM seasons + WHERE season = :season"; + $stmt = $this->_registry->dbh->prepare($sql); + $stmt->bindParam(':season', $season); + $stmt->execute(); + while ($row = $stmt->fetch(PDO::FETCH_ASSOC)) { + $seasonsMapper = new Toolkit_Seasonator_Seasons(); + $navData[] = $seasonsMapper->fetchById( + Toolkit_Database::getInstance(), + $row['id'] + ); + } + } catch (PDOException $e) { + Toolkit_Common::handleError($e); + } + return $navData; + } + + private function _getNavigationNamesForSections() + { + $navArray = unserialize(MAIN_NAV_PAGES); + $navData = array(); + try { + $sql = " + SELECT navigation_name + FROM pages + WHERE id = :id"; + $stmt = $this->_registry->dbh->prepare($sql); + foreach ($navArray as $id) { + $stmt->bindParam(':id', $id, PDO::PARAM_INT); + $stmt->execute(); + $navData[] = $stmt->fetchColumn(); + } + } catch (PDOException $e) { + Toolkit_Common::handleError($e); + } + return $navData; + } + + /** + * create the items for nav based on a season + * + * @param type $season Season name of the navigation + * + * @return string + */ + private function _getNavForSeason($season) + { + $tpl = new HTML_Template_Flexy( + $this->_registry->applicationConfig->flexyOptions->toArray() + ); + $tpl->compile('navigation.html'); + $page = new stdClass(); + $page->baseUrl = BASE_URL; + // setup image sizes + $page->original = ORIGINAL; + $page->resized = RESIZED; + $page->midsized = MIDSIZED; + $page->thumb = THUMB; + $page->headThumb = MAIN_NAV_THUMB; + $page->navData = $this->_getNavDataForSeason($season); + $page->navName = $this->_getNavigationNamesForSections(); + $html = $tpl->bufferedOutputObject($page); + return $html; + } + + public function getAllSeasons() + { + $html = ''; + foreach ($this->_seasons as $season) { + $html .= $this->_getNavForSeason($season); + } + return $html; + } + +} + diff --git a/Toolkit/Seasonator/Season.php b/Toolkit/Seasonator/Season.php new file mode 100644 index 0000000..fdd1877 --- /dev/null +++ b/Toolkit/Seasonator/Season.php @@ -0,0 +1,69 @@ + + * @copyright 2012 Gaslight Media + * @license Gaslight Media + * @version SVN: $Id: Seasons.php 9429 2012-03-05 20:00:19Z steve $ + * @link <> + */ + +/** + * Toolkit_Seasonator_Season + * + * Creates objects of class Season. Fields here need to be + * the same as the database table fields. This class represents the + * table seasons. + * + * @category Toolkit + * @package Seasonator + * @author Steve Sutton + * @copyright 2012 Gaslight Media + * @license Gaslight Media + * @version SVN: $Id: Seasons.php 9429 2012-03-05 20:00:19Z steve $ + * @link <> + */ +class Toolkit_Seasonator_Season + extends Toolkit_Table +{ + protected $tableName = 'season'; + protected $id; + protected $name; + protected $last_update; + + /** + * Returns the id + * + * @return int + */ + public function getId() + { + return $this->id; + } + + /** + * Returns name + * + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Returns last_update + * + * @return string + */ + public function getLastUpdate() + { + return $this->last_update; + } +} diff --git a/Toolkit/Seasonator/Seasons.php b/Toolkit/Seasonator/Seasons.php new file mode 100644 index 0000000..86fd351 --- /dev/null +++ b/Toolkit/Seasonator/Seasons.php @@ -0,0 +1,155 @@ + + * @copyright 2012 Gaslight Media + * @license Gaslight Media + * @version SVN: $Id: Seasons.php 17352 2013-08-01 14:15:42Z steve $ + * @link <> + */ + +/** + * Toolkit_Seasonator_Seasons + * + * Creates objects of class Seasons. Fields here need to be + * the same as the database table fields. This class represents the + * table seasons. + * + * @category Toolkit + * @package Seasonator + * @author Steve Sutton + * @copyright 2012 Gaslight Media + * @license Gaslight Media + * @version SVN: $Id: Seasons.php 17352 2013-08-01 14:15:42Z steve $ + * @link <> + */ +class Toolkit_Seasonator_Seasons + extends Toolkit_Table +{ + protected $tableName = 'seasons'; + protected $id; + protected $season; + protected $image1; + protected $image2; + protected $image3; + protected $image4; + protected $image5; + + /** + * Returns the id + * + * @return int + */ + public function getId() + { + return $this->id; + } + + /** + * Returns the Season + * + * @return string + */ + public function getSeason() + { + return $this->season; + } + + /** + * Set the name to correct image variable + * + * @param type $name Field name to set + * @param type $image Image to use + * + * @return void + */ + public function setImageToName($name, $image) + { + $this->$name = $image; + } + + /** + * Returns the image from a variable name + * + * @param type $name name of field to get + * + * @return image name + */ + public function getImageFromName($name) + { + return $this->$name; + } + + /** + * Returns the image1 + * + * @return string + */ + public function getImage1() + { + return $this->image1; + } + + /** + * Returns the image2 + * + * @return string + */ + public function getImage2() + { + return $this->image2; + } + + /** + * Returns image3 + * + * @return string + */ + public function getImage3() + { + return $this->image3; + } + + /** + * Returns image4 + * + * @return string + */ + public function getImage4() + { + return $this->image4; + } + + /** + * Returns image5 + * + * @return string + */ + public function getImage5() + { + return $this->image5; + } + + public function fetchBySeason(PDO $dbh, $season) + { + try { + $sql = " + SELECT * + FROM seasons + WHERE season = :season"; + $stmt = $dbh->prepare($sql); + $stmt->bindParam(':season', $season); + $stmt->execute(); + return $this->createByValues($stmt->fetch(PDO::FETCH_ASSOC)); + } catch (PDOException $e) { + Toolkit_Common::handleError($e); + } + } +} + diff --git a/Toolkit/Seasonator/application.ini b/Toolkit/Seasonator/application.ini new file mode 100644 index 0000000..7b034c8 --- /dev/null +++ b/Toolkit/Seasonator/application.ini @@ -0,0 +1,27 @@ +; Production server configuration data +[production] +application.name = "Seasonator" +flexyOptions.templateDir = BASE "Toolkit/Seasonator/templates" +flexyOptions.compileDir = BASE "Toolkit/Seasonator/templates/compiled" +flexyOptions.url_rewrite = "baseurl/::" BASE_URL +flexyOptions.allowPHP = On +flexyOptions.forceCompile = Off + +; development server configuration data inherits from production and +; overrides values as necessary +[development : production] +flexyOptions.forceCompile = On + +; chuck's server configuration data inherits from development +; and overrides values as necessary +[chuck : development] + +; john's server configuration data inherits from development +; and overrides values as necessary +[john : development] + +; steve's server configuration data inherits from development +; and overrides values as necessary +[steve : development] + +[vagrant : development] diff --git a/Toolkit/Seasonator/assets/fall.jpg b/Toolkit/Seasonator/assets/fall.jpg new file mode 100644 index 0000000..7274548 Binary files /dev/null and b/Toolkit/Seasonator/assets/fall.jpg differ diff --git a/Toolkit/Seasonator/assets/spring.jpg b/Toolkit/Seasonator/assets/spring.jpg new file mode 100644 index 0000000..78fbb3a Binary files /dev/null and b/Toolkit/Seasonator/assets/spring.jpg differ diff --git a/Toolkit/Seasonator/assets/summer.jpg b/Toolkit/Seasonator/assets/summer.jpg new file mode 100644 index 0000000..49164a3 Binary files /dev/null and b/Toolkit/Seasonator/assets/summer.jpg differ diff --git a/Toolkit/Seasonator/assets/winter.jpg b/Toolkit/Seasonator/assets/winter.jpg new file mode 100644 index 0000000..25f303b Binary files /dev/null and b/Toolkit/Seasonator/assets/winter.jpg differ diff --git a/Toolkit/Seasonator/css/styles.css b/Toolkit/Seasonator/css/styles.css new file mode 100644 index 0000000..afeadcf --- /dev/null +++ b/Toolkit/Seasonator/css/styles.css @@ -0,0 +1,67 @@ +nav li.navLi div img { + float: left; + margin: 0 10px 10px 0; +} +nav li.navLi div h3 { + color: #00456c; +} +.active {background-color: #CDE0FF;} + +div.winter { +/* background: url(../assets/winter.jpg) no-repeat center top;*/ +} +div.spring { +/* background: url(../assets/spring.jpg) no-repeat center top;*/ +} +div.summer { +/* background: url(../assets/summer.jpg) no-repeat center top;*/ +} +div.fall { +/* background: url(../assets/fall.jpg) no-repeat center top;*/ +} + + + +nav li.navLi { + position: relative; + margin-right: 28px; + float: left; + height: 100px; + } +nav li.navLi>a { + width: 140px; + line-height: 24px; + font-size: 12px; + padding-top: 75px; + display: block; + color: white; + text-decoration: none; + text-indent: 24px; + padding-bottom: 10px; + position: absolute; + top: 0; + color: #00456c; + } +.ulCr, ol.ulCr, ul.ulCr,.ulCr li, .ulCr ul, .ulCr li { + list-style-type: none; + margin: 0; + padding: 0; + display: block; + text-decoration: none; + } +h2 { + clear: left; + margin: 0 0 5px 0; + } +nav ul { + height: 1%; + overflow: hidden; + } +#seasonwinter, #seasonsummer, #seasonspring, #seasonfall { + padding: 5px 10px; + border: 1px solid #CDE0FF; + margin-bottom: -1px; + } +form { + margin-bottom: 10px !important; + } \ No newline at end of file diff --git a/Toolkit/Seasonator/js/listSeasons.js b/Toolkit/Seasonator/js/listSeasons.js new file mode 100644 index 0000000..0c9e086 --- /dev/null +++ b/Toolkit/Seasonator/js/listSeasons.js @@ -0,0 +1,64 @@ +$(function() { + $("#radio").buttonset(); + $('#radio').change(function(){ + var newSeason = $('input:checked').val(); + switchSeason(newSeason); + setSeasonDiv(newSeason); + $.ajax({ + cache: false, + url: baseUrl + "Toolkit/Seasonator/updateSeason.php", + data: "season=" + newSeason + }); + }); + $(".form-element").click(function () { + $("#id").val($(this).attr('rel')); + $("#imageName").val($(this).attr('rel2')); + $("#dialog-form").dialog( "open" ); + }); + setSeasonDiv(currentSeason); + var image = $("#image"), + id = $("#id"), + imageName = $("#imageName") + allFields = $([]).add(id).add(image).add(imageName), + tips = $(".validateTips"); + + $( "#dialog-form" ).dialog({ + autoOpen: false, + height: 250, + width: 350, + modal: true, + buttons: { + "Upload": function() { + $("#file_upload_form").submit(); + $("#file_upload_process").show(); + }, + Cancel: function() { + $(this).dialog("close"); + } + }, + close: function() { + allFields.val("").removeClass("ui-state-error"); + } + }); +}); + +function stopUpload() { + $("#dialog-form").dialog("close"); + location.href = baseUrl + 'admin/seasonator.php'; +} + +function switchSeason(season){ + $(".demo").removeClass('winter'); + $(".demo").removeClass('summer'); + $(".demo").removeClass('spring'); + $(".demo").removeClass('fall'); + $(".demo").addClass(season); +} + +function setSeasonDiv(season){ + $("#seasonwinter").removeClass("active"); + $("#seasonspring").removeClass("active"); + $("#seasonsummer").removeClass("active"); + $("#seasonfall").removeClass("active"); + $("#season" + season).addClass("active"); +} \ No newline at end of file diff --git a/Toolkit/Seasonator/templates/navigation.html b/Toolkit/Seasonator/templates/navigation.html new file mode 100644 index 0000000..1f3e378 --- /dev/null +++ b/Toolkit/Seasonator/templates/navigation.html @@ -0,0 +1,51 @@ + +
+

{nav.getSeason()}

+ +
diff --git a/Toolkit/Seasonator/templates/seasons.html b/Toolkit/Seasonator/templates/seasons.html new file mode 100644 index 0000000..9bef012 --- /dev/null +++ b/Toolkit/Seasonator/templates/seasons.html @@ -0,0 +1,37 @@ + +
+ +
+
+ + + + + + + + +
+
+ +
+

Upload a new image.

+
+
+ + + + +
+ +
+ +
+
+ +{navData:h} +
\ No newline at end of file diff --git a/Toolkit/Seasonator/updateSeason.php b/Toolkit/Seasonator/updateSeason.php new file mode 100644 index 0000000..ccd9e4a --- /dev/null +++ b/Toolkit/Seasonator/updateSeason.php @@ -0,0 +1,36 @@ + + * @copyright 2012 Gaslight Media + * @license Gaslight Media + * @version SVN: $Id: updateSeason.php 11527 2012-07-20 18:04:45Z steve $ + * @link <> + */ +require_once '../../setup.phtml'; + +$newSeason = filter_input( + INPUT_GET, + 'season', + FILTER_SANITIZE_STRING +); +if ($newSeason) { + $seasonMapper = new Toolkit_Seasonator_Season(); + $season = $seasonMapper->fetchById( + Toolkit_Database::getInstance(), + 1 + ); + $season->setName($newSeason); + $season->setLast_update(date('Y-m-d H:i:s')); + $season->save(Toolkit_Database::getInstance()); + $cache = new Cache_Lite($GLOBALS['cacheOptions']); + $cache->clean('Season'); + $cache->clean('Nav'); + return 1; +} +return 0; \ No newline at end of file diff --git a/Toolkit/Seasonator/updateSeasonsWithNewImage.php b/Toolkit/Seasonator/updateSeasonsWithNewImage.php new file mode 100644 index 0000000..bebe9d0 --- /dev/null +++ b/Toolkit/Seasonator/updateSeasonsWithNewImage.php @@ -0,0 +1,48 @@ + + * @copyright 2012 Gaslight Media + * @license Gaslight Media + * @version SVN: $Id$ + * @link <> + */ +require_once '../../setup.phtml'; +$id = filter_input( + INPUT_POST, + 'id', + FILTER_VALIDATE_INT +); +$image = filter_input( + INPUT_POST, + 'image', + FILTER_SANITIZE_STRING +); +$imageName = filter_input( + INPUT_POST, + 'imageName', + FILTER_SANITIZE_STRING +); + +if ($id) { + $dbh = Toolkit_Database::getInstance(); + $dataMapper = new Toolkit_Seasonator_Seasons(); + $seasons = $dataMapper->fetchById($dbh, $id); + // upload the image and save the seasons record + $image_name = GLM_TOOLBOX::process_image('image'); + $seasons->setImageToName($imageName, $image_name); + $seasons->save($dbh); + $cache = new Cache_Lite($GLOBALS['cacheOptions']); + $cache->clean('Season'); + $cache->clean('Nav'); +} +?> + diff --git a/admin/nav.phtml b/admin/nav.phtml index 2f5d44e..ee28405 100644 --- a/admin/nav.phtml +++ b/admin/nav.phtml @@ -74,6 +74,13 @@ if (defined('ROTATING_IMAGES') && ROTATING_IMAGES) { $nav[$app['name']] = MEDIA_BASE_URL . 'admin/rotatingImages.php?app=' . $app['id']; } } +if (defined('SEASONATOR') && SEASONATOR) { + $seasonConfig = new Zend_Config_Ini( + BASE . 'Toolkit/Seasonator/application.ini', + strtolower($_ENV['GLM_HOST_ID']) + ); + $nav[$seasonConfig->application->name] = BASE_URL . 'admin/seasonator.php'; +} if (defined('SEASONS') && SEASONS) { $seasonConfig = new Zend_Config_Ini( BASE . 'Toolkit/Seasons/application.ini', diff --git a/admin/seasonator.php b/admin/seasonator.php new file mode 100644 index 0000000..27e2737 --- /dev/null +++ b/admin/seasonator.php @@ -0,0 +1,22 @@ +dbh = Toolkit_Database::getInstance(); +$registry->logger = Toolkit_Logger::getLogger(); +$registry->router = new Toolkit_Router($registry); +$registry->router->setPath(BASE . 'Toolkit/Seasonator'); +$registry->router->setApplication('Seasonator'); + +$applicationConfig = new Zend_Config_Ini( + BASE . 'Toolkit/Seasonator/application.ini', + strtolower($_ENV['GLM_HOST_ID']) +); +$registry->applicationConfig = $applicationConfig; + +$html = $registry->router->loader(); + +$appName = $applicationConfig->application->name; + +GLM_TOOLBOX::top($appName, ''); +echo $html; +GLM_TOOLBOX::footer(); diff --git a/assets/nav1bg.jpg b/assets/nav1bg.jpg new file mode 100755 index 0000000..1fb4078 Binary files /dev/null and b/assets/nav1bg.jpg differ diff --git a/config/application.ini b/config/application.ini index de585d2..c636656 100644 --- a/config/application.ini +++ b/config/application.ini @@ -127,6 +127,7 @@ ticketing.cat_seo = Off employment.application = Off videos.application = On seasons.application = Off +seasonator.application = On blocks.application = On ; development server configuration data inherits from production and ; overrides values as necessary diff --git a/setup.phtml b/setup.phtml index 6b53396..151b9d7 100644 --- a/setup.phtml +++ b/setup.phtml @@ -258,6 +258,17 @@ $applicationConfig = new Zend_Config_Ini( BASE . 'config/application.ini', strtolower($_ENV['GLM_HOST_ID']) ); +// If we need more main level pages we have to add more images to +// the seasonator.seasons table as image(number) ie. +// ALTER TABLE seasonator.seasons ADD image6 TEXT +$mainLevelNav = array( + 2, // Activities + 7, // Attractions + 13, // Lodging + 14, // Restaurants + 15 // Shopping +); +define('MAIN_NAV_PAGES', serialize($mainLevelNav)); //$applicationConfig = Toolkit_ApplicationConfig::getInstance(); /** @@ -480,6 +491,7 @@ define('ROTATING_IMAGES', $applicationConfig->rotating_images->application); define('WEATHER', $applicationConfig->weather->application); define('EMPLOYMENT', $applicationConfig->employment->application); define('VIDEOS', $applicationConfig->videos->application); +define('SEASONATOR', $applicationConfig->seasonator->application); define('SEASONS', $applicationConfig->seasons->application); define('GLM_BLOCKS', $applicationConfig->blocks->application); /** @@ -857,6 +869,7 @@ define('PHOTO_SMALL_URL', FILE_SERVER_URL.IS_OWNER_ID."/pgs2/"); * Home page headlines thumbnail */ define('HOMEPAGE_HEADLINE_THUMB', FILE_SERVER_URL.IS_OWNER_ID."/homepageHeadlineThumb/"); +define('MAIN_NAV_THUMB', FILE_SERVER_URL.IS_OWNER_ID."/mainNav/"); define('HEADLINE_THUMB', FILE_SERVER_URL.IS_OWNER_ID.'/headline/'); // Coupon Image rules