Hello,
I Like this MOD and have added it now to my forum, but i did some changes and deleted some line because they don´t need to be added...
You also dont need to add a new line in lang_main.php, because I use the "sprintf" line which is already in the lang_main.php
#
#-----[ OPEN ]------------------------------------------------
#
viewtopic.php
#
#-----[ FIND ]------------------------------------------------
#
$profile = '<a href="' . $temp_url . '">' . $lang['Profile'] . '</a>';
#
#-----[ AFTER, ADD ]------------------------------------------
#
$sql = 'SELECT count(*) AS pic_total
FROM ' . ALBUM_CAT_TABLE . ' AS c, ' . ALBUM_TABLE . ' AS p
WHERE c.cat_user_id = ' . $poster_id .'
AND p.pic_cat_id = c.cat_id';
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not obtain album information', '', __LINE__, __FILE__, $sql);
}
if ( $row = $db->sql_fetchrow($result) )
{
$totalpicrow = $row;
}
$db->sql_freeresult($result);
if ( $totalpicrow['pic_total'] != 0 )
{
$temp_url = append_sid('album.' . $phpEx . '?user_id=' . $poster_id);
$album_img = '<a href="' . $temp_url . '"><img src="' . $images['icon_album'] . '" alt="' . sprintf($lang['Personal_Gallery_Of_User_Profile'], $postrow[$i]['username'], $totalpicrow['pic_total']) . '" title="' . sprintf($lang['Personal_Gallery_Of_User_Profile'], $postrow[$i]['username'], $totalpicrow['pic_total']) . '" border="0" /></a>';
$album = '<a href="' . $temp_url . '">' . $lang['Show_Personal_Gallery'] . '</a>';
}
else
{
$album_img = '';
$album = '';
}
#
#-----[ FIND & DELETE ]------------------------------------------------
#
// --- Smart Album Button BEGIN ----------------
// added by Tom XS2 Build 054
if ( $postrow[$i]['user_personal_pics_count'] > 0 )
{
$album_img = ( $postrow[$i]['user_personal_pics_count'] ) ? '<a href="album.php?user_id=' . $postrow[$i]['user_id'] . '"><img src="' . $images['icon_album'] . '" alt="' . $lang['Show_Personal_Gallery'] . '" title="' . $lang['Show_Personal_Gallery'] . '" border="0" /></a>' : '';
$album = ( $postrow[$i]['user_personal_pics_count'] ) ? '<a href="album.php?user_id=' . $postrow[$i]['user_id'] . '">' . $lang['Show_Personal_Gallery'] . '</a>' : '';
}
else
{
$album_img = '';
$album = '';
}
// --- Smart Album Button END ----------------
#
#-----[ OPEN ]------------------------------------------------
#
templates/.../viewtopic_body.tpl
#
#-----[ FIND ]------------------------------------------------
#
#
<!-- END switch_user_admin_or_mod -->
</center>
</td>
<td class="row-post-buttons post-buttons">
<div style="text-align: right">
<div style="position: relative; float: left; text-align: left;">
#
#-----[ IN-LINE FIND ]----------------------------------------
#
{postrow.PROFILE_IMG}
#
#-----[ IN-LINE AFTER, ADD ]----------------------------------
#
{postrow.ALBUM_IMG}
#
#-----[ SAVE/CLOSE ALL FILES ]--------------------------------
#
# EoM
Demo how it looks you will see
here