[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

Chantel
Registered User
Posts: 60
Joined: Wed Mar 23, 2005 2:56 am
Location: Southern Colorado
Contact:

Post by Chantel »

TMB wrote: Try reading the answer three posts above your own. :roll:


Oh, thanks for pointing that out! I didn't see it. :) I kind of skimmed through the pages, but ... reading 90 or so pages seems a bit overwhelming. :) I'm glad to know it works..
-Chantel

"Faith is the substance of things hoped for, the evidence of things not seen."
mikeinjersey
Registered User
Posts: 199
Joined: Thu Aug 14, 2003 11:56 pm

Post by mikeinjersey »

how come install_tables.php does not come with the download? im all confused.
mikeinjersey
Registered User
Posts: 199
Joined: Thu Aug 14, 2003 11:56 pm

Post by mikeinjersey »

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


i just double checked and noticed that user_view_log does exist in my phpbb_users database... is that good enough?

could someone please elaborate on this error i received.
ChaosBringer
Registered User
Posts: 412
Joined: Mon Apr 19, 2004 11:30 pm
Contact:

Post by ChaosBringer »

run log_actions_uninstall_tables.php from the root of your server, and then run log_actions_db_update.php again..


anyways, i wanted to know if there is a mod for this like the new version of phpbb that also moderats logins and stuff?

01000001 01101100 01101100 00100000 01111001 01101111 01110101 01110010 00100000 01100010 01101001 01101110 01100001 01110010 01111001 00100000 01100001 01110010 01100101 00100000 01100010 01100101 01101100 01101111 01101110 01100111 00100000 01110100 01101111 00100000 01110101 01110011 00100001
mikeinjersey
Registered User
Posts: 199
Joined: Thu Aug 14, 2003 11:56 pm

Post by mikeinjersey »

that seemed to do the trick...thanks brother.
Keva
Registered User
Posts: 101
Joined: Mon Mar 28, 2005 12:21 pm
Contact:

Post by Keva »

i got this error when running log_actions_db_update.php

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

edit: i unstalled the tables and now get this when trying to edit a post ir anything ... Fatal error: Cannot redeclare log_action() (previously declared in /home/ukconga/public_html/forum/includes/functions_log.php:28) in /home/ukconga/public_html/forum/includes/functions_log.php on line 28

edit2: fixed it by restoring a backup via ftp then trying to run the log_actions_db_update.php file again ... worked first time round.
doot
Registered User
Posts: 17
Joined: Mon Feb 23, 2004 7:31 pm
Contact:

Post by doot »

Since installing this mod, I get the following errors when editing any posts:

Code: Select all

Warning: Missing argument 14 for prepare_post() in /../forum/includes/functions_post.php on line 124

Warning: Missing argument 15 for prepare_post() in /../forum/includes/functions_post.php on line 124

Warning: Missing argument 21 for submit_post() in /../forum/includes/functions_post.php on line 220

Warning: Missing argument 22 for submit_post() in /../forum/includes/functions_post.php on line 220

Warning: Cannot modify header information - headers already sent by (output started at /../forum/includes/functions_post.php:124) in /../forum/includes/page_header.php on line 486

Warning: Cannot modify header information - headers already sent by (output started at /../forum/includes/functions_post.php:124) in /../forum/includes/page_header.php on line 488

Warning: Cannot modify header information - headers already sent by (output started at /../forum/includes/functions_post.php:124) in /../forum/includes/page_header.php on line 489
This appears above the "you have successfully edited this post" message. The page then redirects back to the topic and the post has been edited successfully. Those errors worry me though.

I am running the latest version 2.0.14.

Can anybody help?

Cheers
doot 8)
doot
Registered User
Posts: 17
Joined: Mon Feb 23, 2004 7:31 pm
Contact:

Post by doot »

Anyone? :cry:
PhySc0
Registered User
Posts: 141
Joined: Sun Feb 20, 2005 1:57 pm

Post by PhySc0 »

I have this mod installed, seems to work ok, and I think its a great MOD.
HOWEVER... I dont think it recording all the actions, and I have a query on a certain part of the install text:

Code: Select all

#-----[ FIND ]------------------------------------------------
#
$sql = "UPDATE " . TOPICS_TABLE . " 
	SET topic_status = " . TOPIC_LOCKED . " 
	WHERE
		AND
		AND
	if (
{
	message_die(
}

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

// Log actions MOD Start
log_action('lock', $topic_id_sql, $userdata['user_id'], $userdata['username']);
// Log actions MOD End

#
#-----[ FIND ]------------------------------------------------
#
$sql = "UPDATE " . TOPICS_TABLE . " 
	SET topic_status = " . TOPIC_UNLOCKED . " 
	WHERE
		AND
		AND
if (
{
	message_die(
}

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

// Log actions MOD Start
log_action('unlock', $topic_id_sql, $userdata['user_id'], $userdata['username']);
// Log actions MOD End

#
Thats part of the script to edit in modcp.php
BUT as you can see that part of the code change is only showing you a portion of what is there, and the code its telling you to look for happens on a number of occassions in that script. Therefore I'm thinkning that you must have to do it for each one (which I didn't) and thats why it does't show you all of it?

If this is the case, how can it be compliant with EasyMOD? (although it isn't officially) its stated that it works with it...

Anyone got any ideas? Do I need to make those changes more than one time in modcp.php ?

Thanks in advance! :D
bmroyer
Registered User
Posts: 150
Joined: Fri Nov 26, 2004 2:13 am

Post by bmroyer »

I installed mine with easymod, and I get this error when I try to go in it

Code: Select all

You have not yet delete the file install_tables.php : do it before trying to see this page.
I've looked and there is no such file.

edit~ I get this error when I edit a post

Code: Select all

Could not insert data into logs table

DEBUG MODE

SQL Error : 1146 Table 'bmroyer_bmroyer.phpbb_logs' doesn't exist

INSERT INTO phpbb_logs (mode, topic_id, user_id, username, user_ip, time) VALUES ('edit', '3', '2', 'bvr', '445326db', '1114421393')

Line : 52
File : functions_log.php
jalabelle2
Registered User
Posts: 50
Joined: Fri Aug 06, 2004 11:01 pm

Post by jalabelle2 »

doot wrote: Since installing this mod, I get the following errors when editing any posts:

Code: Select all

Warning: Missing argument 14 for prepare_post() in /../forum/includes/functions_post.php on line 124

Warning: Missing argument 15 for prepare_post() in /../forum/includes/functions_post.php on line 124

Warning: Missing argument 21 for submit_post() in /../forum/includes/functions_post.php on line 220

Warning: Missing argument 22 for submit_post() in /../forum/includes/functions_post.php on line 220

Warning: Cannot modify header information - headers already sent by (output started at /../forum/includes/functions_post.php:124) in /../forum/includes/page_header.php on line 486

Warning: Cannot modify header information - headers already sent by (output started at /../forum/includes/functions_post.php:124) in /../forum/includes/page_header.php on line 488

Warning: Cannot modify header information - headers already sent by (output started at /../forum/includes/functions_post.php:124) in /../forum/includes/page_header.php on line 489
This appears above the "you have successfully edited this post" message. The page then redirects back to the topic and the post has been edited successfully. Those errors worry me though.

I am running the latest version 2.0.14.

Can anybody help?

Cheers
doot 8)


A lot of us are getting this error, and apparently there is no fix for it. I posted about it back on December 5th, and there's still no fix........
daoist
Registered User
Posts: 10
Joined: Thu Jul 18, 2002 4:00 pm
Contact:

Post by daoist »

nintendodude wrote: When I installed it I couldn't edit posts after that so I uninstalled. When I went to edit it basically brought up a blank phpbb page. I played with the code and whenever I took out the block of code you suppose to add in posting.php after the "edit post:" case it brought it back but didn't record all the logging.
This is the error I got:
Error in posting

DEBUG MODE

UPDATE phpbb_posts SET post_username = '', enable_bbcode = , enable_html = , enable_smilies = , enable_autotext = , enable_sig = WHERE post_id = 14970

Line : 322
File : /path/to/phpbb/includes/functions_post.php
I:IV:XV
daoist
Registered User
Posts: 10
Joined: Thu Jul 18, 2002 4:00 pm
Contact:

Post by daoist »

doot wrote: Since installing this mod, I get the following errors when editing any posts:

Code: Select all

Warning: Missing argument 14 for prepare_post() in /../forum/includes/functions_post.php on line 124

Warning: Missing argument 15 for prepare_post() in /../forum/includes/functions_post.php on line 124

Warning: Missing argument 21 for submit_post() in /../forum/includes/functions_post.php on line 220

Warning: Missing argument 22 for submit_post() in /../forum/includes/functions_post.php on line 220

Warning: Cannot modify header information - headers already sent by (output started at /../forum/includes/functions_post.php:124) in /../forum/includes/page_header.php on line 486

Warning: Cannot modify header information - headers already sent by (output started at /../forum/includes/functions_post.php:124) in /../forum/includes/page_header.php on line 488

Warning: Cannot modify header information - headers already sent by (output started at /../forum/includes/functions_post.php:124) in /../forum/includes/page_header.php on line 489
This appears above the "you have successfully edited this post" message. The page then redirects back to the topic and the post has been edited successfully. Those errors worry me though.

I am running the latest version 2.0.14.

Can anybody help?

Cheers
doot 8)
You have some other MOD installed which changed your prepare_post() and submit_post() functions. So the way to fix it is to modify the prepare_post() and submit_post() function calls that log_action tries to use to match whatever your board is using right now.

Unfortunately I can't just tell you the right thing to paste in because it depends on what exactly you've installed on your board.

Here is how to fix it:

1.make a backup of your posting.php. I am not kidding. Then open it up.
2.do a text search for prepare_post, and find one that was not added by log_actions. Copy the whole thing from the prepare_post( all the way to the ending ')'.
3.find the parts that log_action told you to add to your posting.php and find the prepare_post() function in there. Now just go through the prepare_post() function call there argument by argument until you find the part it's missing, and add it back in.
4.repeat this procedure (2-3) for your submit_post() problem too.
I:IV:XV
Shanti
Registered User
Posts: 131
Joined: Fri Apr 12, 2002 3:47 pm
Location: Wisconsin, USA
Contact:

Post by Shanti »

FYI, my web host is running MySQL 4.1.7 and when I tried to run the install_tables.php script the first query would fail because the primary key was set to auto_increment but you also gave it a default value.

According to this MySQL bug report when you set a column to auto_increment it can only accept a default value of "null", otherwise the query bombs. I was able to go into phpmyadmin and run the query without the default value and had no problems. :)
Shanti
It is better to light one candle...
http://www.RealmsofKaos.com
cindee
Registered User
Posts: 1
Joined: Tue May 10, 2005 1:44 am
Location: USA

Post by cindee »

daoist wrote: Unfortunately I can't just tell you the right thing to paste in because it depends on what exactly you've installed on your board.

Here is how to fix it:

1.make a backup of your posting.php. I am not kidding. Then open it up.
2.do a text search for prepare_post, and find one that was not added by log_actions. Copy the whole thing from the prepare_post( all the way to the ending ')'.
3.find the parts that log_action told you to add to your posting.php and find the prepare_post() function in there. Now just go through the prepare_post() function call there argument by argument until you find the part it's missing, and add it back in.
4.repeat this procedure (2-3) for your submit_post() problem too.

Thank you so much for that! Although your post wasn't addressed to me, I was able to fix a similar problem that I had with your help. The search tool is a wonderful thing. 8)
Post Reply

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