News:

Join the Facebook Fan Page.

Main Menu

AvatarOnBoard

Started by Bulakbol, February 18, 2008, 10:39:03 PM

Previous topic - Next topic

bestfriendavinash

does it work with SMF 2.0.2 ?

Gà Mái

Quote from: bestfriendavinash on May 09, 2012, 06:31:57 AM
does it work with SMF 2.0.2 ?
No, and I am waiting Bulakbol fix it Compatible With 2.0.2 :)
-- I love SMF --

Adrek

Well Bulakbol was last active in November 2009 :)

I updated this mod for my own use, but as far as I know I cannot post here full package? There is package for RC2 posted by Robbo_ (few pages back) so i guess I could post package for 2.0.2, but I want to be sure :P
Polskie wsparcie SMF na simplemachines.org

the simplest solution is most likely the right one

bestfriendavinash

Quote from: phantomm on June 03, 2012, 05:58:06 AM
Well Bulakbol was last active in November 2009 :)

I updated this mod for my own use, but as far as I know I cannot post here full package? There is package for RC2 posted by Robbo_ (few pages back) so i guess I could post package for 2.0.2, but I want to be sure :P

can you mail me?

pixeleyes

@phantomm

I also need this mod for 2.0.1 If you can provide. thanks


Suki

#465
Quote from: phantomm on June 03, 2012, 05:58:06 AM
Well Bulakbol was last active in November 2009 :)

I updated this mod for my own use, but as far as I know I cannot post here full package? There is package for RC2 posted by Robbo_ (few pages back) so i guess I could post package for 2.0.2, but I want to be sure :P

Since this mod wasn't properly licensed before, it falls under a proprietary license and thus, cannot be redistributed in any form :(

Can you point me to this package for RC2 please.
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

Making tough decisions, so you don't have to.

Adrek

I guess you want to remove it?
Here it is... http://www.simplemachines.org/community/index.php?topic=223656.msg2445295#msg2445295

Quote from: Suki on June 11, 2012, 10:11:39 AM
Since this mod wasn't properly licensed before it falls under a proprietary license and thus, cannot be redistributed in any form :(

What if i post only manual edits? It is also against policy?
Polskie wsparcie SMF na simplemachines.org

the simplest solution is most likely the right one

Suki

Yes, I have to remove it.  Thanks.

Yes, if you post manual edits that is perfectly fine.
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

Making tough decisions, so you don't have to.

Adrek

#468
So, here are manual edits for SMF 2.0.2:

But before making any changes make backup of this files:


  • ./Sources/ManageSettings.php
  • ./Sources/Subs-BoardIndex.php
  • ./Sources/MessageIndex.php
  • ./Themes/default/BoardIndex.template.php
  • ./Themes/default/MessageIndex.template.php
  • ./Themes/default/languages/Modifications.english.php
  • ./Themes/default/languages/Help.english.php


If your custom theme is using own BoardIndex.template.php and MessageIndex.template.php don't forget to make backup of this files :P




In the file $sourcedir/ManageSettings.php
Code (Find) Select

// Mod authors, add any settings UNDER this line. Include a comma at the end of the line and don't remove this statement!!

Code (Add After) Select

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




In the file $sourcedir/Subs-BoardIndex.php
Code (Find) Select

b.id_board, b.name AS board_name, b.description,

Code (Add After) Select

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


Code (Find) Select

LEFT JOIN {db_prefix}members AS mods_mem ON (mods_mem.id_member = mods.id_member)

Code (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)


Code (Find) Select

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

Code (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.


Code (Find) Select

'name' => $row_board['real_name'],

Code (Add After) Select

'avatar' => $board_avatar,




In the file $sourcedir/MessageIndex.php
Code (Find) Select

ml.poster_name AS last_member_name, ml.id_member AS last_id_member,

Code (Add After) Select

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


Code (Find) Select

LEFT JOIN {db_prefix}members AS memf ON (memf.id_member = mf.id_member)' . ($user_info['is_guest'] ? '' : '

Code (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'] ? '' : '


Code (Find) Select

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

Code (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...


Code (Find) Select

'name' => $row['last_display_name'],

Code (Add After) Select

'avatar' => $board_avatar,




In the file $themedir/BoardIndex.template.php
Code (Find) Select

<td class="icon windowbg"', !empty($board['children']) ? ' rowspan="2"' : '', '>

Code (Replace With) Select

<td class="icon windowbg"', !empty($board['children']) && !$modSettings['display_childboards'] ? ' rowspan="2"' : '', '>


Code (Find) Select

<td class="lastpost">';

Code (Replace With) Select

<td class="lastpost">';

if (!$modSettings['disable_avatar'])
echo '<div style="float: left; margin-right: 6px;">', !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>';


Code (Find) Select

if (!empty($board['children']))

Code (Replace With) Select

if (!empty($board['children']) && !$modSettings['display_childboards'])




In the file $themedir/MessageIndex.template.php
Code (Find) Select

if (!empty($board['children']))

Code (Replace With) Select

if (!empty($board['children']) && !$modSettings['display_childboards'])


Code (Find) Select

<td class="lastpost">';

Code (Add After) Select


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


Code (Find) Select

<th scope="col" class="lefttext last_th" width="22%">

Code (Replace With) Select

<th scope="col" class="lefttext last_th" width="26%">


Code (Find) Select

<th scope="col" class="lefttext" width="22%">

Code (Replace With) Select

<th scope="col" class="lefttext" width="26%">


Code (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'], '" /></a>

Code (Add After) Select

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




In the file $languagedir/Modifications.english.php
Code (Find) Select

?>

Code (Replace With) 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?';

?>




In the file $languagedir/Help.english.php
Code (Find) Select

?>

Code (Replace With) 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.';

?>



After that download package from mod site, extract it and find file noavatar.gif and upload it to ./avatars directory. :)

And last step (adding settings into database): http://www.simplemachines.org/community/index.php?topic=223656.msg3387144#msg3387144
Polskie wsparcie SMF na simplemachines.org

the simplest solution is most likely the right one

bestfriendavinash

Quote from: phantomm on June 11, 2012, 11:15:43 AM
So, here are manual edits for SMF 2.0.2:

But before making any changes make backup of this files:


  • ./Sources/ManageSettings.php
  • ./Sources/Subs-BoardIndex.php
  • ./Sources/MessageIndex.php
  • ./Themes/default/BoardIndex.template.php
  • ./Themes/default/MessageIndex.template.php
  • ./Themes/default/languages/Modifications.english.php
  • ./Themes/default/languages/Help.english.php


If your custom theme is using own BoardIndex.template.php and MessageIndex.template.php don't forget to make backup of this files :P




In the file $sourcedir/ManageSettings.php
Code (Find) Select

// Mod authors, add any settings UNDER this line. Include a comma at the end of the line and don't remove this statement!!

Code (Add After) Select

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




In the file $sourcedir/Subs-BoardIndex.php
Code (Find) Select

b.id_board, b.name AS board_name, b.description,

Code (Add After) Select

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


Code (Find) Select

LEFT JOIN {db_prefix}members AS mods_mem ON (mods_mem.id_member = mods.id_member)

Code (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)


Code (Find) Select

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

Code (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.


Code (Find) Select

'name' => $row_board['real_name'],

Code (Add After) Select

'avatar' => $board_avatar,




In the file $sourcedir/MessageIndex.php
Code (Find) Select

ml.poster_name AS last_member_name, ml.id_member AS last_id_member,

Code (Add After) Select

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


Code (Find) Select

LEFT JOIN {db_prefix}members AS memf ON (memf.id_member = mf.id_member)' . ($user_info['is_guest'] ? '' : '

Code (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'] ? '' : '


Code (Find) Select

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

Code (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...


Code (Find) Select

'name' => $row['last_display_name'],

Code (Add After) Select

'avatar' => $board_avatar,




In the file $themedir/BoardIndex.template.php
Code (Find) Select

<td class="icon windowbg"', !empty($board['children']) ? ' rowspan="2"' : '', '>

Code (Replace With) Select

<td class="icon windowbg"', !empty($board['children']) && !$modSettings['display_childboards'] ? ' rowspan="2"' : '', '>


Code (Find) Select

<td class="lastpost">';

Code (Replace With) Select

<td class="lastpost">';

if (!$modSettings['disable_avatar'])
echo '<div style="float: left; margin-right: 6px;">', !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>';


Code (Find) Select

if (!empty($board['children']))

Code (Replace With) Select

if (!empty($board['children']) && !$modSettings['display_childboards'])




In the file $themedir/MessageIndex.template.php
Code (Find) Select

if (!empty($board['children']))

Code (Replace With) Select

if (!empty($board['children']) && !$modSettings['display_childboards'])


Code (Find) Select

<td class="lastpost">';

Code (Add After) Select


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


Code (Find) Select

<th scope="col" class="lefttext last_th" width="22%">

Code (Replace With) Select

<th scope="col" class="lefttext last_th" width="26%">


Code (Find) Select

<th scope="col" class="lefttext" width="22%">

Code (Replace With) Select

<th scope="col" class="lefttext" width="26%">


Code (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'], '" /></a>

Code (Add After) Select

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




In the file $languagedir/Modifications.english.php
Code (Find) Select

?>

Code (Replace With) 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?';

?>




In the file $languagedir/Help.english.php
Code (Find) Select

?>

Code (Replace With) 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.';

?>



After that download package from mod site, extract it and find file noavatar.gif and upload it to ./avatars directory. :)


Please make it an installable mod . . . please

Adrek

I can't, read Suki's post. And don't quote whole last message...
Polskie wsparcie SMF na simplemachines.org

the simplest solution is most likely the right one

pixeleyes

thanks @phantomm

I just need some help if possible.

1) How to add border around avatar.

2) In post category I want to change place of avatar. would like to add before subject.

Adrek

For border:
Code (Find) Select
<div style="float: left; margin-right: 6px;
Code (Add After) Select
border: 1px solid #ccc;

You can change color, type and size.

Changing place:
In $themedir/MessageIndex.template.php:
reverse change (if you made it from post before)
Code (Find) Select
<td class="subject ', $alternate_class, '">
Code (Replace with) Select
<td class="subject ', $alternate_class, '">';
if (!$modSettings['disable_avatar'])
echo '<div style="float: left; margin-right: 4px;">', $topic['last_post']['member']['avatar'], '</div>';
echo '


but I have no idea if this will work correctly :|
Polskie wsparcie SMF na simplemachines.org

the simplest solution is most likely the right one

pixeleyes

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


Works for me  :)
Can you add Image Width and Height code as well.

Adrek

This is in mod settings ;)
Polskie wsparcie SMF na simplemachines.org

the simplest solution is most likely the right one

pixeleyes

Got it  :P

I just noticed these avatars are last poster  :D.

Can we change into topic starter instead of last poster?

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


Adrek

I tried this, but doesn't work, don't know why :|

In the file $themedir/MessageIndex.template.php
Code (Find) Select
<div style="float: left; margin-right: 4px;">', $topic['last_post']['member']['avatar'], '</div>
Code (Replace with) Select
<div style="float: left; margin-right: 4px;">', $topic['first_post']['member']['avatar'], '</div>

In the file $sourcedir/MessageIndex.php
Code (Find) Select
'name' => $row['first_display_name'],

Code (Replace with) Select
'name' => $row['first_display_name'],
'avatar' => $board_avatar,
Polskie wsparcie SMF na simplemachines.org

the simplest solution is most likely the right one

pixeleyes

Same here! didn't work

TheListener

Quote from: phantomm on June 12, 2012, 05:17:15 AM
I tried this, but doesn't work, don't know why :|

In the file $themedir/MessageIndex.template.php
Code (Find) Select
<div style="float: left; margin-right: 4px;">', $topic['last_post']['member']['avatar'], '</div>
Code (Replace with) Select
<div style="float: left; margin-right: 4px;">', $topic['first_post']['member']['avatar'], '</div>

In the file $sourcedir/MessageIndex.php
Code (Find) Select
'name' => $row['first_display_name'],

Code (Replace with) Select
'name' => $row['first_display_name'],
'avatar' => $board_avatar,


I ignored those edits and had no errors at all on install.

Adrek

This was for showing avatar from topic starter, because by default mod shows avatar from last poster. This edits aren't required.
All you need is in reply #468 :)
Polskie wsparcie SMF na simplemachines.org

the simplest solution is most likely the right one

Advertisement: