Код: Выделить всё
$template->assign_block_vars($tpl_loopname, array(
'FORUM_ID' => $forum_id,
Код: Выделить всё
$avatar_img = $avatar_max_dimensions = $topic_last_poster_avatar_height = $topic_last_poster_avatar_width = $topic_first_poster_avatar_width = $topic_first_poster_avatar_height = '';
if ( !empty($row['topic_first_poster_avatar']) || !empty($row['topic_last_poster_avatar']))
{
$avatar_max_dimensions = 50;
if ( $row['topic_first_poster_avatar_width'] >= $row['topic_first_poster_avatar_height'] )
{
$topic_first_poster_avatar_width = ( $row['topic_first_poster_avatar_width'] > $avatar_max_dimensions ) ? $avatar_max_dimensions : $row['topic_first_poster_avatar_width'] ;
$topic_first_poster_avatar_height = ( $topic_first_poster_avatar_width == $avatar_max_dimensions ) ? round($avatar_max_dimensions / $row['topic_first_poster_avatar_width'] * $row['topic_first_poster_avatar_height']) : $row['topic_first_poster_avatar_height'] ;
}
else
{
$topic_first_poster_avatar_height = ( $row['topic_first_poster_avatar_height'] > $avatar_max_dimensions ) ? $avatar_max_dimensions : $row['topic_first_poster_avatar_height'] ;
$topic_first_poster_avatar_width = ( $topic_first_poster_avatar_height == $avatar_max_dimensions ) ? round($avatar_max_dimensions / $row['topic_first_poster_avatar_height'] * $row['topic_first_poster_avatar_width']) : $row['topic_first_poster_avatar_width'] ;
}
if ( $row['topic_last_poster_avatar_width'] >= $row['topic_last_poster_avatar_height'] )
{
$topic_last_poster_avatar_width = ( $row['topic_last_poster_avatar_width'] > $avatar_max_dimensions ) ? $avatar_max_dimensions : $row['topic_last_poster_avatar_width'] ;
$topic_last_poster_avatar_height = ( $topic_last_poster_avatar_width == $avatar_max_dimensions ) ? round($avatar_max_dimensions / $row['topic_last_poster_avatar_width'] * $row['topic_last_poster_avatar_height']) : $row['topic_last_poster_avatar_height'] ;
}
else
{
$topic_last_poster_avatar_height = ( $row['topic_last_poster_avatar_height'] > $avatar_max_dimensions ) ? $avatar_max_dimensions : $row['topic_last_poster_avatar_height'] ;
$topic_last_poster_avatar_width = ( $topic_last_poster_avatar_height == $avatar_max_dimensions ) ? round($avatar_max_dimensions / $row['topic_last_poster_avatar_height'] * $row['topic_last_poster_avatar_width']) : $row['topic_last_poster_avatar_width'] ;
}
}
Код: Выделить всё
'TOPIC_AUTHOR_FULL' => get_username_string('full', $row['topic_poster'], $row['topic_first_poster_name'], $row['topic_first_poster_colour']),
Код: Выделить всё
'TOPIC_AUTHOR_AVATAR' => ($config['enable_avatar_index']) ? get_user_avatar($row['topic_first_poster_avatar'], $row['topic_first_poster_avatar_type'], $topic_first_poster_avatar_width, $topic_first_poster_avatar_height) : false,
'TOPIC_AUTHOR_AVATAR_MARGIN' => ( $topic_first_poster_avatar_width == '' ) ? '' : (( $topic_first_poster_avatar_width == $avatar_max_dimensions ) ? 5 : ( $avatar_max_dimensions - $topic_first_poster_avatar_width + 5 )),
'AVATAR_WIDTH' => $avatar_max_dimensions,
Код: Выделить всё
'LAST_POST_AUTHOR_FULL'
Код: Выделить всё
'LAST_POST_AUTHOR_AVATAR' => ($config['enable_avatar_index']) ? get_user_avatar($row['topic_last_poster_avatar'], $row['topic_last_poster_avatar_type'], $topic_last_poster_avatar_width, $topic_last_poster_avatar_height) : false,
'LAST_POST_AUTHOR_AVATAR_MARGIN'=> ( $topic_last_poster_avatar_width == $avatar_max_dimensions ) ? 5 : ( $avatar_max_dimensions - $topic_last_poster_avatar_width + 5 ),
Код: Выделить всё
<dt style="<!-- IF recent_topics.TOPIC_ICON_IMG -->background-image: url({T_ICONS_PATH}{recent_topics.TOPIC_ICON_IMG}); background-repeat: no-repeat;<!-- ENDIF -->" title="{recent_topics.TOPIC_FOLDER_IMG_ALT}">
Код: Выделить всё
"{recent_topics.TOPIC_FOLDER_IMG_ALT}">
Код: Выделить всё
<!-- IF recent_topics.TOPIC_AUTHOR_AVATAR --><span style="float: left; padding-top: 3px; margin-right: {recent_topics.TOPIC_AUTHOR_AVATAR_MARGIN}px;">{recent_topics.TOPIC_AUTHOR_AVATAR}</span><!-- ENDIF -->
Код: Выделить всё
<dd class="posts">{recent_topics.REPLIES} <dfn>{L_REPLIES}</dfn></dd>
<dd class="views">{recent_topics.VIEWS} <dfn>{L_VIEWS}</dfn></dd>
<dd class="lastpost">
Код: Выделить всё
<!-- IF recent_topics.LAST_POST_AUTHOR_AVATAR --><div style="float: left; padding-top: 0px; margin-left: 5px; margin-right: {recent_topics.LAST_POST_AUTHOR_AVATAR_MARGIN}px;">{recent_topics.LAST_POST_AUTHOR_AVATAR}</div><!-- ENDIF -->
Код: Выделить всё
<td class="row1" width="25" align="center">{recent_topics.TOPIC_FOLDER_IMG}</td>
Код: Выделить всё
<td class="row1" width="25" align="center"><!-- IF recent_topics.TOPIC_AUTHOR_AVATAR --><span style="float: left; padding-top: 3px; margin-right: {recent_topics.TOPIC_AUTHOR_AVATAR_MARGIN}px;">{recent_topics.TOPIC_AUTHOR_AVATAR}</span><!-- ENDIF --></td>
Код: Выделить всё
<td class="row1" width="140" align="center">
Код: Выделить всё
<!-- IF recent_topics.LAST_POST_AUTHOR_AVATAR --><div style="float: left; padding-top: 0px; margin-left: 5px; margin-right: {recent_topics.LAST_POST_AUTHOR_AVATAR_MARGIN}px;">{recent_topics.LAST_POST_AUTHOR_AVATAR}</div><!-- ENDIF -->