Customizing SMF > SMF Coding Discussion
SSI - FetchGroupMembers with Avatar
FrizzleFried:
The following edit produces an output as seen in the attachment below... (and it works with SimplePortal for anyone who may wonder)...
--- Code: ---<?php
require_once('SSI.php');
$group_id = 2;
$users = ssi_fetchGroupMembers($group_id, 'array');
echo '
<center/><style type="text/css">
.cust_av img {
width: 50px;
height: 50px;
}
</style>
<table border="0" class="ssi_table">';
foreach($users as $user)
{
echo '
<tr>
<td class="cust_av">
', $user['avatar']['image'], '<br />', '<center />', '', $user['link'], '
</td>
</tr>';
}
echo '
</table>';
?>
--- End code ---
Suki:
You can try to do a print_r on $user['avatar'], most of the times $user['avatar'] is actually an array with different options, one of them is the avatar url $user['avatar']['href'] and with that you can build your img tag:
<img sr="', $user['avatar']['href'] ,'" width="30px" />
Realinfo:
by this http://simpleportal.net/index.php?topic=8765.0 my all issues are sloved........... but thanks to all who gave give to me...................
IchBin™:
--- Quote from: Suki on May 01, 2012, 09:21:21 AM ---You can try to do a print_r on $user['avatar'], most of the times $user['avatar'] is actually an array with different options, one of them is the avatar url $user['avatar']['href'] and with that you can build your img tag:
<img sr="', $user['avatar']['href'] ,'" width="30px" />
--- End quote ---
Forgot about that! Thanks for the reminder Suki!
Realinfo:
With name and Avatar
can we have Personal Message and Their Signature Option ?
If yes, please give code for it
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version