Skip to content

Commit

Permalink
Merge pull request #159 from partydragen/patch-15
Browse files Browse the repository at this point in the history
Display custom avatars in Members List
  • Loading branch information
samerton committed Apr 3, 2016
2 parents b909429 + 2a32550 commit 4c8f0e7
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions pages/members.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,15 @@
break;
}
}
// Get avatar
if($individual->has_avatar == 1){
$avatar = '<img class="img-rounded" style="margin: -10px 0px; width:35px; height:35px;" src="' . $user->getAvatar($individual->id) . '" />';
} else {
$avatar = '<img class="img-rounded" style="margin: -10px 0px;" src="https://cravatar.eu/avatar/' . htmlspecialchars($individual->mcname) . '/35.png">';
}
?>
<tr>
<td><img class="img-rounded" style="margin: -10px 0px;" src="https://cravatar.eu/avatar/<?php echo htmlspecialchars($individual->mcname); ?>"> <a href="/profile/<?php echo htmlspecialchars($individual->mcname); ?>"><?php echo htmlspecialchars($individual->username); ?></a></td>
<td><?php echo ($avatar) ?> <a href="/profile/<?php echo htmlspecialchars($individual->mcname); ?>"><?php echo htmlspecialchars($individual->username); ?></a></td>
<td><?php echo $user_group; ?></td>
<td><?php echo date('d M Y', $individual->joined); ?></td>
</tr>
Expand Down Expand Up @@ -122,4 +128,4 @@
});
</script>
</body>
</html>
</html>

0 comments on commit 4c8f0e7

Please sign in to comment.