./Sources/PortalBlocks.php
global $txt, $scripturl, $settings, $context, $color_profile;
global $txt, $scripturl, $settings, $context, $color_profile;
global $smcFunc, $scripturl, $modSettings;
if ($display == 'compact')
if ($display == 'full')
{
$members = array();
foreach ($items as $item)
$members[] = $item['poster']['id'];
$request = $smcFunc['db_query']('', '
SELECT m.id_member, m.avatar, a.id_attach, a.attachment_type, a.filename
FROM {db_prefix}members AS m
INNER JOIN {db_prefix}attachments AS a ON (m.id_member = a.id_member)
WHERE m.id_member IN ({array_int:member_ids})',
array(
'member_ids' => $members,
)
);
$avatar_profile = array();
while ($row = $smcFunc['db_fetch_assoc']($request))
{
$avatar_profile[$row['id_member']] = 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']($request);
if (!empty($avatar_profile))
foreach ($items as $k => $p)
if (!empty($avatar_profile[$p['poster']['id']]))
$items[$k]['poster']['avatar'] = $avatar_profile[$p['poster']['id']];
}
if ($display == 'compact')
<td class="sp_recent_info sp_right">
', $item['poster']['link'], '<br />', $item['time'], '
</td>
<td class="sp_recent_info sp_right">
', $item['poster']['link'], '<br />', $item['time'], '
</td>
<td class="sp_top_poster sp_center">', !empty($item['poster']['avatar']['href']) ? '
<img src="' . $item['poster']['avatar']['href'] . '" alt="' . $item['poster']['avatar']['name'] . '" width="40" />' : '', '
</td>
Yalnızca "Büyük" görünümünde çalışır.