Page 9 of 12

Posted: Tue May 09, 2006 4:25 pm
by Greeger
Open the modcp.php file and go to line 39 and change

Code: Select all

include($phpbb_root_path . 'includes/functions_log.'.$phpEx);
to

Code: Select all

include($phpbb_root_path . 'includes/functions_logbook.'.$phpEx);
See if that clears up your problem. I doubt the mod will be incompatible with any certain template except that the problem you are having is in regards to style. The mod should work fine without that line but it might look a little strange. At least its on the admin that sees it though.

Posted: Wed May 10, 2006 1:46 am
by RedTrinity
That did the trick Greeger, thank you very much!! Much appreciated :)

Cheers!

Posted: Wed May 10, 2006 8:36 pm
by dan369
There seems to be boxes for marking actions, but no button to delete them one by one. Why is that?

Posted: Thu May 11, 2006 4:03 am
by Greeger
Greeger wrote: Next the delete button in the logbook page wasn't working for me. I found the problem looked like code may have been changed in the page header but not in the template. To fix this I looked in logbook.php and found:

Code: Select all

	//ADMIN: Can do the delete button etc. Done in page_header.php
And then I uncommented the lines below it.

This didn't work for me so I changed the code to the following, Unfortunately this only displays the delete button for the admin with user id 2.

Code: Select all

	//ADMIN: Can do the delete button etc. Done in page_header.php
	if ($userdata['user_id'] == 2)
	{
	  $template->assign_block_vars('switch_is_admin', array());
	}
you might be able to replace

Code: Select all

$userdata['user_id'] == 2
with

Code: Select all

($board_config['log_allow_all'] && $userdata['user_view_log']) || $userdata['user_id'] == 2

Posted: Thu May 11, 2006 5:12 am
by dan369
Doesn't work for me? Should it? Maybe I did it wrong.

Posted: Thu May 11, 2006 2:25 pm
by 00100100
Hi there, thanx for this great hack, u are going to save me headaches .

I installed it manually today, and the functionality is perfect. There is a funny error though:
I does not log all the forums, the old forum pages that have been greated few months ago are logged perfectly, but the forums that i created few weeks ago are not being loged for anything.
I have no clue where to start looking for the error, any ideas?

I do have other modifications installed on the forums, but i have no idea if it is conflecting with any of them, because i dont know where to look for the error.

thanx

Posted: Thu May 11, 2006 3:03 pm
by dan369
dan369 wrote: Doesn't work for me? Should it? Maybe I did it wrong.


Excuse me, it was I that misunderstood. Works great. And it's best that only admin can erase the logs.

Posted: Thu May 11, 2006 5:26 pm
by lumian
Well, i tried to install this today and everything seemed to go fine until I tried to run it =(

When i created the tables, I used this code:

Code: Select all

CREATE TABLE `phpbb_logbook` (
  `log_id` mediumint(10) NOT NULL auto_increment,
  `action` varchar(50) default NULL,
  `user_id` mediumint(8) default '0',
  `username` varchar(25) default NULL,
  `user_ip` varchar(8) default '0',
  `time` int(11) default '0',
  `old_forum_id` mediumint(9) default NULL,
  `old_topic_id` mediumint(9) default NULL,
  `old_topic_title` varchar(60) default NULL,
  `old_post_id` mediumint(9) default NULL,
  `old_post_time` int(11) default '0',
  `old_title` varchar(60) default NULL,
  `old_text` text,
  `new_forum_id` mediumint(9) default NULL,
  `new_topic_id` mediumint(9) default NULL,
  `new_topic_title` varchar(60) default NULL,
  `new_post_id` mediumint(9) default NULL,
  `new_title` varchar(60) default NULL,
  `new_text` text,
  PRIMARY KEY  (`log_id`)
) TYPE=MyISAM  ;	


ALTER TABLE `phpbb_users` ADD `user_view_log` TINYINT( 4 ) DEFAULT '0' NOT NULL; 
the same as in the file, and it worked!
heres a pic to prove it!! >>> http://www.macabreguild.com/images/logbookisthere.JPG
but when i try to access the logbook in my forums(logbook.php), I get this error: >> http://www.macabreguild.com/images/butitsnot.JPG

any ideas?
Thanks!

Posted: Fri May 12, 2006 12:29 am
by Greeger
make sure you put the line

Code: Select all

define('LOGBOOK_TABLE', $table_prefix.'logbook');
into constants.php

Posted: Fri May 12, 2006 2:42 am
by lumian
ahh good call, i musta missed that. Thanks!

--heh now im getting
Warning: mysql_free_result(): 25 is not a valid MySQL result resource in /hsphere/local/home/jajones/forums.macabreguild.com/db/mysql4.php on line 318


commenting out those lines seems to fix it

Posted: Sat May 13, 2006 1:16 pm
by 00100100
00100100 wrote: Hi there, thanx for this great hack, u are going to save me headaches .

I installed it manually today, and the functionality is perfect. There is a funny error though:
I does not log all the forums, the old forum pages that have been greated few months ago are logged perfectly, but the forums that i created few weeks ago are not being loged for anything.
I have no clue where to start looking for the error, any ideas?

I do have other modifications installed on the forums, but i have no idea if it is conflecting with any of them, because i dont know where to look for the error.

thanx


anyone ? :(

Posted: Thu Aug 24, 2006 11:38 am
by pt-sys
Hi,

I´ve instaled this mod i can see the changes of admin, but if any moderator, edit, delete or move a post i can´t see it in logbook.

Any ideas?

Thx

Posted: Wed Sep 27, 2006 10:29 pm
by hornybookworm
When I click on the logbook link in the admin page I get this error:


SQL Error : 1146 Table 'greengo_lfriends.LOGBOOK_TABLE' doesn't exist

SELECT l.log_id, action, ELT(FIELD(action, 'move','merge','split','delete','lock','unlock','move_post','edit_title','edit_post','delete_post','delete_poll'), '','','','','','','','','','','') as xlat_action, l.user_id, l.username, l.user_ip, l.time, l.old_forum_id, l.old_topic_id, l.old_topic_title, l.old_post_id, l.old_post_time, l.old_title, l.old_text, l.new_forum_id, l.new_topic_id, l.new_topic_title, l.new_post_id, l.new_title, l.new_text, f1.forum_name as old_forum_name, f2.forum_name as new_forum_name FROM LOGBOOK_TABLE l, phpbb_forums f1, phpbb_forums f2 WHERE l.old_forum_id = f1.forum_id AND l.new_forum_id = f2.forum_id AND l.old_forum_id IN (0,1,2,3,4,5,6,7,9,10,11,12,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28) AND l.new_forum_id IN (0,1,2,3,4,5,6,7,9,10,11,12,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28) ORDER BY time DESC, new_topic_title ASC LIMIT 0, 50

Line : 312
File : logbook.php


Any ideas

Posted: Mon Oct 16, 2006 1:21 am
by clawed
hornybookworm wrote: When I click on the logbook link in the admin page I get this error:


SQL Error : 1146 Table 'greengo_lfriends.LOGBOOK_TABLE' doesn't exist


You missed part if the installation in constants.php that changes LOGBOOK_TABLE to phpbb_logbook (or whatever your table prefix is)

Code: Select all

#

#-----[ OPEN ]-------------------------------------------------

#

includes/constants.php

#

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

#

?>

#

#-----[ BEFORE, ADD ]-------------------------------------------------

#	

//MOD Logbook

define('LOGBOOK_TABLE', $table_prefix.'logbook');

Posted: Mon Oct 16, 2006 1:28 am
by clawed
lumian wrote: ahh good call, i musta missed that. Thanks!

--heh now im getting
Warning: mysql_free_result(): 25 is not a valid MySQL result resource in /hsphere/local/home/jajones/forums.macabreguild.com/db/mysql4.php on line 318


commenting out those lines seems to fix it


I get that error after a reasonably default install, so you probably installed everything correctly and it is a error with the mod. It is not a major error (a warning actually) and is only there for cleanup purposes, so it can be safely ignored.