Customizing SMF > SMF Coding Discussion
SSI - FetchGroupMembers with Avatar
Realinfo:
Thanks.............. If u find how to resize Avatar, please tell..........
IchBin™:
Without modifying any Source files you could add some CSS possibly to do the same thing.
--- Code: ---<?php
require_once('SSI.php');
$group_id = 1;
$users = ssi_fetchGroupMembers($group_id, 'array');
echo '
<style type="text/css">
.cust_av img {
height: 25%;
}
</style>
<table border="0" class="ssi_table">';
foreach($users as $user)
{
echo '
<tr>
<td class="cust_av">
', $user['link'], '<br />', $user['avatar']['image'], '
</td>
</tr>';
}
echo '
</table>';
?>
--- End code ---
Realinfo:
--- Quote from: IchBin™ on April 30, 2012, 05:35:40 PM ---Without modifying any Source files you could add some CSS possibly to do the same thing.
--- Code: ---<?php
require_once('SSI.php');
$group_id = 1;
$users = ssi_fetchGroupMembers($group_id, 'array');
echo '
<style type="text/css">
.cust_av img {
height: 25%;
}
</style>
<table border="0" class="ssi_table">';
foreach($users as $user)
{
echo '
<tr>
<td class="cust_av">
', $user['link'], '<br />', $user['avatar']['image'], '
</td>
</tr>';
}
echo '
</table>';
?>
--- End code ---
--- End quote ---
Avatars are still in same size............
IchBin™:
Did you try anything else? The code worked for me, so maybe it's a browser thing not picking up the height. Try width instead or something. Don't be afraid to play around until you figure it out. That's all anyone else would be doing here.
Realinfo:
--- Quote from: IchBin™ on April 30, 2012, 10:27:10 PM ---Did you try anything else? The code worked for me, so maybe it's a browser thing not picking up the height. Try width instead or something. Don't be afraid to play around until you figure it out. That's all anyone else would be doing here.
--- End quote ---
Yes......... by ur help it's ok now............ I use code this way..........
--- Code: ---<?php
require_once('SSI.php');
$group_id = 2;
$users = ssi_fetchGroupMembers($group_id, 'array');
echo '
<style type="text/css">
.cust_av img {
width: 25%;
height: 25%;
}
</style>
<table border="0" class="ssi_table">';
foreach($users as $user)
{
echo '
<tr>
<td class="cust_av">
', $user['link'], '<br />', $user['avatar']['image'], '
</td>
</tr>';
}
echo '
</table>';
?>
--- End code ---
Now I Want.........
First come Avatar and then Name.............
I mean Right hand side Avatar then after that Name..............
Attachment shown what I'm getting now............
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version