View Single Post
  #95  
Old 03-20-2003, 08:04 PM
mtha's Avatar
mtha mtha is offline
 
Join Date: Jul 2002
Location: US
Posts: 775
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01134 seconds
  • Memory Usage 1,785KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD_SHOWPOST
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (9)bbcode_code
  • (1)bbcode_quote
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_box
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit_info
  • (1)postbit
  • (1)postbit_onlinestatus
  • (1)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • reputationlevel
  • showthread
Included Files:
  • ./showpost.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showpost_start
  • bbcode_fetch_tags
  • bbcode_create
  • postbit_factory
  • showpost_post
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • showpost_complete