PDA

View Full Version : Mod Log (Like vB Admin Log)


NTLDR
01 Sep 2002, 18:49
Requested by ManagerJosh here: http://www.vbulletin.org/forum/showthread.php?threadid=43024

Basicly this is the same as the built in admin log, but this works for the Mod CP instead.

This should work fine but I haven't given this hack major testing hence its a beta hack, it won't mess up your board though ;)

Limited support will be given to this hack :)

Link14716
01 Sep 2002, 19:23
Nice.... will install. ;)

ManagerJosh
01 Sep 2002, 19:38
Thanks SOOOOOOOOOOOO MUCH! NTLDR !!!!!!!!!!!!! :) :) :) :) :)

*INSTALLS!*

Dean C
01 Sep 2002, 19:49
this conflicts with my current modlog :( - think u cud intigrate the two???

- Mist

NTLDR
01 Sep 2002, 20:22
Originally posted by Mist
this conflicts with my current modlog :( - think u cud intigrate the two???

Its just the table name modlog thats the same isn't it? if so I'll post instructions on how to change it ;)

Tim Wheatley
01 Sep 2002, 22:29
Basically just go through, every time you see modlog, rename it. Thanks for the hack. :D

kmfdm_kid2000
01 Sep 2002, 22:52
Yeah, I have the other Mod Log Hack, I'll try the proper alterations on my test board before installing :)

afterlab
01 Sep 2002, 23:32
Looks promising, i'll install it once out of Beta.

NTLDR
02 Sep 2002, 00:08
If you have the other modlog hack installed the two changes you need to make are:

Use this query instread:

CREATE TABLE moderatorlog (
modlogid int(10) unsigned DEFAULT '0' NOT NULL auto_increment,
userid int(10) unsigned DEFAULT '0' NOT NULL,
dateline int(10) unsigned DEFAULT '0' NOT NULL,
script char(20) NOT NULL,
action char(20) NOT NULL,
extrainfo char(200) NOT NULL,
ipaddress VARCHAR(15) NOT NULL,
PRIMARY KEY (modlogid)
);

And use this code in mod/global.php

// ###################### Start modlog #######################
function modlog ($extrainfo="",$userid=-1,$script="",$scriptaction="") {
global $DB_site,$bbuserinfo,$PHP_SELF,$action,$REMOTE_ADDR;

if ($userid==-1) {
$userid=$bbuserinfo[userid];
}
if ($script=="") {
$script=basename($PHP_SELF);
}
if ($scriptaction=="") {
$scriptaction=$action;
}

$DB_site->query("INSERT INTO moderatorlog (modlogid,userid,dateline,script,action,extrainfo,ipaddress) VALUES (NULL,'$userid',".time().",'".addslashes($script)."','".addslashes($scriptaction)."','".addslashes($extrainfo)."','$REMOTE_ADDR')");
}

This won't conflict with the other hack then ;)

Dean C
02 Sep 2002, 09:06
thanks buddy ^

bonnmac
07 Sep 2002, 03:32
Hi, I've installed this on my test board and when I access the modlog from the admin panel I get this error...

Fatal error: Call to undefined function: modlog() in /home/virtual/site2/fst/var/www/html/forums/admin/modlog.php on line 185

Any ideas?

This is line 185 of my modlog.php

modlog();

Thanks :)

Thanatos
09 Sep 2002, 15:00
I removed line 185 (modlog() )


Seemed to work fine and got me around the error.

Tested by creating a bogus entry directly into the MySql database, viewed it in the Admincp/modlog and then purged it.

Chris M
13 Sep 2002, 16:56
It works great:)

Satan

blackice912
14 Sep 2002, 14:51
I'll be installing this later today :)

ontherun
18 Oct 2002, 22:51
In admin/config.php

I have no $canpruneadminlog = "";

Im in /forums/admin/config.php

vB version 2.2.8

NTLDR
18 Oct 2002, 22:53
Just add the line in ;)

It just specifies which users can prune the admin log.

You can place the code anywhere in config.php as long as its between <?php and ?>

Graphics
19 Oct 2002, 03:23
whats the difference between this hack and this hack (http://www.vbulletin.org/forum/showthread.php?s=&threadid=17206)?

can someone tell me.

Graphics
19 Oct 2002, 11:36
The other hack is older and this hackis newer and have more featurs

-Ardhamon

Chris M
19 Oct 2002, 20:02
Erm...why did you reply to yourself?:confused:

Satan

NTLDR
19 Oct 2002, 20:17
Originally posted by Graphics
whats the difference between this hack and this hack (http://www.vbulletin.org/forum/showthread.php?s=&threadid=17206)?

can someone tell me.

The other hack tracks opening/closing, moving, delete posts/threads, this hack tracks what mods get up to in the Mod CP, like the Admin Log does for Admins in the ACP.

MarkL
17 Mar 2003, 22:00
Okay, I have a question. I wan't all of my admins to be able to check up on the Mod Log. How could I make that happen?

ManagerJosh
17 Mar 2003, 22:35
I believe you need to add your admins userid into the config.php

Bison
17 Mar 2003, 23:42
Sure like to see what this look likes ... any screen shots?

ManagerJosh
17 Mar 2003, 23:44
I believe it is the same as the view admin log...I might be wrong.

Fahrenheit
30 Jan 2004, 03:30
Database error in vBulletin Control Panel 2.3.0:

Invalid SQL:
SELECT DISTINCT modlog.userid,user.username
FROM modlog
LEFT JOIN user USING(userid)
ORDER BY username

mysql error: Table 'gasoline_gas.modlog' doesn't exist

mysql error number: 1146

Date: Thursday 29th of January 2004 10:30:49 PM
Script: http://www.gasolinedreams.net/vb/vb/admin/modlog.php?action=choose&s=
Referer: http://www.gasolinedreams.net/vb/admin/index.php?s=&action=nav&cpnavjs=


vbulletin version 2.3.0