Skip to content
Snippets Groups Projects
header.php 2.97 KiB
Newer Older
<?php

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" src="<?php echo $vars['url']; ?>vendors/jquery/jquery-1.2.6.pack.js"></script>  -->
<script type="text/javascript">var $ = window.$ = window.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']; ?>_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) { ?>
    <!-- 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>
Brett Bieber's avatar
Brett Bieber committed
    <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 -->
Brett Bieber's avatar
Brett Bieber committed
<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); 
?>
<script type="text/javascript">
(function($){
	// Edit Profile Stuff
	function updateLL () {
		var city = $("input[name=form_data_profile_city]").val(), state = $("input[name=form_data_profile_state]").val(), country = $("input[name=form_data_profile_country]").val();
		$.get("/UNL_Elgg/scripts/latlon.php",{city:city,state:state,country:country},function(response){
			try {
				var data = eval(response);
				$("input[name=form_data_latitude]").val(data.latitude);
				$("input[name=form_data_longitude]").val(data.longitude);
			} catch (e) {}
		});
	};
			
	$(document).ready(function(){
		// don't display the latitude/longitude fields
		$("input[name=form_data_latitude],input[name=form_data_longitude]").parent().hide();
		// update the lat/long automatically whenever current location is changed
		$("input[name=form_data_profile_city],input[name=form_data_profile_state],input[name=form_data_profile_country]").change(function(){
			updateLL();
		});
	});
})(jQuery);
</script>