Skip to content
Snippets Groups Projects
pageshell.php 2.88 KiB
<?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'];
}

set_include_path(get_include_path() . PATH_SEPARATOR . dirname($vars['config']->path).'/lib/php');
require_once 'UNL/Templates.php';

UNL_Templates::$options['version'] = 3;
$page = UNL_Templates::factory('Fixed');

$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 | '.$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->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->titlegraphic = '<h1><a href="'.$vars['config']->url.'" title="Planet Red Home">'.$vars['config']->sitename.'</a></h1>';

// not using element elgg_topbar
//$page->maincontentarea .= elgg_view('page_elements/elgg_topbar', $vars);
// Commented out for now because this has unclosed divs.
//$page->maincontentarea .= elgg_view('page_elements/header_contents', $vars);

$page->maincontentarea .= elgg_view('messages/list', array('object' => $vars['sysmessages']));
$page->maincontentarea .= $vars['body'];

/* not using the spotlight feature at this time
if (isloggedin()) {
    // spotlight
    $page->maincontentarea .= elgg_view('page_elements/spotlight', $vars);
}
*/



$page->leftcollinks = '<h3>Related Links</h3>
<ul>
<li>
<a href="http://clubred.unl.edu">ClubRed</a>
</li>
<li>
<a href="http://www.huskeralum.com" class="external">Nebraska Alumni Association</a>
</li>
<li>
<a href="http://admissions.unl.edu">Undergraduate Office of Admissions</a>
</li>
</ul>';
$page->contactinfo = '<h3>Contacting Us</h3><p><strong>University of Nebraska-Lincoln</strong><br/>1400 R Street<br/>Lincoln, NE 68588<br/>402-472-7211</p>';

$page->footercontent = elgg_view('page_elements/footer', $vars);

echo $page;