[BETA] Log Moderator & Admin activities

A place for MOD Authors to post and receive feedback on MODs still in development. No MODs within this forum should be used within a live environment! No new topics are allowed in this forum.
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

IMPORTANT: MOD Development Forum rules

On February 1, 2009 this forum will be set to read only as part of retiring of phpBB2.
Shannado
Registered User
Posts: 303
Joined: Mon Mar 25, 2002 6:54 pm
Location: Drenthe, The Netherlands
Contact:

[BETA] Log Moderator & Admin activities

Post by Shannado »

Name: Log Moderator & Admin activities
Description: With this MOD a log will be made of all the actions, that the Admin & moderators execute. Like moving, deleting, etc.
Version: v0.8.1

Status: BETA.
Download: http://www.shannado.nl/forumorg/viewforum.php?f=24

phpBB Link Info:
Request: http://phpbb.com/phpBB/viewtopic.php?t=21170
Development: this topic
Release: N/A

More features will come. Like selective deletion. More things will be logged.
Some things will be set with ACP

Suggestions are welcome. Maybe I will take them into the MOD. If you have done a suggestion earlier please do it again :-)
Greets,
Sven
Cane Corso Forum
davidh44
Registered User
Posts: 386
Joined: Sat Mar 09, 2002 5:56 am

Post by davidh44 »

Good mod! I liked this feature when I used to use Ikonboard.
Shannado
Registered User
Posts: 303
Joined: Mon Mar 25, 2002 6:54 pm
Location: Drenthe, The Netherlands
Contact:

Anyone installed it yet ?

Post by Shannado »

I would love to hear some response about this MOD. Any installed uit yet or we all waiting for the FINAL ? :mrgreen:
Greets,
Sven
Cane Corso Forum
User avatar
morpheus2matrix
Former Team Member
Posts: 9171
Joined: Wed Apr 10, 2002 7:31 pm
Location: France
Contact:

Post by morpheus2matrix »

i've a problem with this MOD !

take a look here : http://www.shannado.nl/forumorg/viewtopic.php?t=310
Former phpBB MOD-Team Member -

Forgive my bad English :(

No support by PM/Email - Thanks - You can thanks me here :) - Pay me for installing MOD's :lol:
Ralendil
Registered User
Posts: 410
Joined: Thu May 30, 2002 9:13 pm
Location: France
Contact:

Post by Ralendil »

Me no problem... only suggestions :mrgreen:
DoubleDoom
Registered User
Posts: 844
Joined: Wed Jun 26, 2002 6:48 pm

Post by DoubleDoom »

Maybe a table which shows the total moderator tasks done by each name so you can see quickly who the active mods are and who the less active ones are.

And perhaps what the popular mod activities are so we can see what the most common activity is and look for trends - ie is it moved threads, indicating wrong forums etc.

Nice mod so far, thank you.

###edit###

I have a problem when deleting individual posts (deleting threads are fine).

The error is:

Code: Select all

Failed to update log

DEBUG MODE

SQL Error : 1064 You have an error in your SQL syntax near ')' at line 2

INSERT INTO phpbb_czfxpboardlog_mod_admin ( done_by, action_date, action, cat, oldvalue, changed_id) VALUES ( 3, 1027002382, '' , 'poll', '', )

Line : 138
File : /home/virtual/site7/fst/var/www/html/czfxpboard/includes/functions_log_mod_admin.php
When checking over the code i can't see any obvious errors in my inputting and the debug refers to a file which is supplied and not edited.

When i check the installation area. The delete part on the modcp.php does confuse a little whereas the other areas do not.

Code: Select all

#-----[ FIND ]------------------------------------------ 
#
 			//
			// Got all required info so go ahead and start deleting everything
			//
# 
#-----[ BEFORE, ADD ]------------------------------------------ 
#
# changed in v0.81
//log
			$sql = "SELECT forum_id, topic_title 
				FROM " . TOPICS_TABLE . " 
				WHERE topic_id IN ($topic_id_sql) 
					OR topic_moved_id IN ($topic_id_sql)";
			if ( !($result = $db->sql_query($sql)) )
			{
				message_die(GENERAL_ERROR, 'Could not delete topics', '', __LINE__, __FILE__, $sql);
			}
			while ( $row = $db->sql_fetchrow($result) )
			{
				add_to_log ( $userdata['user_id'], 'delete', 'f', $row['forum_id'], $row['topic_title'], $newvalue, $userdata['user_level'] );
			}
			$db->sql_freeresult($result);
// log

# 
#-----[ FIND ]------------------------------------------ 
#  

				$vote_id_sql .= ( ( $vote_id_sql != '' ) ? ', ' : '' ) . $row['vote_id'];
			}
			$db->sql_freeresult($result);

# 
#-----[ AFTER, ADD ]------------------------------------------ 
#



//log mod
			$sql = "SELECT forum_id, topic_title 
				FROM " . TOPICS_TABLE . " 
				WHERE topic_id IN ($topic_id_sql) 
					OR topic_moved_id IN ($topic_id_sql)";
			if ( !$db->sql_query($sql) )
			{
				message_die(GENERAL_ERROR, 'Could not delete topics', '', __LINE__, __FILE__, $sql);
			}
			while ( $row = $db->sql_fetchrow($result) )
			{
				add_to_log ( $userdata['user_id'], 'delete', 'f', $row['forum_id'], $row['topic_title'], $newvalue, $userdata['user_level'] );
			}
			$db->sql_freeresult($result);
// log mod

It appears that the first find and replace is the same as the second bit just worded differently. However, as it is delete that is buggy on mine and i am a little cunfused about the delete bit in the modcp I guess i am just misreading it somehow.
Shannado
Registered User
Posts: 303
Joined: Mon Mar 25, 2002 6:54 pm
Location: Drenthe, The Netherlands
Contact:

Post by Shannado »

I come back to it next weekend, I hope. If i forgot please help me remind me :-)

At the moment i am just too busy and things on my mind
Greets,
Sven
Cane Corso Forum
User avatar
scoobie
Registered User
Posts: 237
Joined: Sun May 12, 2002 6:07 pm

Post by scoobie »

#
#-----[ FIND ]------------------------------------------
#
$sql = "DELETE FROM " . TOPICS_WATCH_TABLE . "
WHERE topic_id = $topic_id";
if ( !$db->sql_query($sql) )
{
message_die(GENERAL_ERROR, 'Error in deleting post', '', __LINE__, __FILE__, $sql);
}
}
}

remove_search_post($post_id);

#
#-----[ REPLACE WITH ]------------------------------------------
#
$sql = "DELETE FROM " . TOPICS_WATCH_TABLE . "
WHERE topic_id = $topic_id";
if ( !$db->sql_query($sql) )
{
message_die(GENERAL_ERROR, 'Error in deleting post', '', __LINE__, __FILE__, $sql);
}
add_to_log ( $userdata['user_id'], 'delete', 'f', $forum_id, $topic_tit, $newvalue, $userdata['user_level'] );
}
else
{
add_to_log ( $userdata['user_id'], 'delete', 't', $topic_id, $oldvalue, $newvalue, $userdata['user_level'] );
}
}
else
{
add_to_log ( $userdata['user_id'], 'delete', 't', $topic_id, $oldvalue, $newvalue, $userdata['user_level'] );
}
remove_search_post($post_id);


I've reached this far (right to the end) but this exact piece of code doesn't seem to exist (the last line seems to be missing). Any ideas?

Thanks,

SD
Ralendil
Registered User
Posts: 410
Joined: Thu May 30, 2002 9:13 pm
Location: France
Contact:

Post by Ralendil »

Look at the changes between the two part of code and do the changes on your files...
Try to retrieve same lines of this code. Maybe one mod have changed this (me too I haven't found this part of code)
User avatar
scoobie
Registered User
Posts: 237
Joined: Sun May 12, 2002 6:07 pm

Post by scoobie »

Oh Yeah I left that out and uploaded it but there was a problem with functions.php too one of the lines didn't exist

I had to leave that file unchanged - seems to work though

Excellent MOD
Ralendil
Registered User
Posts: 410
Joined: Thu May 30, 2002 9:13 pm
Location: France
Contact:

The correction i have done

Post by Ralendil »

My first correction... i progress i progress (thx to guy like Sven)

Well hope it will be totally good... Sven will verify when he's got time...

Go... http://www.shannado.nl/forumorg/viewtopic.php?p=619#619

For me it works now !

I can delete all post I want...
scoobie wrote: Oh Yeah I left that out and uploaded it but there was a problem with functions.php too one of the lines didn't exist

I had to leave that file unchanged - seems to work though

Excellent MOD


Yes it will work... but some logs won't be done...
it is your choice :)
DoubleDoom
Registered User
Posts: 844
Joined: Wed Jun 26, 2002 6:48 pm

Post by DoubleDoom »

I will take a look at your code on the other link. (edit - yet it fixes the delete post problem - thank you)

However, i have noticed somthing else. The reporting page, showing log, does not go onto page 2. It stays at page 1 of 1.

I have checked my code and it matches the modification. Anyone else spotted this yet before i put in any further information, just in case it is only me?
Shannado
Registered User
Posts: 303
Joined: Mon Mar 25, 2002 6:54 pm
Location: Drenthe, The Netherlands
Contact:

Post by Shannado »

Updated to v0.8.2:
Pagination bug fixed

Update info from v0.8.1 to v0.8.2:
Upload 'admin/admin_log_mod_admin.php' to 'admin' dir in your forum dir
Greets,
Sven
Cane Corso Forum
jawpaul
Registered User
Posts: 28
Joined: Sun Jun 30, 2002 4:40 am
Location: Backwoods
Contact:

Post by jawpaul »

Will download here shortly and play with. Sounds like a great idea. :D
Image
sycodee
Registered User
Posts: 5
Joined: Wed Aug 07, 2002 10:10 pm

Post by sycodee »

is there an update that will store the current IP address of the mod or admin?

Dave
Post Reply

Return to “[2.0.x] MODs in Development”