Advertisement:

Navigation

Readme

Author: JohnyB   Mod Name: AvatarOnBoard   Version: 2.1
Tested:Freshly installed SMF 2.0 RC1


AvatarOnBoard
  • This mod will display the avatar of last poster on Board index, Child board index and topic index.
  • This will also disable or enable the display and hide the childboards.
  • The switches on or off of child boards and avatars and the width and the height can be configured in
         ~ Admin -> Features and options -> Layout and Options. It's in the bottom.
  • The default avatar width is 35 pixels and the default height is sero (0) pixels.
  • Zero (0) in width, the settings in (Admin -> Attachments and Avatars Settings) will be used.
  • Added switch on or off for the avatar on Board. To disable the avatar, tick the checkbox.
  • Extended to last poster in topic index.

Supported SMF 2.0 Themes
  • Default Core
  • Babylon
  • Classic
  • Shinyblue2b3

File Edits

./Sources/ManageSettings.php

Find: [Select]
array('check', 'who_enabled'),
Add After: [Select]

'',
// Avatar on board.
array('check', 'disable_avatar'),
array('int', 'board_avatar_width'),
array('int', 'board_avatar_height'),
array('check', 'display_childboards'),
'',

./Sources/Subs-BoardIndex.php

Find: [Select]
b.id_board, b.name AS board_name, b.description,
Add After: [Select]

att.id_attach, att.attachment_type, att.filename, mav.avatar,

Find: [Select]
LEFT JOIN {db_prefix}members AS mods_mem ON (mods_mem.id_member = mods.id_member)
Add After: [Select]

LEFT JOIN {db_prefix}members AS mav ON (mav.id_member = m.id_member AND m.id_msg = b.id_last_msg)
LEFT JOIN {db_prefix}attachments AS att ON (att.id_member = mav.id_member)

Find: [Select]
// Prepare the subject, and make sure it's not too long.
Replace With: [Select]

if ($modSettings['board_avatar_width'] == 0)
$board_avatar = $row_board['avatar'] == '' ? ($row_board['id_attach'] > 0 ? '<img src="' . (empty($row_board['attachment_type']) ? $scripturl . '?action=dlattach;attach=' . $row_board['id_attach'] . ';type=avatar' : $modSettings['custom_avatar_url'] . '/' . $row_board['filename']) . '" alt="" width="'. $modSettings['avatar_max_width_external'].'" height="'. $modSettings['avatar_max_height_external'].'" align="middle" border="0" />' : '<img src="' . $modSettings['avatar_url'] . '/noavatar.gif" alt="" width="'. $modSettings['avatar_max_width_external'].'" height="'. $modSettings['avatar_max_height_external'].'" align="middle" border="0" />') : (stristr($row_board['avatar'], 'http://') ? '<img src="' . $row_board['avatar'] . '" alt="" width="'. $modSettings['avatar_max_width_external'].'" height="'. $modSettings['avatar_max_height_external'].'" align="middle" border="0" />' : '<img src="' . $modSettings['avatar_url'] . '/' . htmlspecialchars($row_board['avatar']) . '" alt="" width="'. $modSettings['avatar_max_width_external'].'" height="'. $modSettings['avatar_max_height_external'].'" align="middle" border="0" />');
elseif ($modSettings['board_avatar_height'] == 0)
$board_avatar = $row_board['avatar'] == '' ? ($row_board['id_attach'] > 0 ? '<img src="' . (empty($row_board['attachment_type']) ? $scripturl . '?action=dlattach;attach=' . $row_board['id_attach'] . ';type=avatar' : $modSettings['custom_avatar_url'] . '/' . $row_board['filename']) . '" alt="" width="'. $modSettings['board_avatar_width'].'" align="middle" border="0" />' : '<img src="' . $modSettings['avatar_url'] . '/noavatar.gif" alt="" width="'. $modSettings['board_avatar_width'].'" align="middle" border="0" />') : (stristr($row_board['avatar'], 'http://') ? '<img src="' . $row_board['avatar'] . '" alt="" width="'. $modSettings['board_avatar_width'].'" align="middle" border="0" />' : '<img src="' . $modSettings['avatar_url'] . '/' . htmlspecialchars($row_board['avatar']) . '" alt="" width="'. $modSettings['board_avatar_width'].'" align="middle" border="0" />');
else
$board_avatar = $row_board['avatar'] == '' ? ($row_board['id_attach'] > 0 ? '<img src="' . (empty($row_board['attachment_type']) ? $scripturl . '?action=dlattach;attach=' . $row_board['id_attach'] . ';type=avatar' : $modSettings['custom_avatar_url'] . '/' . $row_board['filename']) . '" alt="" width="'. $modSettings['board_avatar_width'].'" height="'. $modSettings['board_avatar_height'].'" align="middle" border="0" />' : '<img src="' . $modSettings['avatar_url'] . '/noavatar.gif" alt="" width="'. $modSettings['board_avatar_width'].'" height="'. $modSettings['board_avatar_height'].'" align="middle" border="0" />') : (stristr($row_board['avatar'], 'http://') ? '<img src="' . $row_board['avatar'] . '" alt="" width="'. $modSettings['board_avatar_width'].'" height="'. $modSettings['board_avatar_height'].'" align="middle" border="0" />' : '<img src="' . $modSettings['avatar_url'] . '/' . htmlspecialchars($row_board['avatar']) . '" alt="" width="'. $modSettings['board_avatar_width'].'" height="'. $modSettings['board_avatar_height'].'" align="middle" border="0" />');

// Prepare the subject, and make sure it's not too long.

Find: [Select]
'name' => $row_board['real_name'],
Add After: [Select]

'avatar' => $board_avatar,

./Sources/MessageIndex.php

Find: [Select]
ml.poster_name AS last_member_name, ml.id_member AS last_id_member,
Add After: [Select]

att.id_attach, att.attachment_type, att.filename, mav.avatar,

Find: [Select]
LEFT JOIN {db_prefix}members AS memf ON (memf.id_member = mf.id_member)' . ($user_info['is_guest'] ? '' : '
Replace With: [Select]
LEFT JOIN {db_prefix}members AS mav ON (mav.id_member = ml.id_member)
LEFT JOIN {db_prefix}attachments AS att ON (att.id_member = mav.id_member)
LEFT JOIN {db_prefix}members AS memf ON (memf.id_member = mf.id_member)' . ($user_info['is_guest'] ? '' : '

Find: [Select]
// We need to check the topic icons exist...
Replace With: [Select]
if ($modSettings['board_avatar_width'] == 0)
$board_avatar = $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="" width="'. $modSettings['avatar_max_width_external'].'" height="'. $modSettings['avatar_max_height_external'].'" align="middle" border="0" />' : '<img src="' . $modSettings['avatar_url'] . '/noavatar.gif" alt="" width="'. $modSettings['avatar_max_width_external'].'" height="'. $modSettings['avatar_max_height_external'].'" align="middle" border="0" />') : (stristr($row['avatar'], 'http://') ? '<img src="' . $row['avatar'] . '" alt="" width="'. $modSettings['avatar_max_width_external'].'" height="'. $modSettings['avatar_max_height_external'].'" align="middle" border="0" />' : '<img src="' . $modSettings['avatar_url'] . '/' . htmlspecialchars($row['avatar']) . '" alt="" width="'. $modSettings['avatar_max_width_external'].'" height="'. $modSettings['avatar_max_height_external'].'" align="middle" border="0" />');
elseif ($modSettings['board_avatar_height'] == 0)
$board_avatar = $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="" width="'. $modSettings['board_avatar_width'].'" align="middle" border="0" />' : '<img src="' . $modSettings['avatar_url'] . '/noavatar.gif" alt="" width="'. $modSettings['board_avatar_width'].'" align="middle" border="0" />') : (stristr($row['avatar'], 'http://') ? '<img src="' . $row['avatar'] . '" alt="" width="'. $modSettings['board_avatar_width'].'" align="middle" border="0" />' : '<img src="' . $modSettings['avatar_url'] . '/' . htmlspecialchars($row['avatar']) . '" alt="" width="'. $modSettings['board_avatar_width'].'" align="middle" border="0" />');
else
$board_avatar = $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="" width="'. $modSettings['board_avatar_width'].'" height="'. $modSettings['board_avatar_height'].'" align="middle" border="0" />' : '<img src="' . $modSettings['avatar_url'] . '/noavatar.gif" alt="" width="'. $modSettings['board_avatar_width'].'" height="'. $modSettings['board_avatar_height'].'" align="middle" border="0" />') : (stristr($row['avatar'], 'http://') ? '<img src="' . $row['avatar'] . '" alt="" width="'. $modSettings['board_avatar_width'].'" height="'. $modSettings['board_avatar_height'].'" align="middle" border="0" />' : '<img src="' . $modSettings['avatar_url'] . '/' . htmlspecialchars($row['avatar']) . '" alt="" width="'. $modSettings['board_avatar_width'].'" height="'. $modSettings['board_avatar_height'].'" align="middle" border="0" />');

// We need to check the topic icons exist...

Find: [Select]
'name' => $row['last_display_name'],
Add After: [Select]

'avatar' => $board_avatar,

./Themes/default/languages/ManageSettings.english.php

Find: [Select]
$txt['who_enabled'] = 'Enable who\'s online list';
Add After: [Select]

$txt['disable_avatar'] = 'Hide avatar on Board?';
$txt['board_avatar_width'] = 'Width of avatar on Board.';
$txt['board_avatar_height'] = 'Height of avatar on Board.';
$txt['display_childboards'] = 'Hide the Child boards?';

./Themes/default/languages/Help.english.php

Find: [Select]
$helptxt['who_enabled'] = 'This option allows you to turn on or off the ability for users to see who is browsing the forum and what they are doing.';
Add After: [Select]

$helptxt['disable_avatar'] = 'This option allows you to turn on or off the display of avatars in Board index.';
$helptxt['board_avatar_width'] = 'This option allows you to enter the width of avatar to be displayed in Board index. Enter 0 (zero) to use the max width of external avatar settings.';
$helptxt['board_avatar_height'] = 'This option allows you to enter the height of avatar to be displayed in Board index. Enter 0 (zero) to use max height of external avatar settings.';
$helptxt['display_childboards'] = 'This option allows you to turn on or off the display of child boards in Board index.';

./Themes/default/BoardIndex.template.php

Find: [Select]
<td', !empty($board['children']) ? ' rowspan="2"' : '', ' class="windowbg icon">
Replace With: [Select]
<td', !empty($board['children']) && !$modSettings['display_childboards'] ? ' rowspan="2"' : '', ' class="windowbg icon">
Find: [Select]
<td', !empty($board['children']) ? ' rowspan="2"' : '', ' class="windowbg stats smalltext">
Replace With: [Select]
<td', !empty($board['children']) && !$modSettings['display_childboards'] ? ' rowspan="2"' : '', ' class="windowbg stats smalltext">
Find: [Select]
<td', !empty($board['children']) ? ' rowspan="2"' : '', ' class="windowbg2 smalltext lastpost">';
Replace With: [Select]
<td', !empty($board['children']) && !$modSettings['display_childboards'] ? ' rowspan="2"' : '', ' class="windowbg2 smalltext lastpost">';

if (!$modSettings['disable_avatar'])
echo '<div style="float: left; margin-right: 4px;">', !empty($board['last_post']['member']['avatar']) ? $board['last_post']['member']['avatar'] : '<img src="'. $modSettings['avatar_url']. '/noavatar.gif" alt="" width="'. $modSettings['board_avatar_width']. '" align="middle" border="0" />', '</div>';

Find: [Select]
if (!empty($board['children']))
Replace With: [Select]
if (!empty($board['children']) && !$modSettings['display_childboards'])

./Themes/default/MessageIndex.template.php

Find: [Select]
if (!empty($board['children']))
Replace With: [Select]
if (!empty($board['children']) && !$modSettings['display_childboards'])
Find: [Select]
<td class="windowbg2 smalltext lastpost">';
Add After: [Select]


if (!$modSettings['disable_avatar'])
echo '<div style="float: left; margin-right: 4px;">', $board['last_post']['member']['avatar'], '</div>';

Find: [Select]
<th class="catbg3 headerpadding" width="22%"><a href="', $scripturl, '?board=', $context['current_board'], '.', $context['start'], ';sort=last_post', $context['sort_by'] == 'last_post' && $context['sort_direction'] == 'up' ? ';desc' : '', '">', $txt['last_post'], $context['sort_by'] == 'last_post' ? ' <img src="' . $settings['images_url'] . '/sort_' . $context['sort_direction'] . '.gif" alt="" />' : '', '</a></th>';
Replace With: [Select]
<th class="catbg3 headerpadding" width="26%"><a href="', $scripturl, '?board=', $context['current_board'], '.', $context['start'], ';sort=last_post', $context['sort_by'] == 'last_post' && $context['sort_direction'] == 'up' ? ';desc' : '', '">', $txt['last_post'], $context['sort_by'] == 'last_post' ? ' <img src="' . $settings['images_url'] . '/sort_' . $context['sort_direction'] . '.gif" alt="" />' : '', '</a></th>';
Find: [Select]
<a href="', $topic['last_post']['href'], '"><img src="', $settings['images_url'], '/icons/last_post.gif" alt="', $txt['last_post'], '" title="', $txt['last_post'], '" style="float: right;" /></a>
Add After: [Select]
';
if (!$modSettings['disable_avatar'])
echo '<div style="float: left; margin-right: 4px;">', $topic['last_post']['member']['avatar'], '</div>';
echo '

./Themes/default/css/forum.css

Find: [Select]
table.boardsframe td.info
{
width: 60%;
Replace With: [Select]
table.boardsframe td.info
{
width: 50%;

./Themes/babylon/BoardIndex.template.php

Find: [Select]
<div class="tborder"><table border="0" width="100%" cellspacing="1" cellpadding="5">
Replace With: [Select]
<div class="tborder"><table border="0" width="100%" cellspacing="1" cellpadding="3">
This operation isn't vital to the installation of this mod.

Find: [Select]
<td colspan="', $context['user']['is_guest'] ? '5' : '4', '" height="18">';
Replace With: [Select]
<td colspan="', $context['user']['is_guest'] ? '6' : '5', '" height="18">';
This operation isn't vital to the installation of this mod.

Find: [Select]
if (!empty($board['children']))
Replace With: [Select]
if (!empty($board['children']) && !$modSettings['display_childboards'])
This operation isn't vital to the installation of this mod.

Find: [Select]
</span></td>
Replace With: [Select]
</span></td>';
if (!$modSettings['disable_avatar'])
echo '
<td width="', $modSettings['board_avatar_width'] ? $modSettings['board_avatar_width'] : '1','" class="windowbg2" align="center">
', $board['last_post']['member']['avatar'], '
</td>';
echo '
This operation isn't vital to the installation of this mod.

./Themes/babylon/MessageIndex.template.php

Find: [Select]
<div class="tborder" style="padding: 1px; margin-bottom: 2ex;"><table border="0" width="100%" cellspacing="1" cellpadding="5">
Replace With: [Select]
<div class="tborder" style="padding: 1px; margin-bottom: 2ex;"><table border="0" width="100%" cellspacing="1" cellpadding="3">
This operation isn't vital to the installation of this mod.

Find: [Select]
<td colspan="4">', $txt['parent_boards'], '</td>
Replace With: [Select]
<td colspan="', $modSettings['disable_avatar'] ? '4' : '5', '">', $txt['parent_boards'], '</td>
This operation isn't vital to the installation of this mod.

Find: [Select]
if (!empty($board['children']))
Replace With: [Select]
if (!empty($board['children']) && !$modSettings['display_childboards'])
This operation isn't vital to the installation of this mod.

Find: [Select]
</span></td>
Replace With: [Select]
</span></td>';
if (!$modSettings['disable_avatar'])
echo '
<td width="', $modSettings['board_avatar_width'] ? $modSettings['board_avatar_width'] : '1','" class="windowbg2" align="center">
', $board['last_post']['member']['avatar'], '
</td>';
echo '
This operation isn't vital to the installation of this mod.

Find: [Select]
<td width="24%"><a href="', $scripturl, '?board=', $context['current_board'], '.', $context['start'], ';sort=last_post', $context['sort_by'] == 'last_post' && $context['sort_direction'] == 'up' ? ';desc' : '', '">', $txt['last_post'], $context['sort_by'] == 'last_post' ? ' <img src="' . $settings['images_url'] . '/sort_' . $context['sort_direction'] . '.gif" alt="" border="0" />' : '', '</a></td>';
Replace With: [Select]
<td colspan="', !$modSettings['disable_avatar'] ? '2' : '', '" width="24%"><a href="', $scripturl, '?board=', $context['current_board'], '.', $context['start'], ';sort=last_post', $context['sort_by'] == 'last_post' && $context['sort_direction'] == 'up' ? ';desc' : '', '">', $txt['last_post'], $context['sort_by'] == 'last_post' ? ' <img src="' . $settings['images_url'] . '/sort_' . $context['sort_direction'] . '.gif" alt="" border="0" />' : '', '</a></td>';
This operation isn't vital to the installation of this mod.

Find: [Select]
', $topic['views'], '
</td>
Replace With: [Select]
', $topic['views'], '
</td>';
if (!$modSettings['disable_avatar'])
echo '
<td width="', $modSettings['board_avatar_width'] ? $modSettings['board_avatar_width'] : '1','" class="windowbg2" align="center">
', $topic['last_post']['member']['avatar'], '
</td>';
echo '
This operation isn't vital to the installation of this mod.

Find: [Select]
<td colspan="8" align="right">
Replace With: [Select]
<td colspan="9" align="right">
This operation isn't vital to the installation of this mod.

./Themes/classic/BoardIndex.template.php

Find: [Select]
<table border="0" width="100%" cellspacing="1" cellpadding="5" class="bordercolor">
Replace With: [Select]
<table border="0" width="100%" cellspacing="1" cellpadding="3" class="bordercolor">
This operation isn't vital to the installation of this mod.

Find: [Select]
<td width="22%" align="center">', $txt['last_post'], '</td>
Replace With: [Select]
<td colspan="', $modSettings['disable_avatar'] ? '1' : '2', '" width="22%" align="center">', $txt['last_post'], '</td>
This operation isn't vital to the installation of this mod.

Find: [Select]
<td colspan="5" class="catbg" height="18">';
Replace With: [Select]
<td colspan="', $modSettings['disable_avatar'] ? '5' : '6', '" class="catbg" height="18">';
This operation isn't vital to the installation of this mod.

Find: [Select]
if (!empty($board['children']))
Replace With: [Select]
if (!empty($board['children']) && !$modSettings['display_childboards'])
This operation isn't vital to the installation of this mod.

Find: [Select]
if (!$board['is_redirect'])
Replace With: [Select]
if (!$board['is_redirect'])
{
This operation isn't vital to the installation of this mod.

Find: [Select]
else
echo '
<td class="windowbg" valign="middle" align="center" colspan="2" width="12%">', $board['posts'], ' ', $txt['redirects'], '</td>';
Add Before: [Select]
if (!$modSettings['disable_avatar'])
echo '
<td width="', $modSettings['board_avatar_width'] ? $modSettings['board_avatar_width'] : '1','" class="windowbg2" align="center">
', $board['last_post']['member']['avatar'], '
</td>';
}
This operation isn't vital to the installation of this mod.

./Themes/classic/MessageIndex.template.php

Find: [Select]
<table border="0" width="100%" cellspacing="1" cellpadding="5" class="bordercolor">
Replace With: [Select]
<table border="0" width="100%" cellspacing="1" cellpadding="3" class="bordercolor">
This operation isn't vital to the installation of this mod.

Find: [Select]
<td width="22%" align="center">', $txt['last_post'], '</td>
Replace With: [Select]
<td colspan="', $modSettings['disable_avatar'] ? '1' : '2', '" width="22%" align="center">', $txt['last_post'], '</td>
This operation isn't vital to the installation of this mod.

Find: [Select]
if (!empty($board['children']))
Replace With: [Select]
if (!empty($board['children']) && !$modSettings['display_childboards'])
This operation isn't vital to the installation of this mod.

Find: [Select]
', $board['posts'], ' ', $txt['redirects'], '
</td>';
Replace With: [Select]
', $board['posts'], ' ', $txt['redirects'], '
</td>';
if (!$modSettings['disable_avatar'])
echo '
<td width="', $modSettings['board_avatar_width'] ? $modSettings['board_avatar_width'] : '1','" class="windowbg2" align="center">
', $board['last_post']['member']['avatar'], '
</td>';
This operation isn't vital to the installation of this mod.

Find: [Select]
<td width="22%"><a href="', $scripturl, '?board=', $context['current_board'], '.', $context['start'], ';sort=last_post', $context['sort_by'] == 'last_post' && $context['sort_direction'] == 'up' ? ';desc' : '', '">', $txt['last_post'], $context['sort_by'] == 'last_post' ? ' <img src="' . $settings['images_url'] . '/sort_' . $context['sort_direction'] . '.gif" alt="" border="0" />' : '', '</a></td>';
Replace With: [Select]
<td colspan="', !$modSettings['disable_avatar'] ? '2' : '', '" width="22%"><a href="', $scripturl, '?board=', $context['current_board'], '.', $context['start'], ';sort=last_post', $context['sort_by'] == 'last_post' && $context['sort_direction'] == 'up' ? ';desc' : '', '">', $txt['last_post'], $context['sort_by'] == 'last_post' ? ' <img src="' . $settings['images_url'] . '/sort_' . $context['sort_direction'] . '.gif" alt="" border="0" />' : '', '</a></td>';
This operation isn't vital to the installation of this mod.

Find: [Select]
', $topic['views'], '</td>
Replace With: [Select]
', $topic['views'], '</td>';
if (!$modSettings['disable_avatar'])
echo '
<td width="', $modSettings['board_avatar_width'] ? $modSettings['board_avatar_width'] : '1','" class="windowbg2" align="center">
', $topic['last_post']['member']['avatar'], '
</td>';
echo '
This operation isn't vital to the installation of this mod.

Find: [Select]
<td colspan="8" align="right">
Replace With: [Select]
<td colspan="9" align="right">
This operation isn't vital to the installation of this mod.

./Themes/shinyblue2b3/BoardIndex.template.php

Find: [Select]
<td width="22%" align="center">', $txt['last_post'], '</td>
Replace With: [Select]
<td colspan="', $modSettings['disable_avatar'] ? '1' : '2', '" width="22%" align="center">', $txt['last_post'], '</td>
This operation isn't vital to the installation of this mod.

Find: [Select]
<td colspan="5" class="catbg">';
Replace With: [Select]
<td colspan="', $modSettings['disable_avatar'] ? '5' : '6', '" class="catbg">';
This operation isn't vital to the installation of this mod.

Find: [Select]
if (!empty($board['children']))
Replace With: [Select]
if (!empty($board['children']) && !$modSettings['display_childboards'])
This operation isn't vital to the installation of this mod.

Find: [Select]
if (!$board['is_redirect'])
Replace With: [Select]
if (!$board['is_redirect'])
{
This operation isn't vital to the installation of this mod.

Find: [Select]
else
echo '
<td class="windowbg1" valign="middle" align="center" colspan="2" width="12%">', $board['posts'], ' ', $txt['redirects'], '</td>';
Add Before: [Select]
if (!$modSettings['disable_avatar'])
echo '
<td width="', $modSettings['board_avatar_width'] ? $modSettings['board_avatar_width'] : '1','" class="windowbg1" align="center">
', $board['last_post']['member']['avatar'], '
</td>';
}
This operation isn't vital to the installation of this mod.

./Themes/shinyblue2b3/MessageIndex.template.php

Find: [Select]
<td width="22%" align="center">', $txt['last_post'], '</td>
Replace With: [Select]
<td colspan="', $modSettings['disable_avatar'] ? '1' : '2', '" width="22%" align="center">', $txt['last_post'], '</td>
This operation isn't vital to the installation of this mod.

Find: [Select]
if (!empty($board['children']))
Replace With: [Select]
if (!empty($board['children']) && !$modSettings['display_childboards'])
This operation isn't vital to the installation of this mod.

Find: [Select]
if (!$board['is_redirect'])
Replace With: [Select]
if (!$board['is_redirect'])
{
This operation isn't vital to the installation of this mod.

Find: [Select]
else
echo '
<td class="windowbg1" valign="middle" align="center" colspan="2" width="12%">
Add Before: [Select]
if (!$modSettings['disable_avatar'])
echo '
<td width="', $modSettings['board_avatar_width'] ? $modSettings['board_avatar_width'] : '1','" class="windowbg1" align="center">
', $board['last_post']['member']['avatar'], '
</td>';
}
This operation isn't vital to the installation of this mod.

Find: [Select]
<td width="22%"><a href="', $scripturl, '?board=', $context['current_board'], '.', $context['start'], ';sort=last_post', $context['sort_by'] == 'last_post' && $context['sort_direction'] == 'up' ? ';desc' : '', '">', $txt['last_post'], $context['sort_by'] == 'last_post' ? ' <img src="' . $settings['images_url'] . '/sort_' . $context['sort_direction'] . '.gif" alt="" border="0" />' : '', '</a></td>';
Replace With: [Select]
<td colspan="', !$modSettings['disable_avatar'] ? '2' : '', '" width="22%"><a href="', $scripturl, '?board=', $context['current_board'], '.', $context['start'], ';sort=last_post', $context['sort_by'] == 'last_post' && $context['sort_direction'] == 'up' ? ';desc' : '', '">', $txt['last_post'], $context['sort_by'] == 'last_post' ? ' <img src="' . $settings['images_url'] . '/sort_' . $context['sort_direction'] . '.gif" alt="" border="0" />' : '', '</a></td>';
This operation isn't vital to the installation of this mod.

Find: [Select]
', $topic['views'], '</td>
Replace With: [Select]
', $topic['views'], '</td>';
if (!$modSettings['disable_avatar'])
echo '
<td width="', $modSettings['board_avatar_width'] ? $modSettings['board_avatar_width'] : '1','" class="windowbg1" align="center">
', $topic['last_post']['member']['avatar'], '
</td>';
echo '
This operation isn't vital to the installation of this mod.

Find: [Select]
<td colspan="8" align="right">
Replace With: [Select]
<td colspan="9" align="right">
This operation isn't vital to the installation of this mod.

./Themes/default/languages/ManageSettings.dutch.php

Find (at the end of the file): [Select]
?>
Add Before: [Select]

$txt['disable_avatar'] = 'Verberg de avatars in de index.';
$txt['board_avatar_width'] = 'Verbreed de avatars in de index.';
$txt['board_avatar_height'] = 'Verhoog de avatars in de index.';
$txt['display_childboards'] = 'Verberg de avatars in de Child Boards.';
This operation isn't vital to the installation of this mod.

./Themes/default/languages/Help.dutch.php

Find (at the end of the file): [Select]
?>
Add Before: [Select]

$helptxt['disable_avatar'] = 'Deze optie zorgt ervoor dat je de avatars uit of aan kan zetten in de index van je board.';
$helptxt['board_avatar_width'] = 'Deze optie zorgt ervoor dat je de breedte van je avatar kan aanpassen in de index van je board.';
$helptxt['board_avatar_height'] = 'Deze optie zorgt ervoor dat je de hoogte van je avatar kan aanpassen in de index van je board.';
$helptxt['display_childboards'] = 'Deze optie zorgt er voor dat je de child boards uit of aan kan zetten in de index van je board.';
This operation isn't vital to the installation of this mod.

Code

avataronboarddb2.php

This file should not be able to execute standalone. You may have to run the following queries manually.

Query: [Select]

SHOW COLUMNS FROM {$db_prefix}settings
LIKE 'disable_avatar'
Query: [Select]

INSERT IGNORE {$db_prefix}settings
VALUES ('disable_avatar', '0'),
('board_avatar_width', '40'),
('board_avatar_height', '0'),
('display_childboards', '0')

File Operations

Move the included file "noavatar.gif" to "./avatars".