PDA

View Full Version : Moderator Activity Logging


Overgrow
05-17-2001, 10:00 PM
Moderator Logs for vBulletin

https://vborg.vbsupport.ru/

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
05-18-2001, 04:28 PM
FILE UPDATED: May 18, 2001 3:30 pm PST

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

amykhar
05-18-2001, 05:06 PM
I can't find them in rc3 either.

Amy

RobAC
05-18-2001, 05:40 PM
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
05-18-2001, 05:41 PM
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
05-18-2001, 06:31 PM
Basically make it easy to install like kiers. Makes the needed tables, and then shows install instructions. Very useful hack.

limey
05-18-2001, 06:46 PM
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
05-18-2001, 06:56 PM
It can't work in rc2 and rc3.
The postings.php isn't like your said in the zipfile.

Overgrow
05-18-2001, 07:52 PM
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
05-18-2001, 07:53 PM
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
05-18-2001, 07:59 PM
Hey I'm proud of you :) and your website :)

Me2Be
05-18-2001, 08:06 PM
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
05-18-2001, 09:25 PM
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
05-18-2001, 10:09 PM
Nice, That's really nice. https://vborg.vbsupport.ru/

Overgrow
05-18-2001, 10:49 PM
No complaints, so I assume it's working for V2 now?

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

Me2Be
05-18-2001, 10:51 PM
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
05-18-2001, 10:56 PM
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
05-19-2001, 02:38 AM
It worked ,:)
what a good a work you did!

Me2Be
05-19-2001, 05:26 AM
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,tofo rumid,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,tofo rumid,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
05-19-2001, 05:57 AM
In postings.php
Find:

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


Replace with:

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


Find:

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


Replace with:

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


Find:

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


Replace with:

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

smelialichu
05-19-2001, 07:12 AM
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
05-19-2001, 07:25 AM
good hack min:)

VirtueTech
05-19-2001, 12:46 PM
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
05-19-2001, 02:04 PM
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
05-19-2001, 04:30 PM
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
05-21-2001, 02:08 AM
I only have super mods and it seems to be working for me for both super mods and admins

Wayne Luke
05-21-2001, 02:35 AM
It works fine for me after making the three changes that I listed above.

VirtueTech
05-21-2001, 04:58 AM
wluke: your right...I did not make those changes you losted above.

I will try and post back.

Overgrow
05-21-2001, 12:46 PM
/me slaps himself around with slashes.

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

ocps
05-22-2001, 01:58 PM
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
05-22-2001, 02:58 PM
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
05-22-2001, 05:07 PM
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
05-22-2001, 05:19 PM
Who i love it
now i can install it cause the vb2.0 is out
thx very much guy :)

ocps
05-22-2001, 05:44 PM
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
05-22-2001, 06:12 PM
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
05-22-2001, 06:20 PM
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
05-23-2001, 12:23 AM
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
05-23-2001, 10:32 AM
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
05-24-2001, 01:12 AM
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
05-25-2001, 08:37 AM
Thnx for the hack dude :)

the_sisko
05-25-2001, 11:01 AM
[QUOTE]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.

ocps
05-25-2001, 11:58 AM
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,tofo rumid,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
05-25-2001, 12:09 PM
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
05-25-2001, 03:25 PM
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
05-25-2001, 04:28 PM
@Overgrow: I've send you an PM!

ocps
05-26-2001, 02:14 AM
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
05-26-2001, 02:26 AM
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
05-29-2001, 01:37 PM
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
05-29-2001, 03:20 PM
great hack, installed with ease, two thumbs up!

chrispadfield
05-30-2001, 09:21 AM
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
05-30-2001, 12:39 PM
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
05-30-2001, 01:43 PM
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
05-30-2001, 04:32 PM
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
05-30-2001, 04:58 PM
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
05-30-2001, 05:00 PM
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
05-30-2001, 07:32 PM
We just got it up and running on our site... works like a charm. :) Thanks!

Overgrow
05-30-2001, 07:53 PM
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
05-30-2001, 08:04 PM
This is what you find in modlog02.zip:

// HACK
$DB_site->query("INSERT INTO modlog (type,userid,threadid,threadtitle,fromforumid,tofo rumid,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
05-30-2001, 08:16 PM
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,tofo rumid,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,tofo rumid,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
05-30-2001, 08:31 PM
cool, thanks for that and thanks to Overgrow for such a wicked hack.

etones
05-30-2001, 08:52 PM
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
05-30-2001, 09:30 PM
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
05-30-2001, 09:34 PM
@Overgrow:
With your permission I'll try to add those features to it!

etones
05-31-2001, 07:33 AM
thanks to both Overgrow and Sisko for helping out.

Cheers all.

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

Blue2000
05-31-2001, 10:08 AM
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
05-31-2001, 09:57 PM
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,tofo rumid,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,tofo rumid,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
05-31-2001, 11:28 PM
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
05-31-2001, 11:32 PM
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
06-01-2001, 08:19 AM
1) ~20-30 , and 10 mods
2) no

etones
06-01-2001, 08:32 AM
Usually about 50 constantly..

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

hehe

zarkov
06-01-2001, 10:01 AM
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
[QUOTE]
eval("standardredirect(\"".gettemplate("redirect_editthread")."\",\"showthread.php?s=$session[sessionhash]&threadid=$threadid\");");
}

NORRITT
06-01-2001, 12:22 PM
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
06-01-2001, 01:08 PM
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
06-01-2001, 01:30 PM
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
[QUOTE]
eval("standardredirect(\"".gettemplate("redirect_movethread")."\",\"showthread.php?s=$session[sessionhash]&threadid=$threadid\");");
}

NORRITT
06-01-2001, 01:53 PM
great - works :)

ThomasP
06-04-2001, 02:08 PM
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
06-04-2001, 03:09 PM
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
06-05-2001, 07:51 PM
nice hack :)

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

BluSmurf
06-05-2001, 09:25 PM
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
06-07-2001, 06:20 AM
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
06-08-2001, 03:51 PM
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
06-08-2001, 04:54 PM
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
06-08-2001, 05:08 PM
Thanks again dak

ThomasP
06-09-2001, 05:34 PM
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
06-09-2001, 07:43 PM
Try viewing and editing the source.

ThomasP
06-09-2001, 08:21 PM
Sorry, I'm quite PHP-illiterate... :(
-Tom

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

ThomasP
06-09-2001, 09:55 PM
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
06-09-2001, 10:34 PM
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
06-09-2001, 11:13 PM
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
06-10-2001, 08:22 AM
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
06-10-2001, 01:08 PM
awesome Zarkov,
Thanks a lot!
-Tom

zarkov
06-15-2001, 09:21 AM
dont use beta SW :)

Dakota
06-15-2001, 06:43 PM
umm could you please tell me how you got it working with ie6?

dxb
06-21-2001, 09:34 AM
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
06-21-2001, 12:20 PM
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
06-21-2001, 12:21 PM
now that is a cool hack thanks guys

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

xRugx
07-01-2001, 06:12 AM
works fine

chilliboy
07-02-2001, 08:32 AM
Sorry - wrong thread

zarkov
07-08-2001, 12:05 AM
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
07-08-2001, 06:53 PM
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
07-09-2001, 11:57 PM
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
07-10-2001, 07:15 AM
did you create the table in your database?

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

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

ShadowTech
07-10-2001, 10:59 PM
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
07-22-2001, 01:22 AM
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
07-22-2001, 02:13 AM
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,tofo rumid,timestamp)
VALUES ('$threadinfo[open]','$bbuserid','$threadid','".addslashes($threadinfo[title])."','$forumid','','".time()."')");


Replace with:

$DB_site->query("INSERT INTO modlog (type,userid,threadid,threadtitle,fromforumid,tofo rumid,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,tofo rumid,timestamp)
VALUES ('2','$bbuserid','$threadid','".addslashes($threadinfo[title])."','$forumid','','".time()."')");


Replace With:

$DB_site->query("INSERT INTO modlog (type,userid,threadid,threadtitle,fromforumid,tofo rumid,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,tofo rumid,timestamp)
VALUES ('3','$bbuserid','$threadid','".addslashes($threadinfo[title])."','$curforumid','$movetoforumid','".time()."')");


Replace with:

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


Josh

debsync
07-22-2001, 02:39 AM
hey!!! works perfect now!! thanx JoshFink!:)

JoshFink
07-22-2001, 03:37 AM
Glad to help.. This is actually the first PHP coding for vBulletin I've done.

Josh

GB
07-24-2001, 02:32 AM
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
07-24-2001, 06:38 PM
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
07-25-2001, 02:06 AM
i got it josh...sorry to take up your time man

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

GB
07-25-2001, 06:49 PM
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
07-25-2001, 09:23 PM
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
07-28-2001, 06:29 AM
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,tofo rumid,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
07-28-2001, 02:01 PM
Is there going to be a new version of this released with all the fixes included?

dxb
07-31-2001, 11:52 PM
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
08-01-2001, 03:43 PM
does the rest work for you?
Can you see the moderators by username?
thx,
-Tom

dxb
08-01-2001, 08:43 PM
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
08-01-2001, 10:46 PM
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
08-02-2001, 01:54 AM
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
08-02-2001, 07:07 AM
Thanks Josh,
really appreciate your help on this,
-Tom

dxb
08-02-2001, 09:50 AM
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
08-02-2001, 10:44 AM
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
08-02-2001, 08:26 PM
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,tofo rumid,timestamp)
VALUES ('6','$bbuserid','$threadid','".addslashes($threadinfo[title])."','$threadinfo[forumid]','','".time()."')");


Change to:

$DB_site->query("INSERT INTO modlog (type,userid,threadid,threadtitle,fromforumid,tofo rumid,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
08-02-2001, 08:35 PM
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
08-02-2001, 10:17 PM
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
08-02-2001, 10:50 PM
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
08-02-2001, 11:54 PM
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
08-04-2001, 06:23 AM
I've sent you an email thanks alot Josh :) :)

JoshFink
08-07-2001, 01:03 PM
Did this work for everyone?

Josh

ThomasP
08-07-2001, 05:39 PM
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-08-2001, 01:24 AM
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-08-2001, 06:18 PM
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-08-2001, 06:28 PM
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-08-2001, 06:29 PM
Dark Reaper, it has nothing to do with 2.0.3 as that is what I'm running fine.

Josh

Joshs
08-13-2001, 04:04 PM
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
08-13-2001, 04:24 PM
You need to go back and look through the code updates.. It's all been fixed.. Well most of it.

Josh

snyx
08-13-2001, 07:02 PM
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
08-13-2001, 07:06 PM
I love PHPMyAdmin.. Works great for me..

Josh

Me2Be
08-13-2001, 07:18 PM
Originally posted by JoshFink
I love PHPMyAdmin.. Works great for me..
Me too!

Lordmusic
08-13-2001, 09:46 PM
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
08-14-2001, 12:18 AM
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
08-17-2001, 02:37 AM
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
08-17-2001, 08:59 AM
I need last version (bug free) of this hack. Help me pls.

inetd
08-19-2001, 11:25 AM
Reply me plz!

Thomas P
08-19-2001, 05:09 PM
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
08-20-2001, 06:46 PM
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
08-22-2001, 03:23 PM
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
08-22-2001, 03:24 PM
The english file. Rename to "modlog.php"

Deacon Frost
08-22-2001, 03:25 PM
the file in german. Rename to "modlog.php"

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

Thanks alot Deacon

Thomas P
08-22-2001, 08:54 PM
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
08-23-2001, 05:23 AM
Hi Thomas, denke mit dir kann man deutsch sprechen:)

Probier mal in den $DB_site->query("INSERT INTO modlog (type,userid,threadid,threadtitle,fromforumid,tofo rumid,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,tofo rumid,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
08-23-2001, 06:12 AM
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
08-23-2001, 12:45 PM
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
08-23-2001, 02:46 PM
@ 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
08-23-2001, 03:08 PM
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
08-26-2001, 06:22 AM
If the moderator will delete or will change the post, it will be mirrored in logs or not?

Deacon Frost
08-26-2001, 02:09 PM
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
08-26-2001, 04:03 PM
Yay! Great job on the new version, it works great and looks a whole lot better!

dost
08-26-2001, 05:38 PM
[QUOTE]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)

SirSteve
09-20-2001, 05:12 AM
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
09-22-2001, 08:30 AM
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
09-29-2001, 02:33 AM
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
09-29-2001, 02:52 AM
Make sure its in /forums/admin/ and not /forums/.

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

/adminmodlog.php = /admin/modlog.php

hehe

fxs158
10-11-2001, 04:02 AM
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
10-11-2001, 05:03 AM
Anyone have a answer to my problem? :)

It is not logging anything..

Thanks.

fxs158
10-14-2001, 04:44 PM
Up!

YourHostSucks
10-14-2001, 05:12 PM
Agreed.. .*bump* (lol)

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

Thanks,

MW[MWGN]
10-23-2001, 01:17 PM
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
10-23-2001, 01:34 PM
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
10-23-2001, 03:37 PM
That's Opera (htp://www.opera.com) - The Fastest Browser on Earth :p

sharkito
11-04-2001, 03:52 PM
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
11-04-2001, 05:04 PM
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
11-08-2001, 02:09 AM
This work on 2.2.0 ?

xug
11-08-2001, 10:56 AM
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
11-08-2001, 03:26 PM
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
11-08-2001, 10:15 PM
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
11-08-2001, 11:23 PM
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
11-10-2001, 08:51 AM
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
11-15-2001, 04:27 AM
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
11-23-2001, 01:35 AM
I am also with him, as i think this should be interegated into future V_bulletions!

Psychdrone
11-23-2001, 06:47 PM
so could someone release a 2.2.1 version?

almightyone
12-02-2001, 03:38 AM
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
12-02-2001, 10:53 AM
Please help us with an update ! Thank you so much.

Psychdrone
12-02-2001, 08:34 PM
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%2ff orum%2fshowthread%2ephp%3fthreadid%3d17206%26goto% 3dnewpost)


This would be really really great!

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

xug
12-02-2001, 09:01 PM
broken link!

Psychdrone
12-03-2001, 12:21 AM
SOAB i knew that would happen

WEll heres a go again

https://vborg.vbsupport.ru/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
12-04-2001, 02:39 AM
Originally posted by Psychdrone
SOAB i knew that would happen

WEll heres a go again

https://vborg.vbsupport.ru/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
12-04-2001, 09:14 PM
Whoops wrong thread......:(


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


Thanks!

Andrus
01-04-2002, 11:14 AM
Originally posted by Psychdrone
so could someone release a 2.2.1 version?

Anyone? Please?

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

:D :D :D

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

Overgrow
01-10-2002, 07:16 PM
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
01-11-2002, 01:03 AM
NO!!

thank you;)

now get to work :stupid:

mvigod
01-16-2002, 08:32 PM
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
01-16-2002, 09:45 PM
Yeah thanks overgrow. (will it work with 2.2.0?)

Jawelin
01-18-2002, 03:42 PM
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 (https://vborg.vbsupport.ru/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
01-24-2002, 03:37 PM
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
01-27-2002, 03:48 AM
OR you still working on getting this to work on vb 2.2.1

KarateKid
02-07-2002, 08:11 PM
does this work with 2.2.2 ? :?:

Jawelin
02-07-2002, 08:23 PM
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
02-07-2002, 10:12 PM
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
02-07-2002, 11:45 PM
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`
02-22-2002, 05:12 AM
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
02-22-2002, 07:05 AM
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
02-22-2002, 07:06 AM
And yes. this works for 2.2.1.. I have it working right now on 2.2.2

Stoned Gecko
02-22-2002, 05:01 PM
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
02-22-2002, 07:31 PM
me niether,

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

Comon buddy:)

Overgrow
03-02-2002, 04:20 PM
<a href="https://vborg.vbsupport.ru/showthread.php?s=&threadid=35585" target="_blank">https://vborg.vbsupport.ru/showt...threadid=35585</a>

Roody
04-26-2002, 01:04 AM
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
06-28-2002, 03:26 AM
EDIT: Nevermind, I am dumb.

Dynamic One
11-10-2002, 08:27 PM
This is realy cool thanks m8.

NTLDR
11-10-2002, 08:32 PM
Use the updated version of this hack that Overgrow did ;)

It has some enhancements over this old version :D

Xenon
02-25-2003, 12:24 PM
have closed the thread and removed it from the db, because of the newer version thread here:
https://vborg.vbsupport.ru/showthread.php?s=&threadid=35585