Ik heb een vraag over deze Mod.
Hieronder de Mod
Code: Selecteer alles
#-----[ OPEN ]-----
#
index.php
#
#-----[ FIND ]-----
#
$row_color = ( !($i % 2) ) ? $theme['td_color1'] : $theme['td_color2'];
$row_class = ( !($i % 2) ) ? $theme['td_class1'] : $theme['td_class2'];
#
#-----[ ADD AFTER ]-----
#
if( $userdata['session_logged_in'] )
{
$sql = "SELECT COUNT(post_id) as total
FROM " . POSTS_TABLE . "
WHERE post_time >= " . $userdata['user_lastvisit'] . "
AND forum_id = " . $forum_id;
$result = $db->sql_query($sql);
if( $result )
{
$row = $db->sql_fetchrow($result);
$number_new_posts = $row['total'];
}
}
if ( $number_new_posts != "1" )
{
$temp = $number_new_posts;
$number_new_posts = "(" . $temp . " new posts)";
}
else
{
$temp = $number_new_posts;
$number_new_posts = "(" . $temp . " new post)";
}
if( $userdata['session_logged_in'] )
{
$sql2 = "SELECT COUNT(topic_id) as total
FROM " . TOPICS_TABLE . "
WHERE topic_time >= " . $userdata['user_lastvisit'] . "
AND forum_id = " . $forum_id;
$result2 = $db->sql_query($sql2);
if( $result2 )
{
$row2 = $db->sql_fetchrow($result2);
$number_new_topics = $row2['total'];
}
}
if ( $number_new_topics != "1" )
{
$temp = $number_new_topics;
$number_new_topics = "(" . $temp . " new topics)";
}
else
{
$temp = $number_new_topics;
$number_new_topics = "(" . $temp . " new topic)";
}
if( !$userdata['session_logged_in'] )
{
$number_new_topics = "(0 new topics)";
$number_new_posts = "(0 new posts)";
}
#
#-----[ FIND ]-----
#
'MODERATORS' => $moderator_list,
#
#-----[ ADD AFTER ]-----
#
'NUM_NEW_TOPICS' => $number_new_topic,
'NUM_NEW_POSTS' => $number_new_posts,
#
#-----[ OPEN ]-----
#
templates/subSilver/index_body.tpl
#
#-----[ FIND ]-----
#
<td class="row2" align="center" valign="middle" height="50" nowrap="nowrap"> <span class="gensmall">{catrow.forumrow.LAST_POST}</span></td>
#
#-----[ REPLACE WITH ]-----
#
<td class="row2" align="center" valign="middle" height="50" nowrap="nowrap"> <span class="gensmall">{catrow.forumrow.LAST_POST}<br>{catrow.forumrow.NUM_NEW_TOPICS}<br>{catrow.forumrow.NUM_NEW_POSTS}</span></td>
Dat dit alleen wordt weergegeven bij minimaal 1 post of minimaal 1 topic...
Iemand enig idee...