vb.org Archive

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

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

Quote:

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?
Quote:

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

Quote:

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

Quote:

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:
PHP Code:

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

Replace with:
PHP Code:

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

Find:
PHP Code:

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

Replace with:
PHP Code:

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

Find:
PHP Code:

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

Replace with:
PHP Code:

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


smelialichu 05-19-2001 07:12 AM

Quote:

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']
Code:

<?
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://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 :)


All times are GMT. The time now is 04:43 PM.

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

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

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

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