Commit 4077c54e authored by Richard Mansfield's avatar Richard Mansfield
Browse files

Don't stretch profile images in online users block


Signed-off-by: default avatarRichard Mansfield <richardm@catalyst.net.nz>
parent 4869832e
......@@ -2152,7 +2152,7 @@ function onlineusers_sideblock() {
foreach ($onlineusers as &$user) {
if ($user->id == $USER->get('id')) {
// Use a shorter caching time for the current user, just in case they change their profile icon
$user->profileiconurl = get_config('wwwroot') . 'thumb.php?type=profileicon&id=' . $user->id . '&size=20x20&earlyexpiry=1';
$user->profileiconurl = get_config('wwwroot') . 'thumb.php?type=profileicon&id=' . $user->id . '&maxheight=20&maxwidth=20&earlyexpiry=1';
}
else {
$user->profileiconurl = profile_icon_url($user, 20, 20);
......
......@@ -916,9 +916,12 @@ li#pendingfriends a {
#sb-onlineusers li {
line-height: 2.1em;
}
#sb-onlineusers ul img {
float: left;
padding-right: .5em;
#sb-onlineusers .image-container {
width: 20px;
height: 20px;
float: left;
padding-right:.5em;
text-align: center;
}
#lastminutes {
float: right;
......
......@@ -4,7 +4,7 @@
<div class="sideblock-content">
<ul class="cr">
{foreach from=$sbdata.users item=user}
<li><a href="{$WWWROOT}user/view.php?id={$user->id|escape}"><img src="{$user->profileiconurl|escape}" alt="" width="20" height="20"> {$user|display_name|escape}</a>{if $user->loggedinfrom} ({$user->loggedinfrom|escape}){/if}</li>
<li><a href="{$WWWROOT}user/view.php?id={$user->id|escape}"><div class="image-container"><img src="{$user->profileiconurl|escape}" alt=""></div>{$user|display_name|escape}</a>{if $user->loggedinfrom} ({$user->loggedinfrom|escape}){/if}</li>
{/foreach}
</ul>
</div>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment