vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   Moderator Activity Logging (updated) (https://vborg.vbsupport.ru/showthread.php?t=35585)

350Chevy 03-09-2003 05:48 PM

Quote:

Originally posted by pgowder


I tried that, but the log only shows my activities???

Yes, those logs only show ADMIN activities.. not Moderators. Davey may have been a little confused.

Cyberhouse 03-11-2003 06:53 AM

Works perfect on 2.2.7 :cool:

mharmon 03-20-2003 12:50 AM

Fantastic Mod. Thanks! :)

mtha 03-20-2003 08:04 PM

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

Ph0eniX 03-31-2003 03:05 PM

I can't get it to work on 2.2.9. I did everything as directed in install_modlog.php. The modlog table got created and there is a link to modlog.php in the Admin CP but nothing ever gets logged :(

Nevermind. I was trying to edit a post and then realized that there is not edit logging. I added a few lines to editpost.php and modlog.php to include edits. Thanks Overgrow!

SmartGnome 04-09-2003 02:21 PM

Great it works perfectly on 2.3.0 at once :D

Install clicked :D


One silly question:

Why don't I see the 'from forum id' in the moved list ??


Cheers

JeffyJoe 04-16-2003 07:16 AM

Hi mtha,

Quote:

03-20-03 at 11:04 PM mtha said this in Post #94
it work great! 2.3.0

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;


I am gettin an error running this query:
Code:

ALTER TABLE `modlog` ADD `postid"  int(10) DEFAULT '0' NOT NULL AFTER `threadid`;
this is the error:
Quote:

Database error in vBulletin Control Panel 2.3.0:

Invalid SQL: ALTER TABLE `modlog` ADD `postid" int(10) DEFAULT '0' NOT NULL AFTER `threadid`;
mysql error: You have an error in your SQL syntax near 'threadid`' at line 1

mysql error number: 1064

mtha 04-16-2003 10:48 PM

Quote:

Today at 08:16 AM JeffyJoe said this in Post #97
Hi mtha,



I am gettin an error running this query:
Code:

ALTER TABLE `modlog` ADD `postid"  int(10) DEFAULT '0' NOT NULL AFTER `threadid`;
this is the error:


The error should be because of the `postid"
please change that to `postid`


PHP Code:

ALTER TABLE `modlogADD `postid"  int(10) DEFAULT '0' NOT NULL AFTER `threadid`

Sorry I for the typo :p

let me know if it works

mtha 04-17-2003 08:40 AM

dah, the addon was for my board, which has mucho hacks already. I fixed the modlog.php above, you can redownload it now.

Quote:

Database error in vBulletin Control Panel 2.3.0:

Invalid SQL: ALTER TABLE `modlog` ADD `postid` int(10) DEFAULT '0' NOT NULL AFTER `threadid`;
mysql error: Duplicate column name 'postid'

mysql error number: 1060
You already have the column 'postid' created somehow. Check the table modlog in your database, to make sure that you have it right. If so (and if your database isnt corupted), you dont have to do anything else. otherwise, just delete that column, and add it again.


Quote:

Database error in vBulletin Control Panel 2.3.0:

Invalid SQL: SELECT type,modlog.userid as userid,modlog.threadid as threadid,modlog.postid as postid,fromforumid,toforumid,modlog.timestamp as timestamp,modlog.ipaddress as ipaddress,threadtitle, user.realname as username
FROM modlog
LEFT JOIN user ON modlog.userid = user.userid

ORDER BY modlog.timestamp DESC
LIMIT 0,25
mysql error: Unknown column 'user.realname' in 'field list'

mysql error number: 1054
dah, I have something called realname, instead of username, that's why.

please search for realname and change it to username, this problem should be fixed.


line 71 in modlog.php :
Quote:

$logs=$DB_site->query("SELECT type,modlog.userid as userid,modlog.threadid as threadid,modlog.postid as postid,fromforumid,toforumid,modlog.timestamp as timestamp,modlog.ipaddress as ipaddress,threadtitle, user.username as username

mtha 04-21-2003 07:11 AM

Overgrow, it'd be cool if you can add some option to

- "download" the log file, before delete it. The file could be in txt or html format.
- view x logs in a page, so you can view next pages without having it too long
- delete logs older than x days, so you still can keep the recent logs.


All times are GMT. The time now is 05:48 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01318 seconds
  • Memory Usage 1,762KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (12)bbcode_code_printable
  • (1)bbcode_php_printable
  • (8)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete