|
@@ -502,24 +502,6 @@ function MessageIndex()
|
|
|
$context['icon_sources'][$row['last_icon']] = 'images_url';
|
|
|
}
|
|
|
|
|
|
- if (!empty($settings['avatars_on_indexes']))
|
|
|
- {
|
|
|
- // Allow themers to show the latest poster's avatar along with the topic
|
|
|
- if (!empty($row['avatar']))
|
|
|
- {
|
|
|
- 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 = '';
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
// 'Print' the topic info.
|
|
|
$context['topics'][$row['id_topic']] = array(
|
|
|
'id' => $row['id_topic'],
|
|
@@ -580,7 +562,7 @@ function MessageIndex()
|
|
|
if (!empty($settings['avatars_on_indexes']))
|
|
|
$context['topics'][$row['id_topic']]['last_post']['member']['avatar'] = array(
|
|
|
'name' => $row['avatar'],
|
|
|
- 'image' => $row['avatar'] == '' ? ($row['id_attach'] > 0 ? '<img class="avatar" src="' . (empty($row['attachment_type']) ? $scripturl . '?action=dlattach;attach=' . $row['id_attach'] . ';type=avatar' : $modSettings['custom_avatar_url'] . '/' . $row['filename']) . '" alt="" />' : '') : (stristr($row['avatar'], 'http://') || stristr($row['avatar'], 'https://') ? '<img class="avatar" src="' . $row['avatar'] . '"' . $avatar_width . $avatar_height . ' alt="" />' : '<img class="avatar" src="' . $modSettings['avatar_url'] . '/' . $smcFunc['htmlspecialchars']($row['avatar']) . '" alt="" />'),
|
|
|
+ 'image' => $row['avatar'] == '' ? ($row['id_attach'] > 0 ? '<img class="avatar" src="' . (empty($row['attachment_type']) ? $scripturl . '?action=dlattach;attach=' . $row['id_attach'] . ';type=avatar' : $modSettings['custom_avatar_url'] . '/' . $row['filename']) . '" alt="" />' : '') : (stristr($row['avatar'], 'http://') || stristr($row['avatar'], 'https://') ? '<img class="avatar" src="' . $row['avatar'] . '" alt="" />' : '<img class="avatar" src="' . $modSettings['avatar_url'] . '/' . $smcFunc['htmlspecialchars']($row['avatar']) . '" alt="" />'),
|
|
|
'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://') || stristr($row['avatar'], 'https://') ? $row['avatar'] : $modSettings['avatar_url'] . '/' . $row['avatar']),
|
|
|
'url' => $row['avatar'] == '' ? '' : (stristr($row['avatar'], 'http://') || stristr($row['avatar'], 'https://') ? $row['avatar'] : $modSettings['avatar_url'] . '/' . $row['avatar'])
|
|
|
);
|