From 83d8ac651a8ff0081f1dcd72f23d44faca023751 Mon Sep 17 00:00:00 2001 From: Steve Sutton Date: Thu, 24 Apr 2014 14:52:47 +0000 Subject: [PATCH] Setup nav and contact form Setting up navigation Setting up Contact Form Setting up link to contact form --- Toolkit/Page.php | 12 +- Toolkit/RotatingImages/config.ini | 4 +- .../Template/Navigation/AllInOneSideNav.php | 41 +++++- Toolkit/Template/Navigation/Factory.php | 61 +++++---- .../Navigation/MainNavigationAbstract.php | 94 ++++++------- .../Navigation/MainNavigationAllInOne.php | 82 ++++++------ .../Navigation/MainNavigationDynamic.php | 124 +++++++++--------- admin/nav.phtml | 2 +- config/application.ini | 2 +- static/8.phtml | 12 ++ styles.css | 80 ++++++----- templates/template.html | 97 +------------- 12 files changed, 297 insertions(+), 314 deletions(-) create mode 100644 static/8.phtml diff --git a/Toolkit/Page.php b/Toolkit/Page.php index 5e4cfa3..c2b95ad 100755 --- a/Toolkit/Page.php +++ b/Toolkit/Page.php @@ -565,10 +565,14 @@ class Toolkit_Page */ private function _getMainNav($catid) { - $nav = $this->_navigationFactory->createMainNav(); - $mainNavArray = $nav->getNavStructure($this->_pageGateway, $catid); - - return $nav->renderPageNav($mainNavArray, 'tree'); + $sideNav = new Toolkit_Template_Navigation_AllInOneSideNav( + $this->_pageGateway + ); + $nav = $sideNav->getNavigation(); + unset($nav[HOME_ID]); + //var_dump($nav);exit; + $html = $sideNav->arrayToListHTML($nav); + return ($html) ? $html : ''; } /** diff --git a/Toolkit/RotatingImages/config.ini b/Toolkit/RotatingImages/config.ini index d5d582d..9988590 100644 --- a/Toolkit/RotatingImages/config.ini +++ b/Toolkit/RotatingImages/config.ini @@ -3,8 +3,8 @@ applicationName = "Homepage Slideshow" useTitles = On hasPrevNextLinks = Off -width = 505 -height = 303 +width = 903 +height = 330 ; time between the fades in milliseconds [rotation time] diff --git a/Toolkit/Template/Navigation/AllInOneSideNav.php b/Toolkit/Template/Navigation/AllInOneSideNav.php index 2f2df53..1a72fc0 100755 --- a/Toolkit/Template/Navigation/AllInOneSideNav.php +++ b/Toolkit/Template/Navigation/AllInOneSideNav.php @@ -85,7 +85,7 @@ class Toolkit_Template_Navigation_AllInOneSideNav } else { $class = ''; } - $navArray[] = array( + $navArray[$row['id']] = array( 'id' => $row['id'], 'parent' => $row['parent'], 'label' => $row['navigation_name'], @@ -124,5 +124,44 @@ class Toolkit_Template_Navigation_AllInOneSideNav Toolkit_Common::handleError($e); } } + /** + * arrayToListHTML + * + * @param mixed $array + * @param int $level + * @access public + * @return void + */ + function arrayToListHTML($array, $level = 0) + { + static $tab = "\t", $format = '%s'; + if (empty($array)) { + return; + } + $tabs = str_repeat($tab, $level * 2); + $result = "{$tabs}\n"; + return $result; + } } diff --git a/Toolkit/Template/Navigation/Factory.php b/Toolkit/Template/Navigation/Factory.php index 52c76e5..b918b34 100644 --- a/Toolkit/Template/Navigation/Factory.php +++ b/Toolkit/Template/Navigation/Factory.php @@ -27,7 +27,7 @@ * @link <> */ class Toolkit_Template_Navigation_Factory - extends Toolkit_NavigationFactoryAbstract + extends Toolkit_NavigationFactoryAbstract { /** * Description for $_gateway @@ -35,7 +35,7 @@ class Toolkit_Template_Navigation_Factory * @var Toolkit_Toolbox_PageGatewayAbstract * @access private */ - private $_gateway; + private $_gateway; /** * Sets gateway @@ -45,10 +45,10 @@ class Toolkit_Template_Navigation_Factory * @access public * @return void */ - public function setGateway(Toolkit_Toolbox_PageGatewayAbstract $gateway) - { - $this->_gateway = $gateway; - } + public function setGateway(Toolkit_Toolbox_PageGatewayAbstract $gateway) + { + $this->_gateway = $gateway; + } /** * NOTE: You have different renderers that you can choose for the main @@ -66,14 +66,14 @@ class Toolkit_Template_Navigation_Factory * @access public * @return Toolkit_Template_Navigation_SideNavigation */ - public function createSideNav( - Toolkit_Toolbox_PageGatewayAbstract $gateway = null - ) { - return new Toolkit_Template_Navigation_SideNavigation( - new HTML_Menu(), - new Toolkit_Template_Navigation_Renderer_DirectTreeSideNavTitle($this->_gateway) - ); - } + public function createSideNav( + Toolkit_Toolbox_PageGatewayAbstract $gateway = null + ) { + return new Toolkit_Template_Navigation_SideNavigation( + new HTML_Menu(), + new Toolkit_Template_Navigation_Renderer_DirectTreeSideNavTitle($this->_gateway) + ); + } /** * New main nav added can use @@ -97,20 +97,23 @@ class Toolkit_Template_Navigation_Factory * @access public * @return Toolkit_Template_Navigation_MainNavigationDynamic */ - public function createMainNav() - { - return new Toolkit_Template_Navigation_MainNavigationDynamic( - new HTML_Menu(), - /** - * new Toolkit_Template_Navigation_Renderer_DirectTreeLiId( - * $this->_gateway, - * 'current' - * ) - */ - new Toolkit_Template_Navigation_Renderer_DirectTreeLastLi( - 'lastli' - ) - ); - } + public function createMainNav() + { + return new Toolkit_Template_Navigation_MainNavigationAllInOne( + new HTML_Menu(), + new Toolkit_Template_Navigation_Renderer_DirectTreeLiId( + $this->_gateway, + 'current' + ) + ); + /* + return new Toolkit_Template_Navigation_MainNavigationDynamic( + new HTML_Menu(), + new Toolkit_Template_Navigation_Renderer_DirectTreeLastLi( + 'lastli' + ) + ); + */ + } } ?> diff --git a/Toolkit/Template/Navigation/MainNavigationAbstract.php b/Toolkit/Template/Navigation/MainNavigationAbstract.php index 69accb3..c8f0f8c 100644 --- a/Toolkit/Template/Navigation/MainNavigationAbstract.php +++ b/Toolkit/Template/Navigation/MainNavigationAbstract.php @@ -15,9 +15,9 @@ /** * Toolkit_Template_Navigation_MainNavigationAbstract - * + * * Description of Toolkit_Template_Navigation_MainNavigationAbstract - * + * * @category Toolkit * @package Template/Navigation * @author Jamie Kahgee @@ -27,77 +27,77 @@ * @link <> */ abstract class Toolkit_Template_Navigation_MainNavigationAbstract - extends Toolkit_NavigationAbstract implements Toolkit_INavigation + extends Toolkit_NavigationAbstract implements Toolkit_INavigation { - // {{{ __construct() + // {{{ __construct() /** * Class constructor - * + * * @param HTML_Menu $menu - * @param HTML_Menu_Renderer $rEngine - * + * @param HTML_Menu_Renderer $rEngine + * * @access public */ - public function __construct( - HTML_Menu $menu, - HTML_Menu_Renderer $rEngine - ) { - $this->menu = $menu; - $this->rEngine = $rEngine; - } + public function __construct( + HTML_Menu $menu, + HTML_Menu_Renderer $rEngine + ) { + $this->menu = $menu; + $this->rEngine = $rEngine; + } - // }}} - // {{{ setNavTemplates() + // }}} + // {{{ setNavTemplates() /** * Set nav templates - * + * * @return void - * @access protected + * @access protected */ - protected function setNavTemplates() - { - $tpl = '{Title}'; - $this->rEngine->setEntryTemplate( - HTML_MENU_ENTRY_INACTIVE, - sprintf($tpl, '{url}', '', '{Title}') - ); - $this->rEngine->setEntryTemplate( - HTML_MENU_ENTRY_ACTIVE, - sprintf($tpl, '{url}', 'id="current"', '{Title}') - ); - $this->rEngine->setEntryTemplate( - HTML_MENU_ENTRY_ACTIVEPATH, - sprintf($tpl, '{url}', '', '{Title}') - ); - } + protected function setNavTemplates() + { + $tpl = '{Title}'; + $this->rEngine->setEntryTemplate( + HTML_MENU_ENTRY_INACTIVE, + sprintf($tpl, '{url}', '', '{Title}') + ); + $this->rEngine->setEntryTemplate( + HTML_MENU_ENTRY_ACTIVE, + sprintf($tpl, '{url}', 'id="current"', '{Title}') + ); + $this->rEngine->setEntryTemplate( + HTML_MENU_ENTRY_ACTIVEPATH, + sprintf($tpl, '{url}', '', '{Title}') + ); + } - // }}} - // {{{ setCurrentIndex() + // }}} + // {{{ setCurrentIndex() /** * Set current index - * + * * @access protected - * @return void + * @return void */ - protected function setCurrentIndex() - { - $this->menu->forceCurrentIndex($_GET['catid']); - } + protected function setCurrentIndex() + { + $this->menu->forceCurrentIndex($_GET['catid']); + } - // }}} - // {{{ getNavSructure() + // }}} + // {{{ getNavSructure() /** * Create a static array of nav items to use - * + * * @return array navigational array hash * @access public */ - public function getNavStructure() {} + public function getNavStructure() {} - // }}} + // }}} } ?> diff --git a/Toolkit/Template/Navigation/MainNavigationAllInOne.php b/Toolkit/Template/Navigation/MainNavigationAllInOne.php index 36e45d9..66dbcc4 100644 --- a/Toolkit/Template/Navigation/MainNavigationAllInOne.php +++ b/Toolkit/Template/Navigation/MainNavigationAllInOne.php @@ -27,67 +27,67 @@ * @link <> */ class Toolkit_Template_Navigation_MainNavigationAllInOne - extends Toolkit_Template_Navigation_MainNavigationAbstract + extends Toolkit_Template_Navigation_MainNavigationAbstract { /** * Recursive function to create a multi dimensional array for sub nav - * - * create tree (A) at the starting page level, pass the tree up to - * parent page, where tree (B) is created for that level. append - * tree A to tree B as a sub under the correct parent - * - * @param Toolkit_Toolbox_GatewayAbstract $gateway Toolbox gateway - * @param integer $id id to get subtree for - * @param array $tree subtree created to be - * passed up to the parent - * level - * @param integer $appendTo pageId to append the - * passed up subtree to - * + * + * create tree (A) at the starting page level, pass the tree up to + * parent page, where tree (B) is created for that level. append + * tree A to tree B as a sub under the correct parent + * + * @param Toolkit_Toolbox_GatewayAbstract $gateway Toolbox gateway + * @param integer $id id to get subtree for + * @param array $tree subtree created to be + * passed up to the parent + * level + * @param integer $appendTo pageId to append the + * passed up subtree to + * * @return array navigational array hash * @access public */ - public function getNavStructure( - Toolkit_Toolbox_GatewayAbstract $gateway, - $id - ) { + public function getNavStructure( + Toolkit_Toolbox_GatewayAbstract $gateway, + $id + ) { static $currentPage; if (!$currentPage) { - $currentPage = $gateway->findNavItem($id); + $currentPage = $gateway->findNavItem($id); $this->_currentPage = $currentPage['navigation_name']; $subPages = $gateway->findAllByParent(0); } else { $subPages = $gateway->findAllByParent($id); } - $nav = array(); - foreach ($subPages as $subPage) { - // no home page in sub nav - if (defined('MEMBERS_CATEGORY') && MEMBERS_CATEGORY) { - if ( ($subPage['parent'] != MEMBERS_CATEGORY) - && $subPage['active'] - ) { - $nav[$subPage['id']] = array( - 'Title' => htmlspecialchars($subPage['navigation_name']), - 'url' => Toolkit_Template_Page::getSeoUrl($gateway, $subPage['id']) - ); - } - } else { - if ($subPage['active']) { - $nav[$subPage['id']] = array( - 'Title' => htmlspecialchars($subPage['navigation_name']), - 'url' => Toolkit_Template_Page::getSeoUrl($gateway, $subPage['id']) - ); - } - } + $nav = array(); + foreach ($subPages as $subPage) { + // no home page in sub nav + if (defined('MEMBERS_CATEGORY') && MEMBERS_CATEGORY) { + if ( ($subPage['parent'] != MEMBERS_CATEGORY) + && $subPage['active'] + ) { + $nav[$subPage['id']] = array( + 'Title' => htmlspecialchars($subPage['navigation_name']), + 'url' => Toolkit_Template_Page::getSeoUrl($gateway, $subPage['id']) + ); + } + } else { + if ($subPage['active']) { + $nav[$subPage['id']] = array( + 'Title' => htmlspecialchars($subPage['navigation_name']), + 'url' => Toolkit_Template_Page::getSeoUrl($gateway, $subPage['id']) + ); + } + } $isSubPage = $this->isSubOfPage($currentPage['id'], $subPage['id']); if ($isSubPage) { $nav[$subPage['id']]['sub'] = $this->getNavStructure($gateway, $subPage['id']); } - } + } return $nav; - } + } /** * Checks to see if the given $id is a sub page of the $parent diff --git a/Toolkit/Template/Navigation/MainNavigationDynamic.php b/Toolkit/Template/Navigation/MainNavigationDynamic.php index 8e3c079..117b5b1 100644 --- a/Toolkit/Template/Navigation/MainNavigationDynamic.php +++ b/Toolkit/Template/Navigation/MainNavigationDynamic.php @@ -15,9 +15,9 @@ /** * Toolkit_Template_Navigation_MainNavigationDynamic - * + * * Description of Toolkit_Template_Navigation_MainNavigationDynamic - * + * * @category Toolkit * @package Template/Navigation * @author Jamie Kahgee @@ -27,78 +27,78 @@ * @link <> */ class Toolkit_Template_Navigation_MainNavigationDynamic - extends Toolkit_Template_Navigation_MainNavigationAbstract + extends Toolkit_Template_Navigation_MainNavigationAbstract { - // {{{ getNavSructure() + // {{{ getNavSructure() /** * Recursive function to create a multi dimensional array for sub nav - * - * create tree (A) at the starting page level, pass the tree up to - * parent page, where tree (B) is created for that level. append - * tree A to tree B as a sub under the correct parent - * - * @param Toolkit_Toolbox_GatewayAbstract $gateway Toolbox gateway - * @param integer $id id to get subtree for - * @param array $tree subtree created to be - * passed up to the parent - * level - * @param integer $appendTo pageId to append the - * passed up subtree to - * + * + * create tree (A) at the starting page level, pass the tree up to + * parent page, where tree (B) is created for that level. append + * tree A to tree B as a sub under the correct parent + * + * @param Toolkit_Toolbox_GatewayAbstract $gateway Toolbox gateway + * @param integer $id id to get subtree for + * @param array $tree subtree created to be + * passed up to the parent + * level + * @param integer $appendTo pageId to append the + * passed up subtree to + * * @return array navigational array hash * @access public */ - public function getNavStructure( - Toolkit_Toolbox_GatewayAbstract $gateway, - $id, - array $tree = null, - $appendTo = null - ) { + public function getNavStructure( + Toolkit_Toolbox_GatewayAbstract $gateway, + $id, + array $tree = null, + $appendTo = null + ) { $id = 0; - $currentPage = $gateway->findNavItem($id); - $this->_currentPage = $currentPage['navigation_name']; + $currentPage = $gateway->findNavItem($id); + $this->_currentPage = $currentPage['navigation_name']; - $subPages = $gateway->findAllByParent($id); + $subPages = $gateway->findAllByParent($id); - $nav = array(); - foreach ($subPages as $subPage) { - // no home page in sub nav - if (defined('MEMBERS_CATEGORY') && MEMBERS_CATEGORY) { - if ( ($subPage['parent'] != MEMBERS_CATEGORY) - && $subPage['active'] - ) { - $nav[$subPage['id']] = array( - 'Title' => htmlspecialchars($subPage['navigation_name']), - 'url' => Toolkit_Template_Page::getSeoUrl($gateway, $subPage['id']) - ); - } - } else { - if ($subPage['active']) { - $nav[$subPage['id']] = array( - 'Title' => htmlspecialchars($subPage['navigation_name']), - 'url' => Toolkit_Template_Page::getSeoUrl($gateway, $subPage['id']) - ); - } - } - } + $nav = array(); + foreach ($subPages as $subPage) { + // no home page in sub nav + if (defined('MEMBERS_CATEGORY') && MEMBERS_CATEGORY) { + if ( ($subPage['parent'] != MEMBERS_CATEGORY) + && $subPage['active'] + ) { + $nav[$subPage['id']] = array( + 'Title' => htmlspecialchars($subPage['navigation_name']), + 'url' => Toolkit_Template_Page::getSeoUrl($gateway, $subPage['id']) + ); + } + } else { + if ($subPage['active']) { + $nav[$subPage['id']] = array( + 'Title' => htmlspecialchars($subPage['navigation_name']), + 'url' => Toolkit_Template_Page::getSeoUrl($gateway, $subPage['id']) + ); + } + } + } - if (is_array($tree) && array_key_exists($appendTo, $nav)) { - $nav[$appendTo]['sub'] = $tree; - } + if (is_array($tree) && array_key_exists($appendTo, $nav)) { + $nav[$appendTo]['sub'] = $tree; + } - if ($currentPage['parent'] != 0) { - return $this->getNavStructure( - $gateway, - $currentPage['parent'], - $nav, - $id - ); - } else { - return $nav; - } - } + if ($currentPage['parent'] != 0) { + return $this->getNavStructure( + $gateway, + $currentPage['parent'], + $nav, + $id + ); + } else { + return $nav; + } + } - // }}} + // }}} } ?> diff --git a/admin/nav.phtml b/admin/nav.phtml index 86816e3..dcff3d6 100644 --- a/admin/nav.phtml +++ b/admin/nav.phtml @@ -85,7 +85,7 @@ if (defined('BANNERS') && BANNERS) { $nav['Banners'] = MEDIA_BASE_URL.'admin/banners.php'; } if (defined('CONTACT_DB') && CONTACT_DB) { - $nav['Contacts'] = MEDIA_BASE_URL.'admin/Contact/'; + //$nav['Contacts'] = MEDIA_BASE_URL.'admin/Contact/'; } if (defined('EVENT_DB') && EVENT_DB) { $nav['Events'] diff --git a/config/application.ini b/config/application.ini index 1de01fc..f6ef5cb 100644 --- a/config/application.ini +++ b/config/application.ini @@ -126,7 +126,7 @@ ticketing.cat_seo = Off employment.application = Off videos.application = On seasons.application = Off -blocks.application = Off +blocks.application = On ; development server configuration data inherits from production and ; overrides values as necessary [development : production] diff --git a/static/8.phtml b/static/8.phtml new file mode 100644 index 0000000..705e836 --- /dev/null +++ b/static/8.phtml @@ -0,0 +1,12 @@ +configureForm(); + $cf->useCaptcha(true); + echo $cf->toHtml(); +} diff --git a/styles.css b/styles.css index 5afd020..2b00b51 100644 --- a/styles.css +++ b/styles.css @@ -34,13 +34,13 @@ body { } h1:empty, h2:empty, h3:empty { - display: none; + display: none; } a img { - border: 0 none; - display: block; - margin: 0; - padding: 0; + border: 0 none; + display: block; + margin: 0; + padding: 0; } #toolbox #category, #toolbox.listing { display:block; @@ -50,28 +50,28 @@ a img { #toolbox #category img, #toolbox .listing img { - display: block; - border: 0; - max-width: 100%; - height: auto; + display: block; + border: 0; + max-width: 100%; + height: auto; } input[type="radio"], input[type="checkbox"] { - line-height: normal; + line-height: normal; } .webform table { - margin: 10px 0 0 0; - clear: both; + margin: 10px 0 0 0; + clear: both; } .req { - clear: both !important; + clear: both !important; } .tooltip { - padding: 0 0 0 5px; + padding: 0 0 0 5px; } .file-download { - padding: 0; - margin:0; + padding: 0; + margin:0; } .avi { background-image: url(images/file-ext/avi.gif); } .doc { background-image: url(images/file-ext/doc.gif); } @@ -88,10 +88,10 @@ input[type="radio"], input[type="checkbox"] { .zip { background-image: url(images/file-ext/zip.png); } .download { background-image: url(images/file-ext/download.gif); clear: none;} *:focus { - outline: none; + outline: none; } .nobreak { - white-space: nowrap; + white-space: nowrap; } /********************************************************************** HEADER */ header { @@ -205,9 +205,19 @@ header a:active { /********************************************************************** HERO */ #hero { width: 100%; - height: 525px; background-image: url(img/hero_bg.jpg); } +#home #hero { + /* height: 350px; */ + height: auto; +} +#inside #hero { + /* height: 100px; */ + height: auto; +} +#slider-wrapper { + height: 330px; +} #hero_wrap { width: 1070px; margin: 0 auto; @@ -295,26 +305,26 @@ header a:active { } #toolbox .imageright { display: block; - float: right; - margin: 15px0; - width: auto; - max-width: 50%; - position: relative; - border: 0; - padding: 10px; - background: #FFF; + float: right; + margin: 15px0; + width: auto; + max-width: 50%; + position: relative; + border: 0; + padding: 10px; + background: #FFF; overflow:hidden; } #toolbox .imageleft { display: block; - float: left; - margin: 15px0; - width: auto; - max-width: 50%; - position: relative; - border: 0; - padding: 10px; - background: #FFF; + float: left; + margin: 15px0; + width: auto; + max-width: 50%; + position: relative; + border: 0; + padding: 10px; + background: #FFF; overflow:hidden; } .imagecaption { diff --git a/templates/template.html b/templates/template.html index 06d1ad6..599ef2e 100644 --- a/templates/template.html +++ b/templates/template.html @@ -19,98 +19,15 @@
+ {if:rotatingImages} + {rotatingImages:h} + {end:} -
@@ -122,8 +39,6 @@ {toolboxContent:h} - -

Headlines

- + -- 2.17.1