Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Full Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Moderator Activity Logging (updated) Details »»
Moderator Activity Logging (updated)
Version: 1.00, by Overgrow Overgrow is offline
Developer Last Online: Jun 2004 Show Printable Version Email this Page

Version: 2.2.x Rating:
Released: 03-01-2002 Last Update: Never Installs: 180
 
No support by the author.

<font size="3">Moderator Activity Log for 2.x</font>

Disclaimer:

-No support is offered for this hack. If you PM or email for support, it will be joyfully ignored. When I have time, I will answer questions in this thread.

** FREE LICENSE ** You must leave the header and footer intact.

Design Spec:

Track moderator and admin activites including: closing, opening, moving, and deleting threads. You are able to set the number of logs you view at one time and you can focus down to just one moderator by clicking on their name.

Installation (never had ModLog installed):

-upload install_modlog.php to your admin directory
-upload modlog.php to your admin directory
-run install_modlog.php, follow instructions
-delete install_modlog.php

Installation (have a previous version running successfully):

-upload modlog.php to your admin directory

Changes from the previous version:

-now has a fancy install routine instead of boring text instructions. Installing will now be easier and more fun!

-puts a link on the left side of your Admin CPanel under Admin Logs

Works on:

-vB 2.2.1
-untested on everything else but should work with the whole 2.x line and even 1.x if you figure out the postings.php modifications.

Screenshot attached, files attached in replies. Questions? Read the disclaimer at the top of this post. Thanks~

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #92  
Old 03-09-2003, 05:48 PM
350Chevy's Avatar
350Chevy 350Chevy is offline
 
Join Date: Nov 2002
Location: Tampa, FL
Posts: 258
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #93  
Old 03-11-2003, 06:53 AM
Cyberhouse Cyberhouse is offline
 
Join Date: Jun 2002
Location: Sweden
Posts: 38
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Works perfect on 2.2.7
Reply With Quote
  #94  
Old 03-20-2003, 12:50 AM
mharmon mharmon is offline
 
Join Date: Feb 2003
Posts: 54
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Fantastic Mod. Thanks!
Reply With Quote
  #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
  #96  
Old 03-31-2003, 03:05 PM
Ph0eniX Ph0eniX is offline
 
Join Date: Aug 2002
Location: NY[++++ing]C
Posts: 9
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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!
Reply With Quote
  #97  
Old 04-09-2003, 02:21 PM
SmartGnome's Avatar
SmartGnome SmartGnome is offline
 
Join Date: Mar 2003
Location: Amsterdam
Posts: 128
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Great it works perfectly on 2.3.0 at once

Install clicked


One silly question:

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


Cheers
Reply With Quote
  #98  
Old 04-16-2003, 07:16 AM
JeffyJoe JeffyJoe is offline
 
Join Date: Oct 2002
Posts: 14
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #99  
Old 04-16-2003, 10:48 PM
mtha's Avatar
mtha mtha is offline
 
Join Date: Jul 2002
Location: US
Posts: 775
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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

let me know if it works
Reply With Quote
  #100  
Old 04-17-2003, 08:40 AM
mtha's Avatar
mtha mtha is offline
 
Join Date: Jul 2002
Location: US
Posts: 775
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #101  
Old 04-21-2003, 07:11 AM
mtha's Avatar
mtha mtha is offline
 
Join Date: Jul 2002
Location: US
Posts: 775
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 12:27 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.07058 seconds
  • Memory Usage 2,334KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (12)bbcode_code
  • (1)bbcode_php
  • (8)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • 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
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete