Kod: Tümünü seç
##############################################################
## MOD Title: Number of new posts and topics on index.php
## MOD Author: radmanics < radmanics@dial.pipex.com > (David Race) http://members.lycos.co.uk/coolcodesportal/forums/
## MOD Description: This tells you how many new posts and new topics have been
## have been posted since your last visit
## MOD Version: 0.9.1
##
## Installation Level: easy
## Installation Time: 1 Minute
## Files To Edit: index.php,
## templates/subSilver/index_body.tpl
## Included Files: n/a
##############################################################
## Author Notes: I used Adam Ismay's Number of Posts Since Last Visit MOD
## as a template. Hope you dont mind ^^
##############################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
##############################################################
#
#-----[ aç ]-----
#
index.php
#
#-----[ bul ]-----
#
$row_color = ( !($i % 2) ) ? $theme['td_color1'] : $theme['td_color2'];
$row_class = ( !($i % 2) ) ? $theme['td_class1'] : $theme['td_class2'];
#
#-----[ sonra ekle ]-----
#
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 . " yeni mesaj)";
}
else
{
$temp = $number_new_posts;
$number_new_posts = "(" . $temp . " yeni mesaj)";
}
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)";
}
#
#-----[ bul ]-----
#
'MODERATORS' => $moderator_list,
#
#-----[ sonra ekle ]-----
#
'NUM_NEW_TOPICS' => $number_new_topic,
'NUM_NEW_POSTS' => $number_new_posts,
#
#-----[ aç ]-----
#
templates/subSilver/index_body.tpl
#
#-----[ bul ]-----
#
<td class="row2" align="center" valign="middle" height="50" nowrap="nowrap"> <span class="gensmall">{catrow.forumrow.LAST_POST}</span></td>
#
#-----[ değiştir ]-----
#
<td class="row2" align="center" valign="middle" height="50" nowrap="nowrap"> <span class="gensmall">{catrow.forumrow.LAST_POST}{catrow.forumrow.NUM_NEW_TOPICS}<br>{catrow.forumrow.NUM_NEW_POSTS}</span></td>
#
#-----[ bütün dosyaları kaydet ve kapat ]------------------------------------------
#
# EoM