Dene bakalım istediğin gibi olacak mı? (Profil özetinde imza altında arkadaş listesini gösterir)
Not: İngilizce değildir. Dil dosyalarından bağımsız çalışır. İsterseniz dil dosyalarına da kodlardaki Türkçe yazıları ekleyebilirsiniz.
// Show all the users buddies, as well as a add/delete interface.
function editBuddies($memID)
{
// Arkadas listesini goster
function blistedit($memID)
{
global $txt, $scripturl, $modSettings, $db_prefix;
global $context, $user_profile, $memberContext, $func;
// For making changes!
$buddiesArray = explode(',', $user_profile[$memID]['buddy_list']);
foreach ($buddiesArray as $k => $dummy)
if ($dummy == '')
unset($buddiesArray[$k]);
// Get all the users "buddies"...
$buddies = array();
if (!empty($buddiesArray))
{
$result = db_query("
SELECT ID_MEMBER
FROM {$db_prefix}members
WHERE ID_MEMBER IN (" . implode(', ', $buddiesArray) . ")
ORDER BY realName
LIMIT " . (substr_count($user_profile[$memID]['buddy_list'], ',') + 1), __FILE__, __LINE__);
while ($row = mysql_fetch_assoc($result))
$buddies[] = $row['ID_MEMBER'];
mysql_free_result($result);
}
$context['buddy_count'] = count($buddies);
// Load all the members up.
loadMemberData($buddies, false, 'profile');
// Setup the context for each buddy.
$context['buddies'] = array();
foreach ($buddies as $buddy)
{
loadMemberContext($buddy);
$context['buddies'][$buddy] = $memberContext[$buddy];
}
}
// Attempt to load the member's profile data.
if (!loadMemberContext($memID) || !isset($memberContext[$memID]))
fatal_error($txt[453] . ' - ' . $memID, false);
echo blistedit($memID);
// Show the users signature.
echo '
<tr>
<td colspan="2" height="25">
<table width="100%" cellpadding="0" cellspacing="0" border="0" style="table-layout: fixed;">
<tr>
<td style="padding-bottom: 0.5ex;"><b>', $txt[85], ':</b></td>
</tr><tr>
<td colspan="2" width="100%" class="smalltext"><div class="signature">', $context['member']['signature'], '</div></td>
</tr>
</table>
</td>
</tr>
';
// Arkadaslarimi goster (Aslanbek husmen73)
if (!empty($context['buddies']))
{
echo '
<tr>
<td colspan="2"><hr size="1" width="100%" class="hrcolor" /></td>
</tr>
<tr>
<td><b>Arkadaşlarım:</b></td>
</tr>
<tr class="windowbg">
<td>';
foreach ($context['buddies'] as $buddy)
{
echo $buddy['link'].', ';
}
echo '
</td>
</tr>';
}
echo '