Page 8 of 12

Posted: Mon Mar 06, 2006 5:57 pm
by moepstar
Hi Merlin,

i just wanted to leave a quick feedback on your mod and really have to say you did a great job with it :D

However, the only problem (besides that mysql free() error i already commented out) i get is when i click on the "ip" link from the user whose action got logged..

The link goes to http://myforumurl/forum/modcp.php?mode= ... 23.ip.here

which in turn results in a page with the message
Information

The forum you selected does not exist.


As this is a almost vanilla 2.0.19 im not too sure why this error is generated... the person that action got logged was me, the first sites admin...

there are 3 admins including me and no mods, if that matters.....

its not like im going to need that function (it displays the ip anyway in the link) but i just wanted to let you know and maybe fix it ;)

regards & keep up the good work

Posted: Mon Mar 06, 2006 6:18 pm
by Merlin Sythove
Yep, I've extended the modcp page to allow searching for an ip address and listing all users who have posted from that address. This is also for the profile /registration IP which I record. However, this really is far too much of an extension to this mod, so I suggest the following:

in logbook_body.tpl, change this

Code: Select all

<td class="{record_row.ROW_CLASS}" align="center"><span class="name" style="white-space:nowrap;"><a href="{record_row.U_VIEW_IP}" title="{record_row.USER_IP}">{L_VIEW_IP}</a></span></td>
to

Code: Select all

<td class="{record_row.ROW_CLASS}" align="center"><span class="name" style="white-space:nowrap;">{record_row.USER_IP}</span></td>
so the IP is shown and you can copy it and do whatever you like with it.

OR, if you want to click something, DO NOT DO THE ABOVE, but instead change this in logbook.php:

Code: Select all

'U_VIEW_IP' => append_sid("modcp.$phpEx?mode=ip&" . POST_USERS_URL . "=".$rowset[$i]['user_id']."&ip=" . $user_ip),
to

Code: Select all

//'U_VIEW_IP' => append_sid("modcp.$phpEx?mode=ip&" . POST_USERS_URL . "=".$rowset[$i]['user_id']."&ip=" . $user_ip),
'U_VIEW_IP'  => 'http://network-tools.com/default.asp?prog=express&Netnic=whois.arin.net&host=' . $user_ip, 

Posted: Tue Mar 07, 2006 8:21 am
by DennyCrane
is there a way to get this mod to work along with the posticons mod? i dont care if it logs posticon changes or not, but im not sure how to make them coexist..


in posting.php:
#
#-----[ FIND ]-------------------------------------------------
#

$select_sql = (!$submit) ? ', t.topic_title, p.enable_bbcode, p.enable_html, p.enable_smilies, p.enable_sig, p.post_username, pt.post_subject, pt.post_text, pt.bbcode_uid, u.username, u.user_id, u.user_sig, u.user_sig_bbcode_uid' : '';
$from_sql = ( !$submit ) ? ", " . POSTS_TEXT_TABLE . " pt, " . USERS_TABLE . " u" : '';
$where_sql = ( !$submit ) ? "AND pt.post_id = p.post_id AND u.user_id = p.poster_id" : '';

$sql = "SELECT f.*, t.topic_id, t.topic_status, t.topic_type, t.topic_first_post_id, t.topic_last_post_id, t.topic_vote, p.post_id, p.poster_id" . $select_sql . "
FROM " . POSTS_TABLE . " p, " . TOPICS_TABLE . " t, " . FORUMS_TABLE . " f" . $from_sql . "
WHERE p.post_id = $post_id
AND t.topic_id = p.topic_id
AND f.forum_id = p.forum_id


#
#-----[ REPLACE WITH ]-------------------------------------------------
#

//START MOD Logbook
//$select_sql = (!$submit) ? ', t.topic_title, p.enable_bbcode, p.enable_html, p.enable_smilies, p.enable_sig, p.post_username, pt.post_subject, pt.post_text, pt.bbcode_uid, u.username, u.user_id, u.user_sig, u.user_sig_bbcode_uid' : '';
//$from_sql = ( !$submit ) ? ", " . POSTS_TEXT_TABLE . " pt, " . USERS_TABLE . " u" : '';
//$where_sql = ( !$submit ) ? "AND pt.post_id = p.post_id AND u.user_id = p.poster_id" : '';
//
//$sql = "SELECT f.*, t.topic_id, t.topic_status, t.topic_type, t.topic_first_post_id, t.topic_last_post_id, t.topic_vote, p.post_id, p.poster_id" . $select_sql . "
// FROM " . POSTS_TABLE . " p, " . TOPICS_TABLE . " t, " . FORUMS_TABLE . " f" . $from_sql . "
// WHERE p.post_id = $post_id
// AND t.topic_id = p.topic_id
// AND f.forum_id = p.forum_id
// $where_sql";


if ($submit)
{
$sql = "SELECT f.*, t.topic_id, t.topic_status, t.topic_type, t.topic_title, t.topic_icon, t.topic_first_post_id,
t.topic_last_post_id, t.topic_vote, p.post_id, p.post_time, p.poster_id,
pt.post_subject, p.post_icon, pt.post_text, pt.bbcode_uid
FROM " . POSTS_TABLE . " p, " . TOPICS_TABLE . " t, " . FORUMS_TABLE . " f , " . POSTS_TEXT_TABLE . " pt
WHERE p.post_id = $post_id
AND t.topic_id = p.topic_id
AND f.forum_id = p.forum_id
AND pt.post_id = p.post_id ";
}
else
{
$sql = "SELECT f.*, t.topic_id, t.topic_status, t.topic_type, t.topic_first_post_id, t.topic_last_post_id,
t.topic_vote, t.topic_title, t.topic_icon, p.post_id, p.post_time, p.poster_id , p.enable_bbcode,
p.enable_html, p.enable_smilies, p.enable_sig, p.post_username, pt.post_subject, p.post_icon, pt.post_text,
pt.bbcode_uid, u.username, u.user_id, u.user_sig
FROM " . POSTS_TABLE . " p, " . TOPICS_TABLE . " t, " . FORUMS_TABLE . " f, " . POSTS_TEXT_TABLE . " pt, " . USERS_TABLE . " u
WHERE p.post_id = $post_id
AND t.topic_id = p.topic_id
AND f.forum_id = p.forum_id
AND pt.post_id = p.post_id AND u.user_id = p.poster_id";
}


but with posticons, the first line in the FIND is:
$select_sql = (!$submit) ? ', t.topic_title, t.topic_icon, p.enable_bbcode, p.enable_html, p.enable_smilies, p.enable_sig, p.post_username, pt.post_subject, p.post_icon, pt.post_text, pt.bbcode_uid, u.username, u.user_id, u.user_sig, u.user_sig_bbcode_uid' : '';


obviously commenting that out is probably not going to be good for the posticons mod; i tried putting the "missing peices" into the logbook code, but that didn't quite work out.

Posted: Tue Mar 07, 2006 8:34 am
by Merlin Sythove
Just stick the two bold variables in BOTH SQL statements and you should be fine.

Posted: Tue Mar 07, 2006 1:52 pm
by DennyCrane
well i dont know if this has anything to do with trying that or not, but it gives me a ton of warnings-
10 Warning(s) reported by the SQL Parser
Non-portable syntax option(s) "TYPE=MyISAM", ignored, statement: 1, table: "phpbb_logbook"
Inconsistent display width specified "MEDIUMINT(10)" in column "log_id", statement: 1, table: "phpbb_logbook"
Identifier "action" is a reserved keyword (reference: SQL 99), statement: 1, table: "phpbb_logbook"
Identifier "time" is a reserved keyword (reference: SQL 99), statement: 1, table: "phpbb_logbook"
Inconsistent display width specified "MEDIUMINT(9)" in column "old_forum_id", statement: 1, table: "phpbb_logbook"
Inconsistent display width specified "MEDIUMINT(9)" in column "old_topic_id", statement: 1, table: "phpbb_logbook"
Inconsistent display width specified "MEDIUMINT(9)" in column "old_post_id", statement: 1, table: "phpbb_logbook"
Inconsistent display width specified "MEDIUMINT(9)" in column "new_forum_id", statement: 1, table: "phpbb_logbook"
Inconsistent display width specified "MEDIUMINT(9)" in column "new_topic_id", statement: 1, table: "phpbb_logbook"
Inconsistent display width specified "MEDIUMINT(9)" in column "new_post_id", statement: 1, table: "phpbb_logbook"


easymod still gives the option to continue, but im skeered :oops:

Posted: Mon Mar 20, 2006 4:43 pm
by Cyn4uk
cool mod! respect!

Posted: Mon Apr 03, 2006 9:07 am
by windstarfire
hey i have Simply Merge Threads, and according to your instructions if i was using a merge mod i had to edit some more lines, though mine didnt have the ones you requested, so i don't know where to edit...

simply merge is at herehttp://www.phpbb.com/phpBB/viewtopic.ph ... mply+merge

well yeah, ive installed it and it works fine

if you need a temporary admin acc or ftp access please pm me...
i also had the mysql4.php error on line 318 but i fixed it by adding // on all of the $db->sql_freeresult($result); things so its all good, though im still lost about the merge thingy..

please help

thanx in advance


btw, when i click the ip thingy under username it says

Code: Select all

The forum you selected does not exist.
im list about that as well

so the merge things and the ip click error thingy

its a awesome mod! i didnt even install the action log one xD

Posted: Wed Apr 12, 2006 7:48 am
by disto
Hello !

This mod is really nice, however I got a problem with post edit... when someone try to edit a post, some wierd caracters appears near bbcode tags.
For example :
[quote:66c0fbfee5][b:66c0fbfee5]test[/b:66c0fbfee5][/quote:66c0fbfee5]

[color=red:66c0fbfee5]test ![/color:66c0fbfee5]


When the user confirm post edit, these caracters remains, and the tags are ineffective.

Can someone solve this problem ?

(sorry for my terrible english, i'm french and my board is french too)

Posted: Fri Apr 21, 2006 6:43 pm
by ckwalsh
Hey, I haven't looked at the code for this yet, but from reading the features it looks pretty cool :D

I was just wondering though. How easy would it be to add my own logging event? My web site is integrated with PHPbb, and am wanting to be able to log some actions on the rest of the site.

Posted: Mon May 01, 2006 7:48 pm
by FallFromGrace
I've been watching this mod for quite some time, and I'm curious as to when it will become a release candidate?

I'd like to implement this in my forum, but my co-admin and I prefer released mods as neither of us is proficient in code.

thanks.

Log Posts

Posted: Tue May 02, 2006 10:20 pm
by jmdziba
Is this mod able to keep a record of posts made by moderators. I have a team of moderators whom I intend to eventually compensate on a performance based scale. I would like to have a mod that keeps track of how many, and which posts were made in a given time period. This will save me the time of having to go an pull up each moderator's profile, and count the number of posts made in some time frame.
http://www.hivaidszimbabwe.com/page3.html

Posted: Fri May 05, 2006 8:13 pm
by Greeger
There were a couple things I noticed while installing the mod. I thought I would share them.

Code: Select all

#
#-----[ OPEN ]-------------------------------------------------
#
includes/page_header.php

#
#-----[ FIND ]-------------------------------------------------
#
'U_PROFILE' => append_sid($phpbb_root_path . 'profile.'.$phpEx.'?mode=editprofile'),
There is no 'U_PROFILE' => append_sid($phpbb_root_path . 'profile.'.$phpEx.'?mode=editprofile'),

There is a 'U_PROFILE' => append_sid('profile.'.$phpEx.'?mode=editprofile'), which is where I put the code and i haven't noticed any problems.

So the code should be

Code: Select all

# 
#-----[ OPEN ]------------------------------------------------- 
# 
includes/page_header.php 

# 
#-----[ FIND ]------------------------------------------------- 
# 
	'U_PROFILE' => append_sid('profile.'.$phpEx.'?mode=editprofile'),

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
To Merlin Sythove, Thanks for making this mod. It makes me feel a whole lot better about giving my users the ability to edit their posts because I can easily find out if they are abusing the power. I hope you do take the time to package this for the moddb.

I do have a question though. In the logbook table I see records for when I have unstickied a post or for when I enabled bbcode on a post but even though they have been logged they don't show up on the logbook.php screen. Is this behavior something you wanted, because it certainly seems wasteful to log it but not have a way to display it.

Thanks again.

Posted: Sun May 07, 2006 6:00 am
by RedTrinity
Hello all,

Just a small hiccup or two regarding the "Logbook" modification I just installed manually. It appears to be working fine, except for a couple of small problems...

Firstly, this line is printed across the top of the forum when I use a particular template (not SubSilver thankfully):
th { color: #FCB317; font-size: 11px; font-weight : bold; background-color: #006699; height: 25px; background-image: url(templates/subSilver/images/cellpic3.gif); }



Secondly, I only have these links in the menu up the top of the forum:

Logbook, FAQ, Search, Memberlist, Usergroups, Log out.


What happened to private messages and profile?? :?

Could I please have some direction as to how to fix these problems. It would be much appreciated.

Cheers,

Nikki.

Posted: Sun May 07, 2006 8:32 pm
by Greeger
Make sure that style stuff is inside the <style> tags at the top of the tpl file.

As for the other part. Make sure the <!-- BEGIN switch_view_log --> and the <!-- END switch_view_log --> are on their own lines in the file.

If that doesn't work post the contents of the file so I can see it.

Posted: Mon May 08, 2006 12:13 am
by RedTrinity
Thank you for your suggestions, your help worked for the issue with the Begin/End tags worked!

Still having a few probs though, one biggy I didnt mention before as I didnt realise it was there is this one when you attempt to moderate a forum...

This is coming up above the forum:
Warning: main(./includes/functions_log.php): failed to open stream: No such file or directory in /home/theparen/public_html/forum/modcp.php on line 39

Warning: main(./includes/functions_log.php): failed to open stream: No such file or directory in /home/theparen/public_html/forum/modcp.php on line 39

Warning: main(): Failed opening './includes/functions_log.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/theparen/public_html/forum/modcp.php on line 39

Warning: Cannot modify header information - headers already sent by (output started at /home/theparen/public_html/forum/modcp.php:39) in /home/theparen/public_html/forum/includes/page_header.php on line 515

Warning: Cannot modify header information - headers already sent by (output started at /home/theparen/public_html/forum/modcp.php:39) in /home/theparen/public_html/forum/includes/page_header.php on line 517

Warning: Cannot modify header information - headers already sent by (output started at /home/theparen/public_html/forum/modcp.php:39) in /home/theparen/public_html/forum/includes/page_header.php on line 518


I'd consider just restalling it over again however its going to be a messy job so if it can be fixed in any other way I would appreciate it.

The styles thing didnt work unfortunetly... though I think its probably due to maybe the mod not being compatible with the template I am trying to install it with (Acid) as the line I am supposed to locate in the instructions in overall_header.tpl is nowhere to be found.

Sorry if this is all confusing, I'm still only learning how to do all of this myself! Have successfully installed a few mods manually sofar but still have hiccups every now and then, this being the biggest one sofar.

Cheers,

Nikki.