it work great! 2.3.0
Quote:
04-30-02 at 07:28 PM hellsatan said this in Post #60
@CJi...
Yes it does...
We have it installed on our vB 2.2.5, and it works perfectly...
3 Things Overgrow - 2 have already been suggested, but either you missed them or dont know...
1.) Would it be possible to include an "edit" feature, to show posts that were edited by mods
2.) Would it be possible to exclude admins from the log
3.) Would it be possible to include a code for Posts that have been deleted, not just threads...
Satan
|
I added a tracking log for "edit" feature, for all member:
Also add IP tracking to the log.
execute
Code:
ALTER TABLE `modlog` ADD `postid` int(10) DEFAULT '0' NOT NULL AFTER `threadid`;
// ------ ADD IP log ----------
ALTER TABLE `modlog` ADD `ipaddress` varchar(20) NOT NULL;
in
editpost.php
find
Code:
eval("standardredirect(\"".gettemplate("redirect_editthanks")."\",\"showthread.php?s=$session[sessionhash]&postid=$postid#post$postid\");");
ADD BEFORE
Code:
// MOD LOG
$DB_site->query("INSERT INTO modlog (type,userid,threadid,postid,threadtitle,fromforumid,toforumid,timestamp,ipaddress)
VALUES ('4','$bbuserinfo[userid]','$threadinfo[threadid]','$postid','".addslashes($threadinfo[title])."','$threadinfo[forumid]','','".time()."','".$HTTP_SERVER_VARS['REMOTE_ADDR']."')");
------- add IP LOG -------------
in posting.php,
find
Code:
// MOD LOG
$DB_site->query("INSERT INTO modlog (type,userid,threadid,threadtitle,fromforumid,toforumid,timestamp)
VALUES ('2','$bbuserinfo[userid]','$threadid','".addslashes($threadinfo[title])."','$threadinfo[forumid]','','".time()."')");
REPLACED BY
Code:
// MOD LOG
$DB_site->query("INSERT INTO modlog (type,userid,threadid,threadtitle,fromforumid,toforumid,timestamp,ipaddress)
VALUES ('2','$bbuserinfo[userid]','$threadid','".addslashes($threadinfo[title])."','$threadinfo[forumid]','','".time()."','".$HTTP_SERVER_VARS['REMOTE_ADDR']."')");
FIND
Code:
// MOD LOG
$DB_site->query("INSERT INTO modlog (type,userid,threadid,threadtitle,fromforumid,toforumid,timestamp)
VALUES ('3','$bbuserinfo[userid]','$threadid','".addslashes($threadinfo[title])."','$checkforum[forumid]','$forumid','".time()."')");
REPLACED BY
Code:
// MOD LOG
$DB_site->query("INSERT INTO modlog (type,userid,threadid,threadtitle,fromforumid,toforumid,timestamp,ipaddress)
VALUES ('3','$bbuserinfo[userid]','$threadid','".addslashes($threadinfo[title])."','$checkforum[forumid]','$forumid','".time()."','".$HTTP_SERVER_VARS['REMOTE_ADDR']."')");
FIND
Code:
// MOD LOG
$DB_site->query("INSERT INTO modlog (type,userid,threadid,threadtitle,fromforumid,toforumid,timestamp)
VALUES ('$threadinfo[open]','$bbuserinfo[userid]','$threadid','".addslashes($threadinfo[title])."','$threadinfo[forumid]','','".time()."')");
REPLACED BY
Code:
// MOD LOG
$DB_site->query("INSERT INTO modlog (type,userid,threadid,threadtitle,fromforumid,toforumid,timestamp,ipaddress)
VALUES ('$threadinfo[open]','$bbuserinfo[userid]','$threadid','".addslashes($threadinfo[title])."','$threadinfo[forumid]','','".time()."','".$HTTP_SERVER_VARS['REMOTE_ADDR']."')");
replace the modlog.php file by the attached file
If you want to limite the log to mod (1 group only), you may add something like
IF ($bbuserinfo[group]=(#groupID)) { .... }
around the logging part (DID NOT TEST)
have fun