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">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']; ?>_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) { ?>
<!-- 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);
Matthew Juhl
committed
?>
<?php
if ($vars[title] == "Edit profile") {
?>
Matthew Juhl
committed
<script type="text/javascript">
(function(){
Matthew Juhl
committed
// 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();
});
});
<?php
}
?>