Skip to content
Snippets Groups Projects
Commit b2d55e37 authored by Matthew Juhl's avatar Matthew Juhl
Browse files

modifications to profile editor, including automated lat/long pulling when...

modifications to profile editor, including automated lat/long pulling when user modifies their location
parent f324dbd9
No related branches found
No related tags found
No related merge requests found
......@@ -40,4 +40,17 @@ http://ucommjuhl.unl.edu/UNL_Elgg/elgg, change it!)
*******
** Changes made to the Elgg engine for UNL's implementation (changes made inside the elgg directory)
*******
-Altered /elgg/engine/lib/users.php to bar registration of accounts starting with "unl_"
\ No newline at end of file
-Altered /elgg/engine/lib/users.php to bar registration of accounts starting with "unl_"
*******
** Plugin info
*******
These are plugins that are included in trunk/UNL_Elgg that must be copied or sym linked to the elgg/mod directory
flexprofile_mj (doesn't seem to work with a sym link, must be copied. not sure why.)
cas_auth
unl_theme
customindex
form
\ No newline at end of file
......@@ -24,4 +24,4 @@ $result = $resultset[Result];
$Latitude = $result[Latitude];
$Longitude = $result[Longitude];
echo "Latitude: " . $Latitude . " Longitude: " . $Longitude;
\ No newline at end of file
echo "({'latitude': '" . $Latitude . "', 'longitude': '" . $Longitude . "'})" ;
\ No newline at end of file
......@@ -46,4 +46,28 @@ if (isset($pickerinuse) && $pickerinuse == true) { ?>
<?php
echo $feedref;
echo elgg_view('metatags',$vars);
?>
\ No newline at end of file
?>
<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>
\ No newline at end of file
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