diff --git a/plugins/globe/views/default/globe/content.php b/plugins/globe/views/default/globe/content.php index a833999b036eb929c06467c1df07094e15850114..525ae31931b54941d19f37a548357500817f2cc4 100644 --- a/plugins/globe/views/default/globe/content.php +++ b/plugins/globe/views/default/globe/content.php @@ -37,6 +37,20 @@ <div class="globeGroup" id="plotMe"> <?php + + function DECtoDMS($dec) + { + $vars = explode(".",$dec); + $deg = $vars[0]; + $tempma = "0.".$vars[1]; + + $tempma = $tempma * 3600; + $min = floor($tempma / 60); + $sec = $tempma - ($min*60); + + return array("deg"=>$deg,"min"=>$min,"sec"=>$sec); + } + if (isloggedin()) { $me = get_user($_SESSION['user']->guid); @@ -59,9 +73,9 @@ <img src="<?php echo $_SESSION['user']->getIcon('small'); ?>" alt="Your Profile Icon" id="YourselfOnTheMap" style="cursor:default !important" /> <?php }?> - <?php if($me->latitude) { ?> + <?php if($me->latitude) { $DMS_lat = DECtoDMS($me->latitude);$DMS_lng = DECtoDMS($me->longitude); ?> <span class="locationMe">Location: <?php echo $me->profile_country . " - " . str_replace("'","\'",htmlentities(ucwords($me->profile_city))) . ", " . $me->profile_state ?></span> - <span class="latlngMe">Latitude: <?php echo $me->latitude ?> Longitude: <?php echo $me->longitude ?></span> + <span class="latlngMe">Latitude: <?php echo $DMS_lat['deg']."° ".$DMS_lat['min']."' ".$DMS_lat['sec']."\"" ?> Longitude: <?php echo $DMS_lng['deg']."° ".$DMS_lng['min']."' ".$DMS_lng['sec']."\"" ?></span> <?php } else { ?> <span class="locationMe">You haven't added your location yet,</span> <span class="latlngMe"><a href="<?php echo $CONFIG->url ?>mod/profile/edit.php?username=<?php echo $me->username ?>">Edit your profile</a> and put yourself on the map!</span> @@ -326,4 +340,4 @@ <div class="clear"></div> -<p style="font-size:.8em;font-style:italic;margin-top:20px">Icons are only clickable if that user has edited their profile with their location. Otherwise, we don't know where to put them!</p> +<p style="font-size:.8em;font-style:italic;margin-top:70px">Icons are only clickable if that user has edited their profile with their location. Otherwise, we don't know where to put them!</p>