Skip to content
Snippets Groups Projects
Commit 3f138504 authored by Eric Rasmussen's avatar Eric Rasmussen
Browse files

update unl_theme page_elements/pageshells code to better mirror the default elgg version

parent ff47a1f7
No related branches found
No related tags found
No related merge requests found
<?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
<?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; ?>&amp;js=initialise_elgg&amp;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; ?>&amp;js=friendsPickerv1&amp;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; ?>&amp;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; ?>&amp;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">
......
<?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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment