[2.0.6] Log Actions MOD

The cleanup is complete. This forum is now read only.

Rating:

Excellent!
128
50%
Very Good
47
18%
Good
35
14%
Fair
9
3%
Poor
39
15%
 
Total votes: 258

MTO
Registered User
Posts: 45
Joined: Fri Nov 07, 2003 2:48 am

Post by MTO »

Thanks chataos :)

That didnt solve my problems but it sure did help me finding where most of it was caused. After adding those I still had some errors (now I know that command is also missing the adding of "user_view_log" in the "phpbb_users" table).

Right now I have the "logs config" page working correctly.

But my "Logs Actions" page is displaying the same error as before:
You have not yet delete the file install_tables.php : do it before trying to see this page.


so now, somehow, I only need to make it realize install_tables.php is not there, as it has never been.


Note: I have EasyMod installed, it did half the work. Not the table alters.
To those like me, what I did was run log_actions_db_update.php, but as others have said, it gives tons of errors. To solve it edit line 23 so that it says:

Code: Select all

$phpbb_root_path = './../../../';
(note, this is only for us EasyMod users.

Now I only have one problem: It still thinks install_tables.php exists.
MTO
Registered User
Posts: 45
Joined: Fri Nov 07, 2003 2:48 am

Post by MTO »

I believe it's not really looking for install_tables.php but rather "log_actions_db_update.php" so it's that file you should delete as far as I can tell. Thats a language file missleading "bug".

Still, it's claiming that it finds it.
I'm trying it by changing the phpbb_root_path in admin_logs.php & admin_logs_config.php but that's not doing it.
MTO
Registered User
Posts: 45
Joined: Fri Nov 07, 2003 2:48 am

Post by MTO »

OK, finally...
for those who are having the

Code: Select all

You have not yet delete the file install_tables.php : do it before trying to see this page
error message look into your forum root folder. The script seems to have copied it there, so you need to delete it from there (and not just your admin/mods/log_actions_mod/ folder where you also know it's at).
Phanx
Registered User
Posts: 15
Joined: Sun Jun 12, 2005 4:50 am

Post by Phanx »

Has anyone gotten this mod working on a fresh install of 2.0.15?

I've narrowed down the problem to a particular piece of inserted code in posting.php, but lack the knowledge to fix it. When I comment out the entire inserted section, everything works fine (except that post edits are not logged). When I do not comment out the inserted section, I cannot edit posts - when I click the Edit button, I am shown a blank message-type page with no message.

The mod wants you to find this (it's around line 150 or so):

Code: Select all

case 'editpost':
and afterwards, insert this:

Code: Select all

		$username = ( !empty($HTTP_POST_VARS['username']) ) ? $HTTP_POST_VARS['username'] : '';
		$subject = ( !empty($HTTP_POST_VARS['subject']) ) ? trim($HTTP_POST_VARS['subject']) : '';
		$message = ( !empty($HTTP_POST_VARS['message']) ) ? $HTTP_POST_VARS['message'] : '';
		$poll_title = ( isset($HTTP_POST_VARS['poll_title']) && $is_auth['auth_pollcreate'] ) ? $HTTP_POST_VARS['poll_title'] : '';
		$poll_options = ( isset($HTTP_POST_VARS['poll_option_text']) && $is_auth['auth_pollcreate'] ) ? $HTTP_POST_VARS['poll_option_text'] : '';
		$poll_length = ( isset($HTTP_POST_VARS['poll_length']) && $is_auth['auth_pollcreate'] ) ? $HTTP_POST_VARS['poll_length'] : '';
		$bbcode_uid = '';

		prepare_post($mode, $post_data, $bbcode_on, $html_on, $smilies_on, $error_msg, $username, $bbcode_uid, $subject, $message, $poll_title, $poll_options, $poll_length);

		if ( $error_msg == '' )
		{
			$topic_type = ( $topic_type != $post_data['topic_type'] && !$is_auth['auth_sticky'] && !$is_auth['auth_announce'] ) ? $post_data['topic_type'] : $topic_type;

			submit_post($mode, $post_data, $return_message, $return_meta, $forum_id, $topic_id, $post_id, $poll_id, $topic_type, $bbcode_on, $html_on, $smilies_on, $attach_sig, $bbcode_uid, str_replace("\'", "''", $username), str_replace("\'", "''", $subject), str_replace("\'", "''", $message), str_replace("\'", "''", $poll_title), $poll_options, $poll_length);

			if ( $is_auth['auth_mod'] )
			{
				log_action('edit', $topic_id, $userdata['user_id'], $userdata['username']);
			}
		}
		break;
The original section of code (before the insert) looks like this:

Code: Select all

	case 'editpost':
		$is_auth_type = 'auth_edit';
		break;
I thought that the problem might be related to the two instances of "break;" but when I remove the first one (inserted by the mod code), I get this error message:
Error in posting

DEBUG MODE

UPDATE indark_posts SET post_username = '', enable_bbcode = , enable_html = , enable_smilies = , enable_sig = WHERE post_id = 2

Line : 286
File : functions_post.php


So, apparently the break stays in... but I'm not sure what else is wrong with that code that is causing problems.

Any ideas?
Pikachu50
Registered User
Posts: 12
Joined: Thu Jun 16, 2005 9:57 pm

Please help

Post by Pikachu50 »

Whenever I click on Log Actions I get this error:

You have not yet delete the file install_tables.php : do it before trying to see this page.

And whenever I click on Log Config I get this error:

phpBB : Critical Error

Could not query log config informations

DEBUG MODE

SQL Error : 1146 Table 'pikachu.phpbb_logs_config' doesn't exist

SELECT config_value AS all_admin FROM phpbb_logs_config WHERE config_name = 'all_admin'

Line : 101
File : admin_logs_config.php
Phanx
Registered User
Posts: 15
Joined: Sun Jun 12, 2005 4:50 am

Post by Phanx »

The first error should go away if you delete install_tables.php

The second error sounds like you haven't run install_tables.php yet... open up you browser and point it to that installation file, which will set up your database to support the MOD. So make sure you've run that before you delete it! :p

Is your table prefix "pikachu.phpbb_" ?

What version of phpBB are you running?
Pikachu50
Registered User
Posts: 12
Joined: Thu Jun 16, 2005 9:57 pm

Post by Pikachu50 »

Nevermind I figured everything out
mp3sattack
Registered User
Posts: 47
Joined: Sat Oct 25, 2003 6:32 am

Post by mp3sattack »

uh.. if i'm not the main admin, who is??


Sorry, you're not allowed to view this page. Only the main Admin has permission.

i already tried with 3 admin accounts, is there something i could change from the database to be main admin and be able to see the logs??

thanks
PHP VS VB
Registered User
Posts: 6
Joined: Thu May 19, 2005 4:31 am
Location: Lebanon , Beirout
Contact:

Support Need'd

Post by PHP VS VB »

Hello0o Sir

1st i want to thank you for these mod who will help me a lot figring out what my moderaters are doing behind me ...

anyway the Mod is workin pretty fine expect i am having an error when i want to separate some posts from an topic ... i mean move posts from an topic to another topic

anyway here is the error i am gettin i treid to find a way to fix it out but for ma bad luck i found nuthin so i am waitin ur help asap

Fatal error: Cannot redeclare log_action() (previously declared in /home/lebzz/public_html/includes/functions_log.php:28) in /home/lebzz/public_html/includes/functions_log.php on line 28


i wish i will have an answer for it soon ..

best regard's
Phanx
Registered User
Posts: 15
Joined: Sun Jun 12, 2005 4:50 am

Post by Phanx »

mp3sattack wrote: uh.. if i'm not the main admin, who is??

Sorry, you're not allowed to view this page. Only the main Admin has permission.

i already tried with 3 admin accounts, is there something i could change from the database to be main admin and be able to see the logs??

thanks


The Main Admin is whoever's user ID is 2. The MOD is checking against that in the included admin_users.php file, and probably in other locations. To fix that, change any instances of "$userdata['user_id'] <> '2'" or "$userdata['user_id'] == '2'" or anything like that to the user ID of your main admin account.

You could probably make it so that anyone with a user level of Admin could see them by changing those all to "$userdata['user_id'] == 2", but I'm not making any promises on that. :P
PHP VS VB
Registered User
Posts: 6
Joined: Thu May 19, 2005 4:31 am
Location: Lebanon , Beirout
Contact:

Hello

Post by PHP VS VB »

Where is the support for the mod .. i need help

1st i want to thank you for these mod who will help me a lot figring out what my moderaters are doing behind me ...

anyway the Mod is workin pretty fine expect i am having an error when i want to separate some posts from an topic ... i mean move posts from an topic to another topic

anyway here is the error i am gettin i treid to find a way to fix it out but for ma bad luck i found nuthin so i am waitin ur help asap

Fatal error: Cannot redeclare log_action() (previously declared in /home/lebzz/public_html/includes/functions_log.php:28) in /home/lebzz/public_html/includes/functions_log.php on line 28



i wish i will have an answer for it soon ..
BTW . i am using 2.0.15

best regard's
Syrathos
Registered User
Posts: 99
Joined: Sat Jan 22, 2005 11:24 am
Location: Australia
Contact:

Post by Syrathos »

I'm only having one problem. When I run log_actions_db_update.php, it runs all the queries except the first one.

Code: Select all

Running query :: CREATE TABLE phpbb_logs ( id_log MEDIUMINT(10) NOT NULL DEFAULT '0' AUTO_INCREMENT, mode VARCHAR(50) NULL DEFAULT '', topic_id MEDIUMINT(10) NULL DEFAULT '0', user_id MEDIUMINT(8) NULL DEFAULT '0', username VARCHAR(255) NULL DEFAULT '', user_ip CHAR(8) DEFAULT '0' NOT NULL, time INT(11) NULL DEFAULT '0', PRIMARY KEY (id_log)) -> ERROR - QUERY FAILED ----> Invalid default value for 'id_log'
SORTED
Syrathos
Registered User
Posts: 99
Joined: Sat Jan 22, 2005 11:24 am
Location: Australia
Contact:

Re: Hello

Post by Syrathos »

PHP VS VB wrote: Where is the support for the mod .. i need help

1st i want to thank you for these mod who will help me a lot figring out what my moderaters are doing behind me ...

anyway the Mod is workin pretty fine expect i am having an error when i want to separate some posts from an topic ... i mean move posts from an topic to another topic

anyway here is the error i am gettin i treid to find a way to fix it out but for ma bad luck i found nuthin so i am waitin ur help asap

Fatal error: Cannot redeclare log_action() (previously declared in /home/lebzz/public_html/includes/functions_log.php:28) in /home/lebzz/public_html/includes/functions_log.php on line 28



i wish i will have an answer for it soon ..
BTW . i am using 2.0.15

best regard's

I have sorted this problem.
scooby luke
Registered User
Posts: 1
Joined: Mon Jul 04, 2005 11:41 pm

Post by scooby luke »

Looking to be a great mod you are developing.

I read that the next version will log the actions of the administrators when they change settings within the admin control panel. How far off is this? I think this would be extremely beneficial to all who are security minded!!
Luco
Registered User
Posts: 8
Joined: Sun Apr 11, 2004 6:35 am
Contact:

Post by Luco »

wtf? i installed the mod, but when i run log_actions_db_update.php it tells me this error:

Code: Select all

Adding/modifying tables to your database
Running query :: CREATE TABLE phpbb_logs ( id_log MEDIUMINT(10) NOT NULL DEFAULT '0' AUTO_INCREMENT, mode VARCHAR(50) NULL DEFAULT '', topic_id MEDIUMINT(10) NULL DEFAULT '0', user_id MEDIUMINT(8) NULL DEFAULT '0', username VARCHAR(255) NULL DEFAULT '', user_ip CHAR(8) DEFAULT '0' NOT NULL, time INT(11) NULL DEFAULT '0', PRIMARY KEY (id_log)) -> ERROR - QUERY FAILED ----> Invalid default value for 'id_log'

Running query :: CREATE TABLE phpbb_logs_config ( config_name varchar(255) NOT NULL, config_value varchar(255) NOT NULL, PRIMARY KEY (config_name)) -> ERROR - QUERY FAILED ----> Table 'phpbb_logs_config' already exists

Running query :: INSERT INTO phpbb_logs_config ( config_name, config_value) VALUES ('all_admin', 0) -> ERROR - QUERY FAILED ----> Duplicate entry 'all_admin' for key 1

Running query :: ALTER TABLE phpbb_users ADD user_view_log TINYINT NOT NULL DEFAULT '0' -> ERROR - QUERY FAILED ----> Duplicate column name 'user_view_log'


COMPLETE - INSTALLATION IS ENDED

At least one query failed : check the error message and contact me if you need help to resolve the problem.
i see here you are all talking about install_tables.php - i dont have it in my rar.

i have version 1.1.6 on it... is there a newer on the net?
Image
Post Reply

Return to “[2.0.x] MOD Database Cleanup”