ich wollte dieses Logbuch einbauen
Code: Alles auswählen
##############################################################
## MOD Title: Logbook MOD
## MOD Author: Merlin Sythove <Merlin@silvercircle.org>
## MOD Description: This MOD will keep a logbook of all posting.php
## andmodcp.php action
## [BETA] MOD Logbook
## http://www.phpbb.com/phpBB/viewtopic.php?t=350367
## MOD Version: 1.0.0
## Compatibility: 2.0.18Ich soll diese Modifikation ausführen:
Code: Alles auswählen
#
#-----[ FIND ]-------------------------------------------------
#
$select_sql = (!$submit) ? ', t.topic_title, p.enable_bbcode, p.enable_html, p.enable_smilies, p.enable_sig, p.post_username, pt.post_subject, pt.post_text, pt.bbcode_uid, u.username, u.user_id, u.user_sig, u.user_sig_bbcode_uid' : '';
$from_sql = ( !$submit ) ? ", " . POSTS_TEXT_TABLE . " pt, " . USERS_TABLE . " u" : '';
$where_sql = ( !$submit ) ? "AND pt.post_id = p.post_id AND u.user_id = p.poster_id" : '';
$sql = "SELECT f.*, t.topic_id, t.topic_status, t.topic_type, t.topic_first_post_id, t.topic_last_post_id, t.topic_vote, p.post_id, p.poster_id" . $select_sql . "
FROM " . POSTS_TABLE . " p, " . TOPICS_TABLE . " t, " . FORUMS_TABLE . " f" . $from_sql . "
WHERE p.post_id = $post_id
AND t.topic_id = p.topic_id
AND f.forum_id = p.forum_id
$where_sql";
#
#-----[ REPLACE WITH ]-------------------------------------------------
#
//START MOD Logbook
//$select_sql = (!$submit) ? ', t.topic_title, p.enable_bbcode, p.enable_html, p.enable_smilies, p.enable_sig, p.post_username, pt.post_subject, pt.post_text, pt.bbcode_uid, u.username, u.user_id, u.user_sig, u.user_sig_bbcode_uid' : '';
//$from_sql = ( !$submit ) ? ", " . POSTS_TEXT_TABLE . " pt, " . USERS_TABLE . " u" : '';
//$where_sql = ( !$submit ) ? "AND pt.post_id = p.post_id AND u.user_id = p.poster_id" : '';
//
//$sql = "SELECT f.*, t.topic_id, t.topic_status, t.topic_type, t.topic_first_post_id, t.topic_last_post_id, t.topic_vote, p.post_id, p.poster_id" . $select_sql . "
// FROM " . POSTS_TABLE . " p, " . TOPICS_TABLE . " t, " . FORUMS_TABLE . " f" . $from_sql . "
// WHERE p.post_id = $post_id
// AND t.topic_id = p.topic_id
// AND f.forum_id = p.forum_id
// $where_sql";
if ($submit)
{
$sql = "SELECT f.*, t.topic_id, t.topic_status, t.topic_type, t.topic_title, t.topic_first_post_id,
t.topic_last_post_id, t.topic_vote, p.post_id, p.post_time, p.poster_id,
pt.post_subject, pt.post_text, pt.bbcode_uid
FROM " . POSTS_TABLE . " p, " . TOPICS_TABLE . " t, " . FORUMS_TABLE . " f , " . POSTS_TEXT_TABLE . " pt
WHERE p.post_id = $post_id
AND t.topic_id = p.topic_id
AND f.forum_id = p.forum_id
AND pt.post_id = p.post_id ";
}
else
{
$sql = "SELECT f.*, t.topic_id, t.topic_status, t.topic_type, t.topic_first_post_id, t.topic_last_post_id,
t.topic_vote, t.topic_title, p.post_id, p.post_time, p.poster_id , p.enable_bbcode,
p.enable_html, p.enable_smilies, p.enable_sig, p.post_username, pt.post_subject, pt.post_text,
pt.bbcode_uid, u.username, u.user_id, u.user_sig
FROM " . POSTS_TABLE . " p, " . TOPICS_TABLE . " t, " . FORUMS_TABLE . " f, " . POSTS_TEXT_TABLE . " pt, " . USERS_TABLE . " u
WHERE p.post_id = $post_id
AND t.topic_id = p.topic_id
AND f.forum_id = p.forum_id
AND pt.post_id = p.post_id AND u.user_id = p.poster_id";
}
Code: Alles auswählen
//-- mod : calendar --------------------------------------------------------------------------------
// here we added
// , t.topic_calendar_time, t.topic_calendar_duration
// , t.topic_icon
// , p.post_icon
//-- modify
//-- mod : Repeating Events ----------------------------------
// added
// , t.topic_calendar_repeat, t.topic_calendar_rep_end
$select_sql = (!$submit) ? ', t.topic_title, t.news_id, t.topic_icon, t.topic_calendar_time, t.topic_calendar_duration, t.topic_calendar_repeat, t.topic_calendar_rep_end, p.enable_bbcode, p.enable_html, p.enable_smilies, p.enable_sig,
p.post_username, pt.post_subject, p.post_icon, pt.post_text, pt.bbcode_uid,
u.username, u.user_id, u.user_sig, u.user_sig_bbcode_uid': '';
//-- fin mod : calendar ----------------------------------------------------------------------------
//-- fin mod : Repeating Events ------------------------------
$from_sql = ( !$submit ) ? ", " . POSTS_TEXT_TABLE . " pt, " . USERS_TABLE . " u" : '';
$where_sql = ( !$submit ) ? "AND pt.post_id = p.post_id AND u.user_id = p.poster_id" : '';
$sql = "SELECT f.*, t.topic_id, t.topic_status, t.topic_type, t.topic_first_post_id, t.topic_last_post_id, t.topic_vote,
p.post_id, p.poster_id" . $select_sql . "
FROM " . POSTS_TABLE . " p, " . TOPICS_TABLE . " t, " . FORUMS_TABLE . " f" . $from_sql . "
WHERE p.post_id = $post_id
AND t.topic_id = p.topic_id
AND f.forum_id = p.forum_id
$where_sql";
Habe schon einiges Probiert, aber ohne erfolg.
Gruß Jörg