₺800/3 Aylık
₺400/3 Aylık
₺350/3 Aylık
₺250/3 Aylık
Henüz bir seçim yapmadınız.
Merhaba Group İD belirtmeniz doğrultusunda, grupa ait kullanıcıları listeler.SpPortal yada normal SSI olarak çağırabilirsiniz.Merhaba;
SMF dizininde bulunan "avatar.php" üzerinde SMF avatarlarını göstermek istiyorum. "avatar.php" dosyasını SimplePortal ile PHP blok şeklinde eklemek istiyorum. Nasıl yapabilirim?
<?php
require("SSI.php");
function selectgroup_portal($group_id=1){
global $smcFunc,$scripturl, $modSettings;
$reqselectgroup = $smcFunc['db_query']('', '
SELECT
m.id_member, m.real_name, m.avatar, m.location,
mg.group_name, mg.online_color,
a.id_attach, a.attachment_type, a.filename
FROM {db_prefix}members AS m
LEFT JOIN {db_prefix}membergroups AS mg ON (mg.id_group = m.id_group)
LEFT JOIN {db_prefix}attachments AS a ON (a.id_member = m.id_member)
WHERE mg.id_group = {int:reg_group_id} AND m.is_activated=1 AND mg.hidden != 1',
array(
'reg_group_id' => $group_id,
)
);
$seleklegroup=array();
while($row=$smcFunc['db_fetch_assoc']($reqselectgroup)){
if ($modSettings['avatar_action_too_large'] == 'option_html_resize' || $modSettings['avatar_action_too_large'] == 'option_js_resize')
{
$avatar_width = !empty($modSettings['avatar_max_width_external']) ? ' width="' . $modSettings['avatar_max_width_external'] . '"' : '';
$avatar_height = !empty($modSettings['avatar_max_height_external']) ? ' height="' . $modSettings['avatar_max_height_external'] . '"' : '';
}
else
{
$avatar_width = '';
$avatar_height = '';
}
$seleklegroup[]=array(
'id' => $row['id_member'],
'name' => $row['real_name'],
'location' => $row['location'],
'link' => '<a href="' . $scripturl . '?action=profile;u=' . $row['id_member'] . '">' . $row['real_name'] . '</a>',
'group' => '<span style="color:'.$row['online_color'].'">'.$row['group_name'].'</span>',
'color' => $row['online_color'],
'avatar' => array(
'name' => $row['avatar'],
'image' => $row['avatar'] == '' ? ($row['id_attach'] > 0 ? '<img src="' . (empty($row['attachment_type']) ? $scripturl . '?action=dlattach;attach=' . $row['id_attach'] . ';type=avatar' : $modSettings['custom_avatar_url'] . '/' . $row['filename']) . '" alt="" class="avatar" border="0" />' : '') : (stristr($row['avatar'], 'http://') ? '<img src="' . $row['avatar'] . '"' . $avatar_width . $avatar_height . ' alt="" class="avatar" border="0" />' : '<img src="' . $modSettings['avatar_url'] . '/' . htmlspecialchars($row['avatar']) . '" alt="" class="avatar" border="0" />'),
'href' => $row['avatar'] == '' ? ($row['id_attach'] > 0 ? (empty($row['attachment_type']) ? $scripturl . '?action=dlattach;attach=' . $row['id_attach'] . ';type=avatar' : $modSettings['custom_avatar_url'] . '/' . $row['filename']) : '') : (stristr($row['avatar'], 'http://') ? $row['avatar'] : $modSettings['avatar_url'] . '/' . $row['avatar']),
'url' => $row['avatar'] == '' ? '' : (stristr($row['avatar'], 'http://') ? $row['avatar'] : $modSettings['avatar_url'] . '/' . $row['avatar'])
),
);
}
$smcFunc['db_free_result']($reqselectgroup);
echo '<table style="border-collapse: collapse;">';
foreach ($seleklegroup as $sel)
echo '
<tr style="border-bottom:3px dotted '.$sel['color'].'">
<td class="sp_staff sp_center">', !empty($sel['avatar']['href']) ? '
<a href="' . $scripturl . '?action=profile;u=' . $sel['id'] . '"><img src="' . $sel['avatar']['href'] . '" alt="' . $sel['name'] . '" width="40" /></a>' : '', '
</td>
<td>
', $sel['link'], '<br />
', $sel['group'], '<br />
',$sel['location'],'
</td>
</tr>';
echo '</table>';
}
selectgroup_portal(1);
$smf_user = "smf_kullanıcı_adı";
$userID = loadMemberData($smf_user,true,'normal');
loadMemberContext($userID[0]);
$avatar_link = $memberContext[$userID[0]]['avatar']['href'];
loadMemberData
çalışmaz size yukarda çalışacak kod yapısını sundum selectgroup_portal(1);
parametresi yada sizin belirleyeceğiniz bir döngüyle rahatlıkla ala bilirsiniz ben size başka yârdim edemem cönkü kurulu bir smf formum yok bu yüzden smf destek sitelerinden yârdim almanızı tavsiye ederim.$smf_user = "smf_kullanıcı_adı";
$userID = loadMemberData($smf_user,true,'normal');
loadMemberContext($userID[0]);
global $memberContext;
$avatar_link = $memberContext[$userID[0]]['avatar']['href'];
We use essential cookies to make this site work, and optional cookies to enhance your experience.