PDA

View Full Version : Moderator Activity Logging


Overgrow
18 May 2001, 18:26
Moderator Logs for vBulletin

https://www.vbulletin.org/forum/

http://www.overgrow.com/archive/modlog2.gif


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.


Steps for installation:

-add one database table 'modlog'
-edit one file 'postings.php'
-upload one file 'modlog.php'


!!! DISCLAIMER !!! Hack at your own risk. I do not run v2, I will never run v2, I apologize if things are not exactly how they seem. May cause staining, test on hidden piece of fabric first. No this does not install itself. Learn to use phpmyadmin.

Overgrow
18 May 2001, 18:28
FILE UPDATED: May 18, 2001 3:30 pm PST

See the bottom of the page....................>>

amykhar
18 May 2001, 19:06
I can't find them in rc3 either.

Amy

RobAC
18 May 2001, 19:40
Overgrow,

First of all, cool site!

I noticed your forums are version 1.1.3, but you're releasing hacks to be used for 2.0. Are you testing these hacks on the latest RC3 before releasing them?

tubedogg
18 May 2001, 19:41
Looks good :)

Couple suggestions

Make a file that will automatically create the table necessary to run this.
Use global.php. And then look at adminfunctions.php (from vB2 RC3) and use the functions like maketableheader and stuff. It'll simplify the creation of the layout. Also maybe include instructions on how to add a link to this in the Admin CP.

smelialichu
18 May 2001, 20:31
Basically make it easy to install like kiers. Makes the needed tables, and then shows install instructions. Very useful hack.

limey
18 May 2001, 20:46
I'm not trying this hack out yet, but damnit man you are coming out with some seriously impressive and USEFUL! hacks Shabang.

My hat is off to you!

ztsky
18 May 2001, 20:56
It can't work in rc2 and rc3.
The postings.php isn't like your said in the zipfile.

Overgrow
18 May 2001, 21:52
Argh ok hold off on installing it until I download the latest RC3. I have an older version of V2, I didn't expect that the variables would change so much from RC to RC.

>>Basically make it easy to install like kiers.

Sorry, I write hacks for myself. I think people will find them useful so I release the code. I don't have the time or willingness to write fancy install scripts. If you can't paste in the create table code to phpmyadmin, maybe you shouldn't be hackin..

I'm not trying to win a VB developer spot here, just releasing some code.

New version in a little while.............

Overgrow
18 May 2001, 21:53
p.s. check out the code that it is! I'm very proud of myself.. hacking VB is seriously improving my PHP skill. I now use multi-dimensional arrays in this one instead of my old explode the pipes perl method.

limey
18 May 2001, 21:59
Hey I'm proud of you :) and your website :)

Me2Be
18 May 2001, 22:06
Originally posted by Overgrow
[B]Argh ok hold off on installing it until I download the latest RC3. I have an older version of V2, I didn't expect that the variables would change so much from RC to RC.
Thanks for this! Can you let me know when you have the RC3 ready?
Originally posted by Overgrow
I'm not trying to win a VB developer spot here, just releasing some code.Yeah, that's what Kier thought too! ;)

Overgrow
18 May 2001, 23:25
FILE UPDATED: May 21, 2001 6:50 am PST

FIXES -

-addslashes bug detected and resovled by wluke, this was causing some data to be ignored.


Included are two versions of install.txt, for V1 and V2. The V2 installation is much simpler. I like the structure, I may convert yet.

TimberLand
19 May 2001, 00:09
Nice, That's really nice. https://www.vbulletin.org/forum/

Overgrow
19 May 2001, 00:49
No complaints, so I assume it's working for V2 now?


ps. thanks for all the nice comments on the hack & site

Me2Be
19 May 2001, 00:51
Originally posted by Overgrow
No complaints, so I assume it's working for V2 now?


ps. thanks for all the nice comments on the hack & site I Love it!! I sent you a PM :)

Freddie Bingham
19 May 2001, 00:56
Basically make it easy to install like kiers. Makes the needed tables, and then shows install instructions. Very useful hack. You should reserve that sort of constructive criticism for your own hacks. Be appreciative of any hack you receive in any form that it comes in.

ztsky
19 May 2001, 04:38
It worked ,:)
what a good a work you did!

Me2Be
19 May 2001, 07:26
I seem to be getting some VB errors for this -- can you take a look at what could be wrong? They seem to be only on those threads that are MOVED and those that have an apostrophe in the subject.

Database error in vBulletin: Invalid SQL: INSERT INTO modlog (type,userid,threadid,threadtitle,fromforumid,toforumid,timestamp) VALUES ('3','3864','53151','Lee and Colin's Journal','','','990238526')
mysql error: You have an error in your SQL syntax near 's Journal','','','990238526')' at line 2

Database error in vBulletin: Invalid SQL: INSERT INTO modlog (type,userid,threadid,threadtitle,fromforumid,toforumid,timestamp)
VALUES ('3','3864','57894','how i'm saving money','','','990241258')
mysql error: You have an error in your SQL syntax near 'm saving money','','','990241258')' at line 2
mysql error number: 1064

Wayne Luke
19 May 2001, 07:57
In postings.php
Find:

$DB_site->query("INSERT INTO modlog (type,userid,threadid,threadtitle,fromforumid,toforumid,timestamp)
VALUES ('$threadinfo[open]','$bbuserid','$threadid','$threadinfo[title]','$forumid','','".time()."')");


Replace with:

$DB_site->query("INSERT INTO modlog (type,userid,threadid,threadtitle,fromforumid,toforumid,timestamp)
VALUES ('$threadinfo[open]','$bbuserid','$threadid','".addslashes($threadinfo[title])."','$forumid','','".time()."')");


Find:

$DB_site->query("INSERT INTO modlog (type,userid,threadid,threadtitle,fromforumid,toforumid,timestamp)
VALUES ('2','$bbuserid','$threadid','$threadinfo[title]','$forumid','','".time()."')");


Replace with:

$DB_site->query("INSERT INTO modlog (type,userid,threadid,threadtitle,fromforumid,toforumid,timestamp)
VALUES ('2','$bbuserid','$threadid','".addslashes($threadinfo[title])."','$forumid','','".time()."')");


Find:

$DB_site->query("INSERT INTO modlog (type,userid,threadid,threadtitle,fromforumid,toforumid,timestamp)
VALUES ('3','$bbuserid','$threadid','$threadinfo[title]','$curforumid','$movetoforumid','".time()."')");


Replace with:

$DB_site->query("INSERT INTO modlog (type,userid,threadid,threadtitle,fromforumid,toforumid,timestamp)
VALUES ('3','$bbuserid','$threadid','".addslashes($threadinfo[title])."','$curforumid','$movetoforumid','".time()."')");

smelialichu
19 May 2001, 09:12
Originally posted by freddie
You should reserve that sort of constructive criticism for your own hacks. Be appreciative of any hack you receive in any form that it comes in.
It wasn't criticism, just a suggeestion. i respect the hacik. I could never do anything like that and it's a really good hack. I'm sorry if I offended anyone. I'm thankful overgrow released his work for everyone else to use.

bokhalifa
19 May 2001, 09:25
good hack min:)

VirtueTech
19 May 2001, 14:46
Brilliant.

I've been waiting for something like this.

I'd actually like to show these kinds of things on the threads themselves to the users.

Such as:

Who close the thread - Mod or Thread Owner.
Text Reason for why the thread was closed
etc.


Great Job Overgrow...I'm impressed.

Thank you :)

VirtueTech
19 May 2001, 16:04
One question - Does this hack check permissions of the user viewing the logs?

Reason being the file allows the user to "Clear the Logs" and I would like to make sure that it can only be performed by an Admin.

I want to give access to my moderators but I don't want them to be able to clear the logs. So I added this...but it didn't work because the script is not defining $bbuserinfo['usergroupid']

<?
if ($bbuserinfo['usergroupid']==6) {
echo "<a href=\"javascript:void(0);\" onClick=\"javascript:if(confirm(\'Click OK to clear all moderator logs.\')) {document.location.href=\'<?=$PHP_SELF?>?rt=<?=time()?>&clearLogs=yes&showLimit=<?=$showLimit?>\';}\">CLEAR ALL LOGS</a> -";
} else {
echo "";
}
?>


I tried adding: require("./config.php");

but that produced errors. Any ideas?

VirtueTech
19 May 2001, 18:30
I think I found a bug....One of my "Super Moderators" closed a thread and the script did not enter the "Super Moderators" name in the Moderator Name field.

Check the image out or click this link for a demo (http://forums.paintballdojo.com/admin/modlog.php):

http://www.paintballdojo.com/mod_logging.gif

Me2Be
21 May 2001, 04:08
I only have super mods and it seems to be working for me for both super mods and admins

Wayne Luke
21 May 2001, 04:35
It works fine for me after making the three changes that I listed above.

VirtueTech
21 May 2001, 06:58
wluke: your right...I did not make those changes you losted above.

I will try and post back.

Overgrow
21 May 2001, 14:46
/me slaps himself around with slashes.



^^^^^^^^^^ Zip file fixed way above.

ocps
22 May 2001, 15:58
hi, im new to this but i got it all done except i dont kno how or where to create a table, anyone able to help me?

Overgrow
22 May 2001, 16:58
Before you start hacking up vBulletin, you should know your way around phpMyAdmin:

http://www.phpwizard.net/projects/phpMyAdmin/

Under the listing of your tables it has a textarea box where you can paste in the CREATE TABLE code. That is the easiest way without having to learn telnet.

ocps
22 May 2001, 19:07
i looked for phpmyadmin.php and didnt find it....or do i not even have that...im just learning this, im a web/graphic designer, not programmer...

jojo85
22 May 2001, 19:19
Who i love it
now i can install it cause the vb2.0 is out
thx very much guy :)

ocps
22 May 2001, 19:44
i finished all the rest....if setting up a table is too confusing maybe can someone do that part for me..i already did all the rest

Overgrow
22 May 2001, 20:12
Setting up a table is not that confusing. Trying to give you the steps to telnet and run mysql instead might be confusing. Downloading phpmyadmin is easy:

http://www.phpwizard.net/projects/phpMyAdmin/

Go there, download the zip, unzip, upload to a new phpmyadmin directory. Password this directory with .htaccess. There must be posts around here somewhere teaching you how to install phpmyadmin.

Once you have done this it will be your window into all of the database, you will wonder how you got along without it. Sorry my hacks do not install themselves, I believe you should be able to run phpmyadmin before hacking up vBulletin.

I was a designer first too, now I'm a hack programmer.. I'm sure you can learn it. Good luck.

ps. welcome, jojo

ocps
22 May 2001, 20:20
THNX MAN..I APPRECIATE IT ALOT..umm i actually dled it while i was waiting and uploaded it, but the config file is kinda confusing..like the one for the bulletin is easy, iot asks your database name password..like 3 things..but the phpadmin config has like 30 different things i dont kno what to put where.. i keep getting an error everytime

maverick1236
23 May 2001, 02:23
Moderator Logs REFRESH - CLEAR ALL LOGS - Max: 10 25 100 all
There seems to have been a slight problem with the database. Please try again by pressing the refresh button in your browser.

An E-Mail has been dispatched to our Technical Staff, who you can also contact if the problem persists.

We apologise for any inconvenience.


any ideas?

tubedogg
23 May 2001, 12:32
You must post the actual message, not just vB's stock error message. View the source of that page or the email and copy and paste one of those here.

zarkov
24 May 2001, 03:12
I'm having a problem with the forumid variable.
Like it aint storing it in the table so when i look at the logs there is no forum names.
I am not the only one suffering this as there is a picture on another post where the forum names are missing.

I am new to all this so i am playing to see what i can learn but everything looks OK.

G0D
25 May 2001, 10:37
Thnx for the hack dude :)

the_sisko
25 May 2001, 13:01
Originally posted by Zarkov
I'm having a problem with the forumid variable.
Like it aint storing it in the table so when i look at the logs there is no forum names.
I am not the only one suffering this as there is a picture on another post where the forum names are missing.

I am new to all this so i am playing to see what i can learn but everything looks OK.

Same prob for me!

ocps
25 May 2001, 13:58
well..this seems like the right area to post this, dont need to start a new thread..im having a prob when any admin or mod tries to chnage a post at all..this is the error thats in the tech support emial it sends me

Database error in vBulletin: Invalid SQL: INSERT INTO modlog
(type,userid,threadid,threadtitle,fromforumid,toforumid,timestamp)
VALUES ('2','2','31','board colors in beta stage','','','990795085')
mysql error: Table 'ocps.modlog' doesn't exist
mysql error number: 1146
Date: Friday 25th of May 2001 05:51:25 AM
Script: /bb/postings.php

am i supposed to have a modlog.php file??..cause i dont

ocps
25 May 2001, 14:09
actually..there is a modlogs.php file, but if i try to access it in my browser i get this error,
There seems to have been a slight problem with the database. Please try again by pressing the refresh button in your browser.

An E-Mail has been dispatched to our Technical Staff, who you can also contact if the problem persists.

We apologise for any inconvenience.

Overgrow
25 May 2001, 17:25
ocps: You need to create the modlog table. That is the first step in the instructions-- without it, no data can be entered. If you do not have phpMyAdmin installed then install this hack from wluke:

http://www.vbulletin.com/forum/showthread.php?threadid=3981

And paste the table create code into the query box that hack creates. Then the moderator hack should work.


To those with forumID problems, I'm sorry-- I can't see why this would be happening. Can you show me a screenshot? or the online example?

the_sisko
25 May 2001, 18:28
@Overgrow: I've send you an PM!

ocps
26 May 2001, 04:14
o..was this part of your hack..i copied the files from one server to the other but i thought i got rid of your hack casue i installed it 1/2 way and stoped cause i didnt kno what to do with phpmyadmin..i had no idea this prob on the new board was cause of that

ocps
26 May 2001, 04:26
k..i did everything except paste the table create code into the query box that hack creates..
im not sure what u mean..


ps..thx for helping me..im new to php

Psycho
29 May 2001, 15:37
Great hack Overgrow. Fairly easy to install, only took 15 min from start to finish.

My question is, have you thought about or are you planning to add more stats to it? As someone else I know, had a mod go on a ban trip. Even somehow banned the admin from his own board. So I was wondering if you planned on or could possible come up with something to add to this great hack with more mod stats such as the banning?

Thanks again for the great hack

BluSmurf
29 May 2001, 17:20
great hack, installed with ease, two thumbs up!

chrispadfield
30 May 2001, 11:21
Originally posted by Zarkov
I'm having a problem with the forumid variable.
Like it aint storing it in the table so when i look at the logs there is no forum names.
I am not the only one suffering this as there is a picture on another post where the forum names are missing.

I am new to all this so i am playing to see what i can learn but everything looks OK.

I also have this problem.

the_sisko
30 May 2001, 14:39
I've send Overgrow a PM about it. I found the 2 variables he uses for puting from and to forum ids, are wrong! But he didn't give me an answer now....

chrispadfield
30 May 2001, 15:43
do you know what the variables are? i guessed that was the problem cos i couldn't find them anywhere else either. The cryptic queries were confusing me so couldn't work out which was which to solve it.

Overgrow
30 May 2001, 18:32
How can the variables be correct for me and for 90% of the people but not for a few?

Obviously we have versions mixed up and the variable names are screwy. It shouldn't be hard to find them and I don't think the queries are that cryptic-- they are simple inserts, right?

The postings.php I used was from RC3 I haven't changed it since gold was released. Did they change those variable names again?

Look above the queries you inserted into postings and see where else it mentions "forumid" or maybe "curforumid" or something like that...

chrispadfield
30 May 2001, 18:58
your hack has the variables $fromforumid and $toforumid

when i meant cryptic i meant the vb stuff trying to work out which forumid to use :)

Me2Be
30 May 2001, 19:00
Originally posted by Overgrow
Obviously we have versions mixed up and the variable names are screwy. It shouldn't be hard to find them and I don't think the queries are that cryptic-- they are simple inserts, right?
LOL, call me observant but I just noticed that it that the forum to/from doesn't work on mine either (RC2) :)

Typhon
30 May 2001, 21:32
We just got it up and running on our site... works like a charm. :) Thanks!

Overgrow
30 May 2001, 21:53
OK! It's a simple VB2 version problem I'm sure. When I first wrote this hack I based it on VB2 beta code. I don't run VB2 so I was just using the last version I had.

People noted that the variables had changed for RC3 so I updated the file. For all those missing forum ID's, please download the zip at the bottom of the first page of this thread. It hasn't changed lately, I just think you're still using the old version of the queries.

Any luck?

the_sisko
30 May 2001, 22:04
This is what you find in modlog02.zip:

// HACK
$DB_site->query("INSERT INTO modlog (type,userid,threadid,threadtitle,fromforumid,toforumid,timestamp)
VALUES ('3','$bbuserid','$threadid','".addslashes($threadinfo[title])."','$curforumid','$movetoforumid','".time()."')");

And:
$curforumid
$movetoforumid

are not the right variables. I'll try a look over it, to find the right ones...!

the_sisko
30 May 2001, 22:16
Found the bug:

If you allready installed the hack open posting.php and search for:
$DB_site->query("INSERT INTO modlog (type,userid,threadid,threadtitle,fromforumid,toforumid,timestamp)
VALUES ('3','$bbuserid','$threadid','".addslashes($threadinfo[title])."','$curforumid','$movetoforumid','".time()."')");and replace it with:
$DB_site->query("INSERT INTO modlog (type,userid,threadid,threadtitle,fromforumid,toforumid,timestamp)
VALUES ('3','$bbuserid','$threadid','".addslashes($threadinfo[title])."','$threadinfo[forumid],'$forumid','".time()."')");
What was the bug?
You need to change the variables:
$curforumid
$movetoforumid
to
$threadinfo[forumid]
$forumid'

Now it work for me!

chrispadfield
30 May 2001, 22:31
cool, thanks for that and thanks to Overgrow for such a wicked hack.

etones
30 May 2001, 22:52
how difficult would it be to keep track of when a user was placed into the 'Banned By Moderators' User group?

I've got lots a mods who like to ban (for good reasons)... however i'd like to keep a track of whos banning who... any ideas?

Cheers all. GREAT HACK..

once agaon Overgrow.. your da maaan!! :D

Overgrow
30 May 2001, 23:30
I guess being able to be banned by a Mod is a 2.0 feature? Dunno anything about that, sorry. Someone else could easily expand this to catch the other 2.0 features like stick/unstick, merge, split, etc.


Sisko-- thanks for tracking that down. That was indeed the difference between the first version and the current release. All users who use the current file should have no problems.

ps. thanks for the good comments! I love this hack too, now I know who is slacking in the mod duties and who needs a promotion.

the_sisko
30 May 2001, 23:34
@Overgrow:
With your permission I'll try to add those features to it!

etones
31 May 2001, 09:33
thanks to both Overgrow and Sisko for helping out.

Cheers all.

chrispadfield
31 May 2001, 10:31
p.s. to get the forum to show up under closed and deleted threads you also need to change the variable to $forumid

Blue2000
31 May 2001, 12:08
what a great hack its nice to see what my mods r up to :p

it works fine for me apart from the "CLEAR ALL LOGS" there all still there even after a refresh. no error message or anything but it just doesnt remove them, i have had to do it in phpmyadmin

It also doesnt show where from, and i have made all the chnges that have been put in my the replys

BluSmurf
31 May 2001, 23:57
Originally posted by The_Sisko
Found the bug:

If you allready installed the hack open posting.php and search for:
$DB_site->query("INSERT INTO modlog (type,userid,threadid,threadtitle,fromforumid,toforumid,timestamp)
VALUES ('3','$bbuserid','$threadid','".addslashes($threadinfo[title])."','$curforumid','$movetoforumid','".time()."')");and replace it with:
$DB_site->query("INSERT INTO modlog (type,userid,threadid,threadtitle,fromforumid,toforumid,timestamp)
VALUES ('3','$bbuserid','$threadid','".addslashes($threadinfo[title])."','$threadinfo[forumid],'$forumid','".time()."')");
What was the bug?
You need to change the variables:
$curforumid
$movetoforumid
to
$threadinfo[forumid]
$forumid'

Now it work for me!


Does this apply for v2.0 Gold too?

Overgrow
01 Jun 2001, 01:28
re: vb2 gold and all other versions

I believe if you install from the latest zip on the front page of this thread you should have no problems. Those who were having problems most likely:

-Installed one of the old versions of the hacks
-Then used W.Luke's fixed queries but his queries were from a later version of the hack where I changed variable names to use VB2's new scheme

Sooo they had part old hack and part new hack = non working hack. If you use the latest version there should be no problems.


re: Not clearing the logs??

Anyone else with this problem? It couldn't be a simpler action:

// CLEAR LOGS?

if($clearLogs=="yes")
$DB_site->query("DELETE FROM modlog");


That's it. Dunno how that can malfunction for ya.

Overgrow
01 Jun 2001, 01:32
Question for everyone:

1) What's your normal peak # of users online and how many moderators do you have?

2) Have you told your mods that you are watching what they do?


By my logs I can see that one of my overall mods is doing a great job.. but I'm not sure I want to mention this-- I don't want them to feel pressured as if their actions are being watched.

the_sisko
01 Jun 2001, 10:19
1) ~20-30 , and 10 mods
2) no

etones
01 Jun 2001, 10:32
Usually about 50 constantly..

4 Mods... and they know... boy do they know :)

hehe

zarkov
01 Jun 2001, 12:01
I have already worked out the problem with the forum names anyways so thats ok but i have also added the code to log
Edit,sticky,merge and split, Im not sure if i can post a complete modified postings.php so i wont. but if its OK then i will add that later.
All it is is a modification of the code supplied by Overgrow and a mod to modlog.php which i have added.

thanks for the great hack Overgrow.

The new mod in postings.php are

find

eval("standardredirect(\"".gettemplate("redirect_editthread")."\",\"showthread.php?s=$session[sessionhash]&threadid=$threadid\");");
}

above it add

$DB_site->query("INSERT INTO modlog (type,userid,threadid,threadtitle,fromforumid,toforumid,timestamp)
VALUES ('4','$bbuserid','$threadid','".addslashes($threadinfo[title])."','$threadinfo[forumid]','','".time()."')");

find

eval("standardredirect(\"".gettemplate("redirect_mergethread")."\",\"showthread.php?s=$session[sessionhash]&threadid=$threadid\");");

}

above it add

$DB_site->query("INSERT INTO modlog (type,userid,threadid,threadtitle,fromforumid,toforumid,timestamp)
VALUES ('5','$bbuserid','$threadid','".addslashes($threadinfo[title])."','$threadinfo[forumid]','','".time()."')");

find

eval("standardredirect(\"".gettemplate("redirect_splitthread")."\",\"showthread.php?s=$session[sessionhash]&threadid=$newthreadid\");");
}

above it add

$DB_site->query("INSERT INTO modlog (type,userid,threadid,threadtitle,fromforumid,toforumid,timestamp)
VALUES ('6','$bbuserid','$threadid','".addslashes($threadinfo[title])."','$threadinfo[forumid]','','".time()."')");

find

eval("standardredirect(\"".gettemplate("redirect_sticky")."\",\"showthread.php?s=$session[sessionhash]&threadid=$threadid\");");

above it add

$DB_site->query("INSERT INTO modlog (type,userid,threadid,threadtitle,fromforumid,toforumid,timestamp)
VALUES ('7','$bbuserid','$threadid','".addslashes($threadinfo[title])."','$threadinfo[forumid]','','".time()."')");

NORRITT
01 Jun 2001, 14:22
Zarkov, you have forgot to add in modlog.php:
case("4"):
echo "<span class=\"toplinks\">EDIT: </span>";
break;

case("5"):
echo "<span class=\"toplinks\">MER: </span>";
break;

case("6"):
echo "<span class=\"toplinks\">SPL: </span>";
break;

case("7"):
echo "<span class=\"toplinks\">STI: </span>";
break;
below switch($subArray[type]) {

case("0"):
echo "<span class=\"toplinks\">CLS: </span>";
break;

case("1"):
echo "<span class=\"toplinks\">OPN: </span>";
break;

case("2"):
echo "<span class=\"toplinks\">DEL: </span>";
break;

case("3"):
echo "<span class=\"toplinks\">MOV: </span>";
break;

great hack, i really like it! :)

NORRITT
01 Jun 2001, 15:08
Hmm, working really good, but if a moderator moves a thead, there is no item under the From and To column (its just blank).

is there still a litte bug? (I have the latest version, that was released, so there is no mixture of old and new version)

zarkov
01 Jun 2001, 15:30
No i didnt DL the attachment. Its the updated modlog.php file.

You got me going then i had to load up the php file and check it again :)

also find this in the postings .php

eval("standardredirect(\"".gettemplate("redirect_movethread")."\",\"showthread.php?s=$session[sessionhash]&threadid=$threadid\");");
}

add above it instead of the almost identicle lines you have there(or just look at the differences after the VALUES blah de blah and alter yours to match

$DB_site->query("INSERT INTO modlog (type,userid,threadid,threadtitle,fromforumid,toforumid,timestamp)
VALUES ('3','$bbuserid','$threadid','".addslashes($threadinfo[title])."','$threadinfo[forumid]','$foruminfo[forumid]','".time()."')");


Overgrow,
I too suffered the same not clearing the logs problem,I tracked it down to be something to do withe the javascript used.
What i found was that if you clicked the clear logs file then clicked OK on the confirmation screen too quick it didnt clear it. Maybe cause the script was still loading ????
If you click clear logs then wait 10 secs or so then click OK it clears it first time every time.

Sorry i cant do anything to help sort that as i know absolutly nothing about javascript.

NORRITT
01 Jun 2001, 15:53
great - works :)

ThomasP
04 Jun 2001, 16:08
Hi there,

great idea, the hack

But it got kind of confusing by now, is Norrit's DL the latest and greatest?

Also doing all changes in Overgrow's notes and adding Zarkov's most recent changes... is this the only thing to do?

:rolleyes: :confused:

Sorry,
please enlighten me :)
-Tom

Overgrow
04 Jun 2001, 17:09
My zip on the first page of the thread is the latest "real" version.

If you want the additional features of tracking splits, merges, and other things then you need to follow Z's and Norrit's instructions in order.

I invite them to re do the install.txt instructions and upload a new version in this thread so there is one file for people to d/l...

furious
05 Jun 2001, 21:51
nice hack :)

just a little problem
i install modlog_v02
but i cant delete the logs :(

BluSmurf
05 Jun 2001, 23:25
I'll wait for the new version with the added features.. hope it will be available for download soon soon, it's too confusing at the moment :D

Dakota
07 Jun 2001, 08:20
I am having the same problem with mine. It won't clear the logs. I have tryed waiting for acouple minutes, but it still doesn't work.:confused:

SSJ4 Saiya-jin
08 Jun 2001, 17:51
What does this mean?

1) Add one database table - 'modlog'

CREATE TABLE modlog (
type tinyint(1) DEFAULT '0' NOT NULL,
userid int(10) DEFAULT '0' NOT NULL,
threadid int(10) DEFAULT '0' NOT NULL,
threadtitle varchar(100) NOT NULL,
fromforumid smallint(5),
toforumid smallint(5),
timestamp int(11) DEFAULT '0' NOT NULL

How do I create a database table?

Dakota
08 Jun 2001, 18:54
SSJ4: install this (http://www.vbulletin.com/forum/showthread.php?threadid=3981) hack first. it is very simple. Then in the CP it will create a link called query. Just copy and paste the text to create the table into it and press submit. I found that is much easier than trying to install phpmyadmin.

SSJ4 Saiya-jin
08 Jun 2001, 19:08
Thanks again dak

ThomasP
09 Jun 2001, 19:34
Hi there,

I managed to crawl through Overgrow's instructions plus Norrit's and Zarkov's additions ;)

Now I get an error message stating:

Fatal error: Call to unsupported or undefined function htmlheader() in /home/usr/(...)/forum/admin/modlog.php on line 71

Errrm, I'm using PHP3, guess the hack is only for PHP4, right?

Any chance to fix that? :confused:

Thanks,
-Tom :(

SSJ4 Saiya-jin
09 Jun 2001, 21:43
Try viewing and editing the source.

ThomasP
09 Jun 2001, 22:21
Sorry, I'm quite PHP-illiterate... :(
-Tom

SSJ4 Saiya-jin
09 Jun 2001, 22:42
Then how do you even know how to set up a PHP board? You have to know atleast some.

ThomasP
09 Jun 2001, 23:55
Well, basically I know quite a bit about HTML in all flavors and JS, Perl etc. - but nearly nothing about PHP.
Setting up the board and customizing it, i.e. colors and logos, was very easy - I didn't need to know anything about PHP...

Now to the hack:
Okay, actually I did a search on php.net to find a function called htmlheader(),
which was lame because I later found the function further down in modlog.php
(can I reference a function in php, which is below the call? - Interesting).

Good, I see that the error tells me htmlheader() is undefined, in lower
case... in modlog.php it is called HTMLHeader(), so I renamed it to
whatever() like Overgrow mentioned in a post with a problem similar to
mine - no effect, same error :(
http://161.58.84.213/forum/showthread.php?s=&threadid=15628&pagenumber=2#post99877

What brought me to the assumption that it might be PHP3 is the following
post of Overgrow in the same thread (vbSpiderFriend-hack by Overgrow)
http://161.58.84.213/forum/showthread.php?s=&threadid=15628&pagenumber=3#post100965
The option to upgrade to PHP4 is okay, BUT it will take a couple of weeks
for my ISP - don't ask ;)

So, if it would be (hopefully) fairly easy for a pro to make this hack working
on a PHP3 based server, this would be a perfect option for me.
If not - at least I asked :)

cu,
-Tom

SSJ4 Saiya-jin
10 Jun 2001, 00:34
Hmm... Maby overgrow would take the time to edit it to function properly with PHP3. Is there any way possible for you to get your server to upgrade to php4?

ThomasP
10 Jun 2001, 01:13
Yes, that would be gr8 :D
I already talked to my ISP and after some blabla he said okay, but it will take a couple of weeks since he didn't gave it prio 1 on his list (my impression)...

zarkov
10 Jun 2001, 10:22
Ive updated the install_v2.txt file with the new hacks and included the new modlog.php file.

I dont have V1 so cant test or even play with the code, so if someone else can do the new instructions for V1 that would be cool.

Ill add the new Zip file here so people can still get overgrows original files if they want to.

ThomasP
10 Jun 2001, 15:08
awesome Zarkov,
Thanks a lot!
-Tom

zarkov
15 Jun 2001, 11:21
dont use beta SW :)

Dakota
15 Jun 2001, 20:43
umm could you please tell me how you got it working with ie6?

dxb
21 Jun 2001, 11:34
thanks zorkov and overgrew everything works like a charm for me except one thing which i hope one of you guys can solve it

any move of the super moderator dose show up

the admins are fine the moderators are fine only the super moderator

I hope somebody will help me with this

Joshs
21 Jun 2001, 14:20
Originally posted by Zarkov
Ive updated the install_v2.txt file with the new hacks and included the new modlog.php file.

I dont have V1 so cant test or even play with the code, so if someone else can do the new instructions for V1 that would be cool.

Ill add the new Zip file here so people can still get overgrows original files if they want to.

What was changed, and how do I upgrade? Do I just update the modlog.php file?

J_PC
21 Jun 2001, 14:21
now that is a cool hack thanks guys

Rogue
28 Jun 2001, 22:40
Great hack! Works like a charm.
Is there a possibility to exclude admins from showing up in the logs?

xRugx
01 Jul 2001, 08:12
works fine

chilliboy
02 Jul 2001, 10:32
Sorry - wrong thread

zarkov
08 Jul 2001, 02:05
Sorry for not replying sooner but our host lost all our files and database in a server crash or somming, spent the last 2 weeks trying to get a new reliable host and rebuild the board and the last ofline backup we had and add all the hacks back and add a few more.

I cant remember off hand what the mods where but just upload the new Modlog.php file and follow instructions included to update the other php file.

it worked OK for us as i was only a super mod on our site and i showed up in the modlogs along with admins and normal mods.

Why would you want a MODLOG script that didnt log the actions of some moderators ( even if they are called Admins ).

But i spose you could add a
if not adminusergroupid then {
too only run the script if not an admin.

Im too tired and too involved elsewhere at the moment to work it out anymore thatn that for you at the moment, But shouldnt bee too hard.

GB
08 Jul 2001, 20:53
I installed this hack but it caused a problem for me. I had a friend upgrade my vB to 2.0.1 or what ever the latest version is.

When I installed the hack it changed my vB version to vB2 beta 4? WTF? how the hell did it do that?

J Wahl
10 Jul 2001, 01:57
the install went great.

but when lookin at the log theres nothing there...
yet i have closed a couple of threads.

anyone know what can cause this?

thanks.

Dakota
10 Jul 2001, 09:15
did you create the table in your database?

Edit: Oh yeah, I am having trouble with clearing the logs.

J Wahl
10 Jul 2001, 09:20
yes i did - but its all empty.

ShadowTech
11 Jul 2001, 00:59
Just curious if this script is going to have any further updates?

I have noticed a few bugs in it:

Moderators with custom titles do not list in the log, however their actions do.

Closed threads do not log which forum they were closed in.

Moved threads do not show the destination forum.

Deleted Threads do not show the forum they were deleted from.

I believe I am running vB 2.0.0 on a 2k machine with mySQL 3.23.32 and PHP4.0.5 .

If someone could help me with a fix for these bugs I would greatly appreciate it.

debsync
22 Jul 2001, 03:22
yeah I have the same problems as ShadowTech.. I tracked down the problem with nothing being filled in under the 'from' and 'to' columns... when a post is moved/deleted/copied, there are no values being filled in to the database under 'toforumid' and 'fromforumid'... I decided to fill these values in manually for a couple of database records, and whalla the correct forum names appear.... but how can I make the necessary changes in postings.php so that these values get filled in correctly? I just d/l'ed and installed the latest version today (overgrow's version - no other mods added)..

JoshFink
22 Jul 2001, 04:13
Here is what I did to fix this, hope I can explain it well. I haven't done the issue with the moderator with custom titles yet, but I'll work on it later.

Remeber : I'm by no means good at PHP :)

This is all in postings.php

Find (in the open /close thread block):

$DB_site->query("INSERT INTO modlog (type,userid,threadid,threadtitle,fromforumid,toforumid,timestamp)
VALUES ('$threadinfo[open]','$bbuserid','$threadid','".addslashes($threadinfo[title])."','$forumid','','".time()."')");


Replace with:

$DB_site->query("INSERT INTO modlog (type,userid,threadid,threadtitle,fromforumid,toforumid,timestamp)
VALUES ('$threadinfo[open]','$bbuserid','$threadid','".addslashes($threadinfo[title])."','$threadinfo[forumid]','','".time()."')");


Find (in the delete thread block):

$DB_site->query("INSERT INTO modlog (type,userid,threadid,threadtitle,fromforumid,toforumid,timestamp)
VALUES ('2','$bbuserid','$threadid','".addslashes($threadinfo[title])."','$forumid','','".time()."')");


Replace With:

$DB_site->query("INSERT INTO modlog (type,userid,threadid,threadtitle,fromforumid,toforumid,timestamp)
VALUES ('2','$bbuserid','$threadid','".addslashes($threadinfo[title])."','$threadinfo[forumid]','','".time()."')");


FIND (in the move thread block):

updateforumcount($threadinfo[forumid]);


Directly BELOW it ADD:

$movefrom=$threadinfo[forumid];


FIND (right below the last step):

updateforumcount($forumid);


Directly BELOW it ADD:

$moveto=$forumid;


FIND (Later on in the thread MOVE block):

$DB_site->query("INSERT INTO modlog (type,userid,threadid,threadtitle,fromforumid,toforumid,timestamp)
VALUES ('3','$bbuserid','$threadid','".addslashes($threadinfo[title])."','$curforumid','$movetoforumid','".time()."')");


Replace with:

$DB_site->query("INSERT INTO modlog (type,userid,threadid,threadtitle,fromforumid,toforumid,timestamp)
VALUES ('3','$bbuserid','$threadid','".addslashes($threadinfo[title])."','$movefrom','$moveto','".time()."')");


Josh

debsync
22 Jul 2001, 04:39
hey!!! works perfect now!! thanx JoshFink!:)

JoshFink
22 Jul 2001, 05:37
Glad to help.. This is actually the first PHP coding for vBulletin I've done.

Josh

GB
24 Jul 2001, 04:32
josh i edited my postings.php with what you put in your above post but my mod log still does not show where threads were deleted from and what forum threads are closed in

JoshFink
24 Jul 2001, 20:38
GB, try it again and make sure the code is all correct.. Or , send me your file and I'll take a loot at it.

Josh

GB
25 Jul 2001, 04:06
i got it josh...sorry to take up your time man

Dakota
25 Jul 2001, 20:31
How would I make it so that you must be at least a moderator to access the log?

GB
25 Jul 2001, 20:49
good idea dakota.....thats the only problem i see with this hack is that anyone who knows the URL to the mod log page can access it......

debsync
25 Jul 2001, 23:23
I got around this problem by just making another directory inside the admin directory.. then I copied config.php, modlog.php, and db_mysql.php into it.. Now you can use htaxx to lock the modlog directory...

then once you lock the directory, you can save a bookmark to get to it.. like this: http://username:password@www.yoursite.com/board/admin/modlog/modlog.php

There a a few changes that needed to be made to modlog.php if you are going to use a separate directory for it.... On lines 197, 204, and 211 you will need to make a change to the echo statements to show the locations of forumdisplay.php and showthread.php

(ie so instead of using href=\"../showthread.php?etc" you would change it to href=\"/board/showthread.php?etc" or whatever your board's root dir is)

anyway that's how I did it... if anyone has a better way let me know ;)

UPDATE: I forgot.. you can make it so that only modlog.php is needed inside your modlog dir (and not config.php and db_mysql.php).. open up your modlog.php, and towards the begining of the file make these changes:
find:require("./config.php");
change to:require("../config.php");
Then find:$dbclassname="./db_$dbservertype.php";
change it to:$dbclassname="../db_$dbservertype.php";


*but those changes will only work if your modlog directory is a subdirectory of the admin directory*

ThomasP
28 Jul 2001, 08:29
Hi,

sorry for being late on this, but I just got PHP4 installed (slow provider... :( )

I installed the hack from Zarkov's additions, added JoshFink extras and it seems to work fine.

I noticed to things though:

1) The Moderator table is empty if I access modlog.php making this hack quite senseless on my site

2) I deleted a thread and it showed up under "Moved threads"
Checked postings.php

deletethread($threadid,0);

// modlog hack
$DB_site->query("INSERT INTO modlog (type,userid,threadid,threadtitle,fromforumid,toforumid,timestamp)
VALUES ('2','$bbuserid','$threadid','".addslashes($threadinfo[title])."','$threadinfo[forumid]','','".time()."')");
// /modlog hack

eval("standardredirect(\"".gettemplate("redirect_deletethread")."\",\"forumdisplay.php?s=$session[sessionhash]&forumid=$threadinfo[forumid]\");");
}

Seems correct to me (case 2 = delete)
And the modlog.php

case("2"):
$deleted[$log[timestamp]] = array("type"=>"2", "userid"=>"$log[userid]", "threadid"=>"$log[threadid]", "title"=>"$log[title]", "username"=>"$log[username]",


Funny, what did I do wrong?
Thanks in advance,
-Tom

Mark Hewitt
28 Jul 2001, 16:01
Is there going to be a new version of this released with all the fixes included?

dxb
01 Aug 2001, 01:52
anybody can tell me how to apply this to VB 2.0.3 I mean with the new function split+move added to it

ThomasP
01 Aug 2001, 17:43
does the rest work for you?
Can you see the moderators by username?
thx,
-Tom

dxb
01 Aug 2001, 22:43
No it dose not work the moderator or the supermoderator name dose not show up only what ever the adminstrator name shows up

and

the new function split+move the moved thread title shows up but the source forum dose not show up

only the destination forum name which mean I wont know from where it's splited and moved

I thought this hack will be included in VB2.0.2 or VB2.0.3 but it seems like the pm status is more important than this .... I wonder are new features are added on demand base ??? :(

and now who can help us with this hack...:confused: ...:confused: ...:confused:

because I think it's one of the most important hacks ...:confused:

Me2Be
02 Aug 2001, 00:46
Originally posted by dxb
I thought this hack will be included in VB2.0.2 or VB2.0.3 but it seems like the pm status is more important than this .... I wonder are new features are added on demand base ??? :(

because I think it's one of the most important hacks ...:confused: Well, to some people it obviously is more important than this hack. And there is a difference. The PM stats hack just utilizes the data already there. This modlog feature is obviously much more complex and requires more work than a simple statistics hack. We should really appreciate what we've been given :)

JoshFink
02 Aug 2001, 03:54
Me2Be is absolutely right.

But... I will try and work on it tonight or tomorrow and see if I can get it fixed up for ya..

Josh

ThomasP
02 Aug 2001, 09:07
Thanks Josh,
really appreciate your help on this,
-Tom

dxb
02 Aug 2001, 11:50
I'm sorry Me2be but I was really disappointed when the hack didn't work because I had some big problems on my board because of one of the moderators and I don't wont to have that again

anyway thanks josh and I will be waiting for your fix :)

Itay
02 Aug 2001, 12:44
It seems to have stopped logging for me after my upgrade to 2.0.3

Also - I was wondering if there is any way to add posts deletion to it as well, because that would make this hack perfect...

JoshFink
02 Aug 2001, 22:26
To Make Split + Move Show Properly (sort of)

Here is what I did.

The row under "Split Threads" will have :

ORIGINAL thread title, Mod, Forum From, Forum To and Date.

MODLOG.PHP

Find

case("6"):
$split[$log[timestamp]] = array("type"=>"6", "userid"=>"$log[userid]", "threadid"=>"$log[threadid]", "title"=>"$log[title]", "username"=>"$log[username]",
"fromforumid"=>"$log[fromforumid]", "threadtitle"=>"$log[threadtitle]", "userid"=>"$log[userid]", "toforumid"=>"$log[toforumid]");
break;


Change To :

case("6"):
$split[$log[timestamp]] = array("type"=>"6", "userid"=>"$log[userid]", "threadid"=>"$log[threadid]", "title"=>"$log[title]", "username"=>"$log[username]",
"toforumid"=>"$log[fromforumid]", "threadtitle"=>"$log[threadtitle]", "userid"=>"$log[userid]", "toforumid"=>"$log[fromforumid]");
break;


Find

if ($title=="Moved Threads")
echo "To";


Change to :

if (($title=="Moved Threads") OR ($title=="Split Threads")){
echo "</td><td class=\"label\">To";}


FIND


Find
[PHP]
case("3"):
echo "<span class=\"toplinks\">MOV: </span>";
break;


After That Add

case("6"):
echo "<span class=\"toplinks\">SPL: </span>";
break;


Now in POSTINGS.PHP

Find in ### start do split thread ###

// Move post info to new thread...
$posts=$DB_site->query("SELECT postid,attachmentid,userid FROM post WHERE threadid='$threadid'");
while ($post=$DB_site->fetch_array($posts)) {
if ($splitpost[$post[postid]]=="yes") {
$DB_site->query("UPDATE post SET threadid=$newthreadid WHERE postid=$post[postid]");
}
}


After That Add :

$splitto=$DB_site->query("SELECT forumid FROM thread where threadid='$threadid'");
list($split_to) = mysql_fetch_row($splitto);


Find

$DB_site->query("INSERT INTO modlog (type,userid,threadid,threadtitle,fromforumid,toforumid,timestamp)
VALUES ('6','$bbuserid','$threadid','".addslashes($threadinfo[title])."','$threadinfo[forumid]','','".time()."')");


Change to:

$DB_site->query("INSERT INTO modlog (type,userid,threadid,threadtitle,fromforumid,toforumid,timestamp)
VALUES ('6','$bbuserid','$threadid','".addslashes($threadinfo[title])."','$threadinfo[forumid]','$split_to','".time()."')");


I believe that is all I did.. I was in a rush, so I might have missed documenting something on here. I'm sure if I did, someone will point it out. :D

Unfortunately the thing I don't like is that I can't see what the thread name was that I moved it to. This is because there is not enough rows in the table. i.e. a Thread From and a Thread To.

It could be done, but you would have to create two rows for a Split + Move , one for the split and one for the move. I might try that.. We'll have to see.

JoshFink
02 Aug 2001, 22:35
Itay, I thought about showing deleted posts, but most of the time a user can delete their own post. Then it would wind up clogging up the logs and the logs would be unreadable IMHO.

Josh

dxb
03 Aug 2001, 00:17
thanks josh for this

and about the hack

now the moderator name is showing up

the supermoderator with custom title still not showing up

the main this

the moved threads

the source forum is not showing up only you can see the destination forum

the same thing with split+move only the destination forum is showing up

dxb
03 Aug 2001, 00:50
funny discovry solved the supermoderator problem hahahah

I noticed all the supermoderators the ones with custom titles had the Remember Username and password disabled

and the moment I enabled that feature there names started showing up :)


the only problem I have now is the source forum name in move and split+move function

JoshFink
03 Aug 2001, 01:54
That is definately strange.. Mine works fine.. Send me your postings.php and modlog.php file and I'll look at it.

Josh
jfink@mindspring.com

dxb
04 Aug 2001, 08:23
I've sent you an email thanks alot Josh :) :)

JoshFink
07 Aug 2001, 15:03
Did this work for everyone?

Josh

ThomasP
07 Aug 2001, 19:39
Still didn't had time to look at it, but surely appreciate your help,
will have a (positive I hope) answer tomorrow or so,
Thanks for the moment!
-Tom

DarkReaper
08 Aug 2001, 03:24
Everything on mine is blank except for the thread that was acted upon, and the date...Using vB 2.0.3. Could this be the problem?

ThomasP
08 Aug 2001, 20:18
Hi,

I still have the same problem, doesn't see any user in the moderator field :(
Administrator is okay, but neither Moderators nor Super Moderators are shown - useless...
What's wrong here?
Thanks,
-Tom

JoshFink
08 Aug 2001, 20:28
That is odd. I just went through the close/open, delete and move process with a moderator and it shows up on my modlog no problem.

What I might suggest is to get a clean version of the modlog and postings, then mod it using the different updates through the threads in here and try again.

One thing on the split+move update is the notice that the FROM is in the TO field ("toforumid"=>"$log[fromforumid]")


case("6"):
$split[$log[timestamp]] = array("type"=>"6", "userid"=>"$log[userid]", "threadid"=>"$log[threadid]", "title"=>"$log[title]", "username"=>"$log[username]",
"toforumid"=>"$log[fromforumid]", "threadtitle"=>"$log[threadtitle]", "userid"=>"$log[userid]", "toforumid"=>"$log[fromforumid]");
break;


Josh

JoshFink
08 Aug 2001, 20:29
Dark Reaper, it has nothing to do with 2.0.3 as that is what I'm running fine.

Josh

Joshs
13 Aug 2001, 18:04
When moving a thread it doesnt show where it was moved from and where it was moved to... I am running 2.0.3, and i dont think it was even working on earlier versions....

JoshFink
13 Aug 2001, 18:24
You need to go back and look through the code updates.. It's all been fixed.. Well most of it.

Josh

snyx
13 Aug 2001, 21:02
Back on page 3-4 you were talking about phpmyadmin, NEVER install myphpadmin! Arg, I got confused one day and mucked a bunch of stuff up with this script :D

But anyways, Im going to try this hack now, I will see what happens! :)

JoshFink
13 Aug 2001, 21:06
I love PHPMyAdmin.. Works great for me..

Josh

Me2Be
13 Aug 2001, 21:18
Originally posted by JoshFink
I love PHPMyAdmin.. Works great for me..
Me too!

Lordmusic
13 Aug 2001, 23:46
PhPMyAdmin is the most useful script ever made. Don't knock it just because you don't know how to use it. That's what the manual link is for :)

snyx
14 Aug 2001, 02:18
Im not knocking it, im telling the story about when I messed up and installed somthing weird, read my post befor making snap judgments on it. :rolleyes:

Goddess Washu
17 Aug 2001, 04:37
Is there a "bug free" version out there, or do I have to go through all 10 pages... -_-;; Thanks for any help in advance, this seems to be a VERY nice hack, will come useful with my,not so responsible, staff... -_-;;;;;;;

inetd
17 Aug 2001, 10:59
I need last version (bug free) of this hack. Help me pls.

inetd
19 Aug 2001, 13:25
Reply me plz!

Thomas P
19 Aug 2001, 19:09
Hi,

I emailed with Josh recently, he would be the right person to
do an intermediate release of the hack since he has in depth
knowledge of php.
So, lets give him some time, he may consider this (I dunno).

I hope Overgrow, Zarkov, Sisko and Norritt don't bother, but the hack really needs a re-release for 2.0.3...

cu,
-Tom

Deacon Frost
20 Aug 2001, 20:46
Well, I made a ModLog Version which works great on vB 2.0.3. I will post soon, but, at the moment every text is in german:) So let mit Transalte it, and write a readme :)

Deacon Frost
22 Aug 2001, 17:23
Okay, I finished right in this minutes :) Hope, I translated everything right (*g*, you have a 50:50 chance :D)

Just post suggestions and bug reports in this thread, do not email me.

Using on your own risk :)

In attach, you'll find the install introductories, next post the file (in english), and in the post after the next post, you'll find the file in german.

Deacon Frost
22 Aug 2001, 17:24
The english file. Rename to "modlog.php"

Deacon Frost
22 Aug 2001, 17:25
the file in german. Rename to "modlog.php"

dxb
22 Aug 2001, 17:51
hey I was just going to write I will be waiting for your version ....and you already posted hahaha

Thanks alot Deacon

Thomas P
22 Aug 2001, 22:54
Thanks Deacon Frost,

I tried a fresh start and edited postings.php and index.php as described. Before that I dropped the modlog table and created it from scratch by copying the sql code into phpmyadmin (worked).
Copied modlog into /forum/admin directory and tried to have a look - works fine for the Administrator, but not for Moderators. :o
Everything seems fine, except that the "Moderator" row is blank.
When viewing the db I see that the userid = 0 there :( :(

I don't understand anymore: I tried it now a bunch of times, same error everytime.

Any hints on what can keep me getting always the same effect.
Code seems fine...
thx,
-Tom

Deacon Frost
23 Aug 2001, 07:23
Hi Thomas, denke mit dir kann man deutsch sprechen:)

Probier mal in den $DB_site->query("INSERT INTO modlog (type,userid,threadid,threadtitle,fromforumid,toforumid,timestamp)
VALUES ('$threadinfo[open]','$bbuserid','$threadid','".addslashes($threadinfo[title])."','$threadinfo[forumid]','','".time()."')");

strings $bbuserid durch $bbuserinfo[userid] zu ersetzen. Bei mir funktioniert es mit beiden variabeln.

For everybody else who's this problem, try replacing $bbuserid with $bbuserinfo[userid] in the seven $DB_site->query("INSERT INTO modlog (type,userid,threadid,threadtitle,fromforumid,toforumid,timestamp)
VALUES ('$threadinfo[open]','$bbuserid','$threadid','".addslashes($threadinfo[title])."','$threadinfo[forumid]','','".time()."')"); string's (string above is just an example, there are 7 different strings, but they look similar)

Thomas P
23 Aug 2001, 08:12
Hallo,


For everybody else who's this problem, try replacing $bbuserid with $bbuserinfo[userid] in the seven


That works!!

Very impressive and absolutely correct!

What a dumb little glitch :rolleyes:

Thanks for your help, finally after 11 pages the hack works for me, too... :D

Wondering why it works for everybody else, but for me the original way, whatever,
Thanks for helping,
-Tom


---

Yep, deutsch is gut! ;)
Danke, jetzt funzt's!
Meine Güte, so ein einfacher Fehler. Ist ja schon fast peinlich...
Haben die cracks hier auch übersehen - so ca. 11 Seiten lang.
Also: Respekt und tausend Dank! :)
-Tom

dost
23 Aug 2001, 14:45
Everything seems to be OK but I delete, open/close or move a thread but it doesn't show in the modlog. Is it because I'm the admin of the forum? What shall I do? I tried both of the versions (the original and Deacon Frost's)

Deacon Frost
23 Aug 2001, 16:46
@ DoST: Watch my last post :)

I updated the install instructions, 'cause it seems like some boards are having problems with $bbuserid :D It doesn't matter that you are admin, all moderatoricaly activities will be logged.

@ Thomas P: *gg* Kein Problem. Musste mich fast zwangsläufig mit dem Script vertraut machen, da ich auf zwei grossen Boards das Teil unbedingt brauche :)

dost
23 Aug 2001, 17:08
Thanks for the reply Deacon Frost. I did that change but the moderator activity still isn't recorded. I see that the modlog table is empty when I look at it with phpMyAdmin. But I'm not getting any errors. Any idea?

inetd
26 Aug 2001, 08:22
If the moderator will delete or will change the post, it will be mirrored in logs or not?

Deacon Frost
26 Aug 2001, 16:09
Change on Postings will not be logged, only changes on Threads.

@ DoST: Sorry, I have no idea what the matter is. BTW; Turkey is a great Country for Holidays :) (specially arround Öludeniz, Fethiey)

DarkReaper
26 Aug 2001, 18:03
Yay! Great job on the new version, it works great and looks a whole lot better!

dost
26 Aug 2001, 19:38
Originally posted by Deacon Frost
Change on Postings will not be logged, only changes on Threads.

@ DoST: Sorry, I have no idea what the matter is. BTW; Turkey is a great Country for Holidays :) (specially arround Öludeniz, Fethiey)

I looked at it again and now it works perfect! Thanks a lot! BTW; I recommend you seeing also Bodrum, Marmaris and Antalya which are very near to each other and to Fethiye.

:)

SirSteve
20 Sep 2001, 07:12
Originally posted by Deacon Frost
The english file. Rename to "modlog.php"

I had to make a change in here from php4? to php? to get mine to work.

magistr
22 Sep 2001, 10:30
yhis is cool hack
great man
tanx

it work with 2.0.3

but please edit links in admin/index.php

original:
Now, open admin/index.php

and search for this (or something like this):
________________________________________
<tr><td>
<table width="100%" border="0" cellspacing="0" cellpadding="2" id="navtable">
<?php maketableheader("Stats & Logs"); ?>
</table>
<a href="stats.php?s=<?php echo $session[sessionhash]; ?>"> View Statistics </a><br>
<a href="adminlog.php?s=<?php echo $session[sessionhash]; ?>"> View Admin Logs </a>
</td></tr>
________________________________________

and replace it to
________________________________________
<tr><td>
<table width="100%" border="0" cellspacing="0" cellpadding="2" id="navtable">
<?php maketableheader("Stats & Logs"); ?>
</table>
<a href="stats.php?s=<?php echo $session[sessionhash]; ?>"> View Statistics </a><br>
<a href="modlog.php4?showLimit=25"> View Moderator Logs </a><br>
<a href="adminlog.php?s=<?php echo $session[sessionhash]; ?>"> View Admin Logs </a>
</td></tr>
________________________________________

FINISH. Just upload "modlog.php" into /admin

Please DO NOT send any mails dependig on this script to me.
I will not answer. Using is on your own risk !



edit here:
<a href="modlog.php4?showLimit=25"> View Moderator Logs </a><br>

replace:
<a href="modlog.php?showLimit=25"> View Moderator Logs </a><br>

YourHostSucks
29 Sep 2001, 04:33
I installed the hack.. but it is not working..

--
FILE UPDATED: May 21, 2001 6:50 am PST
--

was what I downloaded, it shows no moderator activity,
I hit refresh alot to! hehe -=/

Plus if I goto /adminmodlog.php , I do not have to enter my password to access this? wierd...

DarkReaper
29 Sep 2001, 04:52
Make sure its in /forums/admin/ and not /forums/.

YourHostSucks
29 Sep 2001, 11:32
huh? .. o guess i made a typo in my post.. ;)

/adminmodlog.php = /admin/modlog.php

hehe

fxs158
11 Oct 2001, 06:02
Hi all,

I did this hack and it works great wit exeption of one feature. It seems that wheather i move delete or copy a topic as an admin. The mod hack reports it as a move. Any ideas how yo fix this? Also are there any hacks to monitor suspensions or banning?

YourHostSucks
11 Oct 2001, 07:03
Anyone have a answer to my problem? :)

It is not logging anything..

Thanks.

fxs158
14 Oct 2001, 18:44
Up!

YourHostSucks
14 Oct 2001, 19:12
Agreed.. .*bump* (lol)

Come on someone has to have a answer.. ;)

Thanks,

MW[MWGN]
23 Oct 2001, 15:17
I am not sure if someone has done this already, but you can add a link to the Moderator Logs in the Control Panel :).
In /admin/index.php
Find:
<a href="stats.php?s=<?php echo $session[sessionhash]; ?>"> View Statistics </a><br>

Add before that:
<a href="modlog.php"> View Moderator Logs</a><br>
Done =)

Edit: Oh damn, I knew someone did it already =), sorry, I didn't have the time to read the whole thread, hehe.

cyrus
23 Oct 2001, 15:34
what browser do yo use overgrow ?? Is that your browser in the screen captures you put on the first page ?? Looks very neat indeed !!

DarkReaper
23 Oct 2001, 17:37
That's Opera (htp://www.opera.com) - The Fastest Browser on Earth :p

sharkito
04 Nov 2001, 17:52
First of all, congratz goes to Overgrow for that usefull hack !

I wasted so many times to find how to make it working on my forum, installing updates, finding correct variables etc.... i deceided to include here my working installed one... I think it will help out some of you because that thread is a bit confusious now :D

[edit: please no posting of full vB php files]

WEBDosser
04 Nov 2001, 19:04
Adding this to your AdminCP in vb2.0.3.
Download and open index.php from your admin dir.

FIND:

<tr><td>
<table width="100%" border="0" cellspacing="0" cellpadding="2" id="navtable">
<?php maketableheader("Options"); ?>
</table>
<a href="options.php?s=<?php echo $session[sessionhash]; ?>&action=options"> Change options </a>
</td></tr>

PLACE UNDER IT THIS:

<tr><td>
<table width="100%" border="0" cellspacing="0" cellpadding="2" id="navtable">
<?php maketableheader("MOD Logs"); ?>
</table>
<a href="modlog.php?s=<?php echo $session[sessionhash]; ?>"> Moderator Logs </a>
</td></tr>


Adding this to your AdminCP in vb2.2.0.
Download and open index.php from your admin dir.

FIND:

makenavoption("vBulletin Options","options.php?t=0","<br>");

PLACE ABOVE IT THIS:

makenavoption("Moderator Logs","modlog.php?","<br />");


Upload index.php to your admin dir.. That's it..

SirSteve
08 Nov 2001, 04:09
This work on 2.2.0 ?

xug
08 Nov 2001, 12:56
I installed it on VB2.2.0 and had no errors.

I tested it still no errors.

Than I did look in the modlog option and see only 50% of the data that needs to be recorded !!

Thread name, Mod and date are redorded

From and to are not !!

Please help me out on this one.

Frank-kun
08 Nov 2001, 17:26
xug...is your table set up correctly? Remember, from and to need to be NULL, and there needs to be no default set (according to the instructions). If the table isn't set up right, the data will either not go into the table or you'll bomb out. ^_^

It works like a dream on my board running 2.2.0. Thanks for the great update to this hack.

xug
09 Nov 2001, 00:15
Hi Frank-kun

I used this query

CREATE TABLE modlog (
type tinyint(1) DEFAULT '0' NOT NULL,
userid int(10) DEFAULT '0' NOT NULL,
threadid int(10) DEFAULT '0' NOT NULL,
threadtitle varchar(100) NOT NULL,
fromforumid smallint(5),
toforumid smallint(5),
timestamp int(11) DEFAULT '0' NOT NULL
);

Please let me know if this is right or not, if not
what do I need to do ?

Thanks

Syphin
09 Nov 2001, 01:23
ive had this running for about a week... And now that i look at it again... Im having the same problem as xug... =/


-Syphin

Itay
10 Nov 2001, 10:51
Any chance someone can post a new file with all the fixes for 2.2.0 and if not, just compile a list of the changes you need to do for it to work?

chaz7979
15 Nov 2001, 06:27
Originally posted by Syphin
ive had this running for about a week... And now that i look at it again... Im having the same problem as xug... =/


-Syphin

I'm with him on this one. I could use The final 2.2.0 version.

Psychdrone
23 Nov 2001, 03:35
I am also with him, as i think this should be interegated into future V_bulletions!

Psychdrone
23 Nov 2001, 20:47
so could someone release a 2.2.1 version?

almightyone
02 Dec 2001, 05:38
i was curious to if anyone could make this thing show who edited a poll in the options and the who a mod banned deal ad so on would be real great

xug
02 Dec 2001, 12:53
Please help us with an update ! Thank you so much.

Psychdrone
02 Dec 2001, 22:34
Ya I also made a post in requests cocerning this, that I think any hacker that are going to do this code should read over first!
Here (http://64.4.32.251/cgi-bin/linkrd?_lang=EN&lah=096975a5d2f702453e4e8d5f76e54136&lat=1007332209&hm___action=http%3a%2f%2fwww%2evbulletin%2eorg%2fforum%2fshowthread%2ephp%3fthre adid%3d17206%26goto%3dnewpost)


This would be really really great!

and would probaly go down as one of the best hacks ever ;) ;) :D

xug
02 Dec 2001, 23:01
broken link!

Psychdrone
03 Dec 2001, 02:21
SOAB i knew that would happen

WEll heres a go again

http://www.vbulletin.org/forum/showthread.php?s=&threadid=32808

or go to the requests forum and look at more mod powers started by none other than me :D

almightyone
04 Dec 2001, 04:39
Originally posted by Psychdrone
SOAB i knew that would happen

WEll heres a go again

http://www.vbulletin.org/forum/showthread.php?s=&threadid=32808

or go to the requests forum and look at more mod powers started by none other than me :D
im sorry but could you explain to me how a mods powers has anything to do with an admin seeing moderators activities am i missing soemthing here :confused: :confused: :confused:

Psychdrone
04 Dec 2001, 23:14
Whoops wrong thread......:(


But hey sorri, no time to read through the thread, is this also working on 2.2.1?


Thanks!

Andrus
04 Jan 2002, 13:14
Originally posted by Psychdrone
so could someone release a 2.2.1 version?

Anyone? Please?

Jawelin
04 Jan 2002, 17:14
Hi. Thanks as I installed this great hack!
Just a question: is there any way to use the adminCP colors ???

:D :D :D

Pulsorock
10 Jan 2002, 18:24
Hello,
Where can I get the latest version of this hack?
Does it work fine in vB 2.2.1 ?

Overgrow
10 Jan 2002, 21:16
I just finished my upgrade from 1.1.3 to 2.2.1 so I will probably be re-writing this.. and I will integrate it with the admin CP colors. Please don't ask for a release date, it's when I get around to it! thanks... :D

Psychdrone
11 Jan 2002, 03:03
NO!!

thank you;)

now get to work :stupid:

mvigod
16 Jan 2002, 22:32
Overgrow,

Thanks. Looking forward to the 2.2.1 version.

One mod deleted something today and I need to know who did it. This will solve that problem in the future...

chaz7979
16 Jan 2002, 23:45
Yeah thanks overgrow. (will it work with 2.2.0?)

Jawelin
18 Jan 2002, 17:42
I've been using this version on 2.2.1 for more than a month without any problem. Just too much to findout the right assessment within this long thread... :)

Hwr, a post/thread deletion WITHOUT a recycle bin function (move to instead of delete... see HERE (http://www.vbulletin.org/forum/showthread.php?s=&threadid=28148&highlight=recycle) ) could be absolutely unuseful...
How could you recover a young deleted post after a db backup ?

Thnx

leebo
24 Jan 2002, 17:37
I've just setup this hack on version on 2.2.1 it kinda works but doesn't record the deletion of a thread or post only move thread and close thread any ideas ?? :cry:

Psychdrone
27 Jan 2002, 05:48
OR you still working on getting this to work on vb 2.2.1

KarateKid
07 Feb 2002, 22:11
does this work with 2.2.2 ? :?:

Jawelin
07 Feb 2002, 22:23
Originally posted by leebo
I've just setup this hack on version on 2.2.1 it kinda works but doesn't record the deletion of a thread or post only move thread and close thread any ideas ?? :cry:

Most probably you forgot some $DB_site->query("INSERT INTO modlog ... near the delete statement...

Yes, it works on 2.2.2 (installed on 2.2.1 and later upgraded changing modified files to newer)

Stoned Gecko
08 Feb 2002, 00:12
Well, after a couple of hours of reading this thread, editing postings.php, creating and dropping the table, and 5 big cups of tea I'm proud to announce that it FINALLY WORKS!!!!

*knocks on every single wood thing within reach*

Thanks to every one who contributed to this.

Overgrow: Great hack!!!

P.S. The only thing that's not working for me is the empty logs. No biggie though :D

Psychdrone
08 Feb 2002, 01:45
So dose this work or not, for vb 2.2.1

The guy said that he would work on it again for this version, so dose so............

someone helpe me, please

thans!

mADmAX`
22 Feb 2002, 07:12
So did we ever find out how to show the "from and to" when you move a thread, etc.? Think I read it all but seem to not get it to show right...

69-FLy-gUy
22 Feb 2002, 09:05
Originally posted by Stoned Gecko
Well, after a couple of hours of reading this thread, editing postings.php, creating and dropping the table, and 5 big cups of tea I'm proud to announce that it FINALLY WORKS!!!!

*knocks on every single wood thing within reach*

Thanks to every one who contributed to this.

Overgrow: Great hack!!!

P.S. The only thing that's not working for me is the empty logs. No biggie though :D

The empty logs does work.. After you empty it.. refresh the log. yo will notice everything is gone=)

69-FLy-gUy
22 Feb 2002, 09:06
And yes. this works for 2.2.1.. I have it working right now on 2.2.2

Stoned Gecko
22 Feb 2002, 19:01
It doesn't work for me though. Don't know why. I can hit 'Empty Logs' and pull up the modlog table from the database directly, and it will still be there. :confused:

Correction. It works only with IE. If I use Netscape or Opera it won't work. :)

Psychdrone
22 Feb 2002, 21:31
me niether,

the guy said he was gonna release a new one for 2.2.2

Comon buddy:)

Overgrow
02 Mar 2002, 18:20
http://www.vbulletin.org/forum/showthread.php?s=&threadid=35585

Roody
26 Apr 2002, 03:04
can someone help me out with this hack? I am getting the following error after install and running the modlog.php :


Moderator Logs REFRESH - CLEAR ALL LOGS - Max: 10 25 100 all


There seems to have been a slight problem with the database.
Please try again by pressing the refresh button in your browser.

An E-Mail has been dispatched to our Technical Staff, who you can also contact if the problem persists.

We apologise for any inconvenience.

Link14716
28 Jun 2002, 05:26
EDIT: Nevermind, I am dumb.

Dynamic One
10 Nov 2002, 22:27
This is realy cool thanks m8.

NTLDR
10 Nov 2002, 22:32
Use the updated version of this hack that Overgrow did ;)

It has some enhancements over this old version :D

Xenon
25 Feb 2003, 14:24
have closed the thread and removed it from the db, because of the newer version thread here:
http://www.vbulletin.org/forum/showthread.php?s=&threadid=35585