Контрол на влизанията
Автор: Botzo
С този МОД ще можете да видите кой модератор или администратор какво е пипал по постингите или темите, в кои форуми и също така IP адреса през който е станало това както е видно на картинката:

##############################################################
## МОД име: Влизания
##
## МОД трудност: много лесно
## МОД инсталация: 10 минути
##
## Файлове за промяна: 5
## common.php
## modcp.php
## includes/constants.php
## includes/functions_post.php
## language/lang_bulgarian/lang_admin.php
##
## Файлове за добавяне: 3
## admin/admin_logs.php
## includes/functions_logs.php
## templates/subSilver/admin/logs_list_body.tpl
###############################################################
#-----[ SQL ]---------------------------------------------------
#
CREATE TABLE `phpbb_logs` (
`log_id` mediumint(8) NOT NULL auto_increment,
`log_type` varchar(20) NOT NULL default '',
`log_time` int(11) NOT NULL default '0',
`log_mod_id` mediumint(8) NOT NULL default '0',
`log_mod_ip` varchar(8) NOT NULL default '',
`log_forum_id` smallint(5) NOT NULL default '0',
`log_data` mediumtext NOT NULL,
PRIMARY KEY (`log_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
#
#-----[ COPY ]---------------------------------------------------
#
копирай - C:\root\admin\admin_logs.php
във - http://сайт.com/форум/admin/admin_logs.php
копирай - C:\root\includes\functions_logs.php
във - http://сайт.com/форум/includes/functions_logs.php
копирай - C:\root\templates\subSilver\admin\logs_list_body.tpl
във - http://сайт.com/форум/templates/subSilver/admin/logs_list_body.tpl
#
#-----[ ОТВОРИ ]---------------------------------------------------
#
common.php
#
#-----[ НАМЕРИ ]---------------------------------------------------
#
include($phpbb_root_path . 'includes/sessions.'.$phpEx);
include($phpbb_root_path . 'includes/auth.'.$phpEx);
include($phpbb_root_path . 'includes/functions.'.$phpEx);
#
#-----[ СЛЕД ТОВА ДОБАВИ ]---------------------------------------------
#
include($phpbb_root_path . 'includes/functions_logs.'.$phpEx);
#
#-----[ ОТВОРИ ]---------------------------------------------------
#
modcp.php
#
#-----[ НАМЕРИ ]---------------------------------------------------
#
$sql = "SELECT topic_id
#
#-----[ НА РЕДА НАМЕРИ ]-------------------------------------------
#
$sql = "SELECT topic_id
#
#-----[ НА РЕДА СЛЕД ТОВА ДОБАВИ ]-------------------------------------
#
, topic_title
#
#-----[ НАМЕРИ ]---------------------------------------------------
#
while ($row = $db->sql_fetchrow($result))
{
$topic_id_sql .= (($topic_id_sql != '') ? ', ' : '') . intval($row['topic_id']);
#
#-----[ СЛЕД ТОВА ДОБАВИ ]---------------------------------------------
#
$topics_data[] = array(
'topic_id' => intval($row['topic_id']),
'topic_title' => $row['topic_title'],
);
#
#-----[ НАМЕРИ ]---------------------------------------------------
#
sync('forum', $forum_id);
#
#-----[ СЛЕД ТОВА ДОБАВИ ]---------------------------------------------
#
log_action('topic_delete', $forum_id, array(
'topics' => $topics_data,
));
#
#-----[ НАМЕРИ ]---------------------------------------------------
#
sync('forum', $new_forum_id);
sync('forum', $old_forum_id);
#
#-----[ СЛЕД ТОВА ДОБАВИ ]---------------------------------------------
#
log_action('topic_move', $forum_id, array(
'topics' => list2range(range2list($topic_list)),
'new_forum_id' => $new_forum_id,
));
#
#-----[ НАМЕРИ ]---------------------------------------------------
#
message_die(GENERAL_ERROR, 'Could not update topics table', '', __LINE__, __FILE__, $sql);
}
#
#-----[ СЛЕД ТОВА ДОБАВИ ]---------------------------------------------
#
log_action('topic_lock', $forum_id, array(
'topics' => list2range(range2list($topic_id_sql)),
));
#
#-----[ НАМЕРИ ]---------------------------------------------------
#
message_die(GENERAL_ERROR, 'Could not update topics table', '', __LINE__, __FILE__, $sql);
}
#
#-----[ СЛЕД ТОВА ДОБАВИ ]---------------------------------------------
#
log_action('topic_unlock', $forum_id, array(
'topics' => list2range(range2list($topic_id_sql)),
));
#
#-----[ НАМЕРИ ]---------------------------------------------------
#
message_die(GENERAL_ERROR, 'Could not update topics watch table', '', __LINE__, __FILE__, $sql);
}
$sql_where = (!empty($HTTP_POST_VARS['split_type_beyond'])) ? " post_time >= $post_time AND topic_id = $topic_id" : "post_id IN ($post_id_sql)";
#
#-----[ ЗАМЕСТИ СЪС ]-------------------------------------------
#
message_die(GENERAL_ERROR, 'Could not update topics watch table', '', __LINE__, __FILE__, $sql);
}
if(!empty($HTTP_POST_VARS['split_type_beyond']))
{
$sql = "SELECT post_id FROM " . POSTS_TABLE . "
WHERE post_time >= $post_time AND topic_id = $topic_id";
if (!($result = $db->sql_query($sql)))
{
message_die(GENERAL_ERROR, 'Could not get posts info', '', __LINE__, __FILE__, $sql);
}
$post_id_sql = '';
while ($row = $db->sql_fetchrow($result))
{
$post_id_sql .= (($post_id_sql != '') ? ', ' : '') . intval($row['post_id']);;
}
}
#
#-----[ НАМЕРИ ]---------------------------------------------------
#
$sql = "UPDATE " . POSTS_TABLE . "
SET topic_id = $new_topic_id, forum_id = $new_forum_id
WHERE $sql_where";
#
#-----[ ЗАМЕСТИ СЪС ]-------------------------------------------
#
$sql = "UPDATE " . POSTS_TABLE . "
SET topic_id = $new_topic_id, forum_id = $new_forum_id
WHERE post_id IN ($post_id_sql)";
#
#-----[ НАМЕРИ ]---------------------------------------------------
#
sync('topic', $topic_id);
sync('forum', $new_forum_id);
sync('forum', $forum_id);
#
#-----[ СЛЕД ТОВА ДОБАВИ ]---------------------------------------------
#
log_action('topic_split', $forum_id, array(
'topic_id' => $topic_id,
'new_topic_id' => $new_topic_id,
'new_forum_id' => $new_forum_id,
'posts' => list2range(range2list($post_id_sql)),
));
#
#-----[ ОТВОРИ ]---------------------------------------------------
#
includes/constants.php
#
#-----[ НАМЕРИ ]---------------------------------------------------
#
define('DISALLOW_TABLE', $table_prefix.'disallow');
define('FORUMS_TABLE', $table_prefix.'forums');
define('GROUPS_TABLE', $table_prefix.'groups');
#
#-----[ СЛЕД ТОВА ДОБАВИ ]---------------------------------------------
#
define('LOGS_TABLE', $table_prefix.'logs');
#
#-----[ ОТВОРИ ]---------------------------------------------------
#
includes/functions_post.php
#
#-----[ НАМЕРИ ]---------------------------------------------------
#
add_search_words('single', $post_id, stripslashes($post_message), stripslashes($post_subject));
#
#-----[ СЛЕД ТОВА ДОБАВИ ]---------------------------------------------
#
if ($mode == 'editpost')
{
log_action('post_edit', $forum_id, array(
'topic_id' => $topic_id,
'post_id' => $post_id,
'post_owner' => $post_data['poster_id'],
));
}
#
#-----[ НАМЕРИ ]---------------------------------------------------
#
message_die(GENERAL_ERROR, 'Error in deleting poll', '', __LINE__, __FILE__, $sql);
}
}
#
#-----[ СЛЕД ТОВА ДОБАВИ ]---------------------------------------------
#
log_action('post_delete', $forum_id, array(
'topic_id' => $topic_id,
'post_id' => $post_id,
'post_owner' => $post_data['poster_id'],
));
#
#-----[ ОТВОРИ ]---------------------------------------------------
#
language/lang_bulgarian/lang_admin.php
#
#-----[ НАМЕРИ ]---------------------------------------------------
#
$lang['Groups'] = 'ГрупИ';
$lang['Forums'] = 'ФорумИ';
$lang['Styles'] = 'СтилОВЕ';
#
#-----[ СЛЕД ТОВА ДОБАВИ ]---------------------------------------------
#
$lang['Logs'] = 'Влизания';
#
#-----[ НАМЕРИ ]---------------------------------------------------
#
?>
#
#-----[ ПРЕДИ ТОВА ДОБАВИ ]---------------------------------------------
#
//
// Logs
//
$lang['Member'] = 'Потребител';
$lang['Log_information'] = 'Информация';
$lang['Log_post_changed'] = 'Съобщението %s на потребителя %s теми %s от форум %s е било променено';
$lang['Log_post_deleted'] = 'Съобщенията %s на потребителя %s са изтрити %s от форум %s';
$lang['Log_post_split'] = 'Съобщението %s е отделено от темата %s в темата %s във форум %s';
$lang['Log_posts_split'] = 'Съобщенията %s са отделени от темата %s в темата %s във форум %s';
$lang['Log_topic_move'] = 'Темата %s е пренесена от форум %s във форум %s';
$lang['Log_topics_move'] = 'Темите %s са перенесени от форум %s във форум %s';
$lang['Log_topic_deleted'] = 'Темата %s е изтрита от форума %s';
$lang['Log_topics_deleted'] = 'Темте %s са изтрити от форумите %s';
$lang['Log_topic_locked'] = 'Темата %s е заключена';
$lang['Log_topics_locked'] = 'Темите %s са закключени';
$lang['Log_topic_unlocked'] = 'Темата %s е отключена';
$lang['Log_topics_unlocked'] = 'Темите %s са отключени';
#
#-----[ ЗАПАЗИ И ЗАТВОРИ ВСИЧКИ ФАЙЛОВЕ ]-----------------------------------
#
#МОД-а съм си го инсталирал и работи идеално.


