diff --git a/plugins/unl_theme/views/default/page_elements/elgg_topbar.php b/plugins/unl_theme/views/default/page_elements/elgg_topbar.php deleted file mode 100644 index 12a9599b308bb3c4b69217e5c465a59517312aef..0000000000000000000000000000000000000000 --- a/plugins/unl_theme/views/default/page_elements/elgg_topbar.php +++ /dev/null @@ -1,85 +0,0 @@ -<?php - - /** - * Elgg top toolbar - * The standard elgg top toolbar - * - * @package Elgg - * @subpackage Core - * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2 - * @author Curverider Ltd - * @copyright Curverider Ltd 2008-2009 - * @link http://elgg.org/ - * - */ -?> - -<?php - if (isloggedin()) { -?> - -<div id="elgg_topbar"> - -<div id="elgg_topbar_container_left"> - <div class="toolbarimages"> - <a href="#">TEST</a> - - <a href="<?php echo $_SESSION['user']->getURL(); ?>"><img class="user_mini_avatar" src="<?php echo $_SESSION['user']->getIcon('topbar'); ?>"></a> - - </div> - <div class="toolbarlinks"> - <a href="<?php echo $vars['url']; ?>pg/dashboard/" class="pagelinks"><?php echo elgg_echo('dashboard'); ?></a> - </div> - <?php - - echo elgg_view("navigation/topbar_tools"); - - ?> - - - <div class="toolbarlinks2"> - <?php - //allow people to extend this top menu - echo elgg_view('elgg_topbar/extend', $vars); - ?> - - <a href="<?php echo $vars['url']; ?>pg/settings/" class="usersettings"><?php echo elgg_echo('settings'); ?></a> - - <?php - - // The administration link is for admin or site admin users only - if ($vars['user']->admin || $vars['user']->siteadmin) { - - ?> - - <a href="<?php echo $vars['url']; ?>pg/admin/" class="usersettings"><?php echo elgg_echo("admin"); ?></a> - - <?php - - } - - ?> - </div> - - -</div> - - -<div id="elgg_topbar_container_right"> - <a href="<?php echo $vars['url']; ?>action/logout"><small><?php echo elgg_echo('logout'); ?></small></a> -</div> - -<div id="elgg_topbar_container_search"> -<form id="searchform" action="<?php echo $vars['url']; ?>search/" method="get"> - <input type="text" size="21" name="tag" value="Search" onclick="if (this.value=='Search') { this.value='' }" class="search_input" /> - <input type="submit" value="Go" class="search_submit_button" /> -</form> -</div> - -</div><!-- /#elgg_topbar --> - -<div class="clearfloat"></div> - -<?php - } -?> \ No newline at end of file diff --git a/plugins/unl_theme/views/default/page_elements/header.php b/plugins/unl_theme/views/default/page_elements/header.php index 612fca7adb9fc3c9aee6009a721777bf25630334..deccad6fa80e0230e4f8febcf83cca4fff4530f1 100644 --- a/plugins/unl_theme/views/default/page_elements/header.php +++ b/plugins/unl_theme/views/default/page_elements/header.php @@ -1,4 +1,17 @@ <?php +/** + * Elgg pageshell + * The standard HTML header that displays across the site + * + * @package Elgg + * @subpackage Core + * @author Curverider Ltd + * @link http://elgg.org/ + * + * @uses $vars['config'] The site configuration settings, imported + * @uses $vars['title'] The page title + * @uses $vars['body'] The main content of the page + */ global $autofeed; if (isset($autofeed) && $autofeed == true) { @@ -15,8 +28,8 @@ if (isset($autofeed) && $autofeed == true) { } $feedref = <<<END -<link rel="alternate" type="application/rss+xml" title="RSS" href="{$url}" /> -<link rel="alternate" type="application/odd+xml" title="OpenDD" href="{$url2}" /> + <link rel="alternate" type="application/rss+xml" title="RSS" href="{$url}" /> + <link rel="alternate" type="application/odd+xml" title="OpenDD" href="{$url2}" /> END; } else { @@ -26,26 +39,30 @@ END; $version = get_version(); $release = get_version(true); ?> + <meta name="ElggRelease" content="<?php echo $release; ?>" /> <meta name="ElggVersion" content="<?php echo $version; ?>" /> <script type="text/javascript">window.$ = window.jQuery = WDN.jQuery;</script> <script type="text/javascript" src="<?php echo $vars['url']; ?>vendors/jquery/jquery-ui-1.7.2.custom.min.js"></script> +<script type="text/javascript" src="<?php echo $vars['url']; ?>vendors/jquery/jquery.form.js"></script> <script type="text/javascript" src="<?php echo $vars['url']; ?>_css/js.php?lastcache=<?php echo $vars['config']->lastcache; ?>&js=initialise_elgg&viewtype=<?php echo $vars['view']; ?>"></script> <?php -global $pickerinuse; -if (isset($pickerinuse) && $pickerinuse == true) { ?> + global $pickerinuse; + if (isset($pickerinuse) && $pickerinuse == true) { +?> <!-- only needed on pages where we have friends collections and/or the friends picker --> <script type="text/javascript" src="<?php echo $vars['url']; ?>vendors/jquery/jquery.easing.1.3.packed.js"></script> <script type="text/javascript" src="<?php echo $vars['url']; ?>_css/js.php?lastcache=<?php echo $vars['config']->lastcache; ?>&js=friendsPickerv1&viewtype=<?php echo $vars['view']; ?>"></script> <?php -} -?> -<!-- include the default css file --> -<link rel="stylesheet" href="<?php echo $vars['url']; ?>_css/css.css?lastcache=<?php echo $vars['config']->lastcache; ?>&viewtype=<?php echo $vars['view']; ?>" type="text/css" /> -<?php -echo $feedref; -echo elgg_view('metatags',$vars); + } ?> + <!-- include the default css file --> + <link rel="stylesheet" href="<?php echo $vars['url']; ?>_css/css.css?lastcache=<?php echo $vars['config']->lastcache; ?>&viewtype=<?php echo $vars['view']; ?>" type="text/css" /> + + <?php + echo $feedref; + echo elgg_view('metatags',$vars); + ?> <?php if (preg_match('/friend/', $vars['title'])) { ?> <script type="text/javascript"> diff --git a/plugins/unl_theme/views/default/pageshells/pageshell.php b/plugins/unl_theme/views/default/pageshells/pageshell.php index 0b9a5430f282da7c9694d21aef703299ca51648e..087d6ad230aa95d82b3de0092bf12991dcc159f9 100644 --- a/plugins/unl_theme/views/default/pageshells/pageshell.php +++ b/plugins/unl_theme/views/default/pageshells/pageshell.php @@ -1,22 +1,45 @@ <?php +/** + * Elgg pageshell + * The standard HTML page shell that everything else fits into + * + * @package Elgg + * @subpackage Core + * @author Curverider Ltd + * @link http://elgg.org/ + * + * @uses $vars['config'] The site configuration settings, imported + * @uses $vars['title'] The page title + * @uses $vars['body'] The main content of the page + * @uses $vars['messages'] A 2d array of various message registers, passed from system_messages() + */ +// Set the content type header('Content-type: text/html; charset=UTF-8'); + +// Set title +if (empty($vars['title'])) { + $title = $vars['config']->sitename; +} else if (empty($vars['config']->sitename)) { + $title = $vars['title']; +} else { + $title = $vars['config']->sitename . " | " . $vars['title']; +} + require_once 'UNL/Templates.php'; UNL_Templates::$options['version'] = 3; $page = UNL_Templates::factory('Fixed'); -$page->maincontentarea = ''; - $page->navlinks = '<ul><li><a href="http://planetred.unl.edu/">Home</a></li><li><a href="http://planetred.unl.edu/account/register.php">Register</a></li></ul>'; $page->breadcrumbs = "<!-- WDN: see glossary item \'breadcrumbs\' --> <ul> <li class=\"first\"><a href=\"http://www.unl.edu/\">UNL</a></li> <li>Planet Red</li> </ul>"; -$page->doctitle = '<title>UNL | Planet Red | '.$vars['title'].'</title>'; +$page->doctitle = '<title>UNL | '.$title.'</title>'; $page->head .= elgg_view('page_elements/header', $vars); -$page->head .= '<script type="text/javascript">WDN.loadJS("'.$vars['url'] . 'mod/unl_theme/scripts/JS/social.js");</script>'; +$page->head .= '<script type="text/javascript">WDN.loadJS("'.$vars['url'].'mod/unl_theme/scripts/JS/social.js");</script>'; $page->addStyleSheet('/wdn/templates_3.0/css/content/zenform.css'); $page->addStyleSheet('/wdn/templates_3.0/css/content/notice.css'); -$page->maincontentarea .= elgg_view('page_elements/unl_nav', $vars); +$page->maincontentarea = elgg_view('page_elements/unl_nav', $vars); $page->titlegraphic = '<h1><a href="'.$vars['config']->url.'" title="Planet Red Home">'.$vars['config']->sitename.'</a></h1>'; // not using element elgg_topbar