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

Refactor code that grabs 16 recently joined members for the map.

parent b76b82e1
No related branches found
No related tags found
No related merge requests found
......@@ -141,15 +141,20 @@
</p>
<!-- lat, lng, username, location, displayname, title, comment(text area) -->
<?php
$options = array('metadata_names'=>'icontime', 'limit'=>16);
$options = array('metadata_names'=>'icontime', 'limit'=>150);
$users = elgg_get_entities_from_metadata($options);
$map_count = 0;
if($users){
foreach($users as $user){
if ($map_count >= 16){
break;
}
if (filtrado($user->map_explanation . $user->profile_city . $user->username . $user->name)) {
continue;
}
if($user->longitude != undefined && $user->longitude != "" && $user->map_explanation != undefined && $user->map_explanation != ""){
$map_count++;
echo "<div class=\"member_icon\"><img alt=\"Profile Pic\" onclick=\"window.openLocation('" . $user->longitude . "','" . $user->latitude . "','" . $user->username . "',";
if($user->profile_country)
echo "'" . $user->profile_country . " - " . str_replace("'","\'",htmlentities($user->profile_city)) . ", " . $user->profile_state . "',";
......@@ -162,7 +167,7 @@
echo "''";
echo ",'". str_replace("'","\'",htmlentities($user->map_explanation))."');return false;\" src=\"mod/profile/icon.php?username=" . $user->username . "&amp;size=tiny\" /></div>";
}
else{}
}
}
?>
......@@ -351,7 +356,6 @@
}
?>
</div>
<div class="col right">
<h3 class="sec_main">Featured Huskers</h3>
......
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