Skip to content
Snippets Groups Projects
header.php 3.83 KiB
<?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) {
	$url = $url2 = full_url();
	if (substr_count($url,'?')) {
		$url .= "&view=rss";
	} else {
		$url .= "?view=rss";
	}
	if (substr_count($url2,'?')) {
		$url2 .= "&view=odd";
	} else {
		$url2 .= "?view=opendd";
	}
	$feedref = <<<END
		
	<link rel="alternate" type="application/rss+xml" title="RSS" href="{$url}" />
	<link rel="alternate" type="application/odd+xml" title="OpenDD" href="{$url2}" />
		
END;
} else {
	$feedref = "";
}

$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; ?>
<?php if (isset($pickerinuse) && $pickerinuse == true) : ?>
	<?php //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 endif; ?>

<?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); 
?>

<?php if (preg_match('/friend/', $vars['title'])) : ?>
	<script type="text/javascript">
	WDN.jQuery(document).ready(function(){
		WDN.jQuery("#content_area_user_title h2").after('<p><a href="<?php echo $CONFIG->url;?>mod/members/">Browse all the Planet Red users</a> to find your Husker friends!</p>');
	});
	</script>
<?php endif; ?>

<?php if (!isloggedin()) : //The styles for the information box to be displayed if a non-authenticated user has arrived. ?>
	<script type="text/javascript" src="<?php echo $vars['url'] .'mod/unl_theme/scripts/JS/actionNotice.js'?>"></script>
<?php else : ?>
	<script type="text/javascript">
	WDN.idm.setLogoutURL('<?php echo $vars['url']; ?>action/logout');
	</script>
<?php endif; ?>

<?php if ($vars['title'] == "Edit profile") : //CSS and JS for only the profile edit form page ?>
<?php require_once(dirname(dirname(dirname(dirname(dirname(__FILE__))))) . '/unl_theme/scripts/JS/enhanceProfileForm.php'); ?>
	
	<style type="text/css">
	#profileEditor input[name$="city"] {
		text-transform: capitalize;
	}
	input[name=form_data_profile_city], select[name=form_data_profile_state], select[name=form_data_profile_country],
	input[name=form_data_profile_homecity], select[name=form_data_profile_homestate], select[name=form_data_profile_homecountry],
	select[name=form_data_profile_dob_month], select[name=form_data_profile_dob_day], select[name=form_data_profile_dob_year],
	select[name=form_data_profile_attended_from], select[name=form_data_profile_attended_to] {
		width: auto !important;
		margin-right: 4px;
	}
	</style>
<?php endif; ?>