Fight the automated spam - protect your miniBB-forums,
getting the Captcha addon! Click here to read more.
Captcha Addon for miniBB
miniBB ®
 
miniBB Community Forum
 | Forums | File Bank | Sign Up | Reply | Search | Statistics | Manual |
Bugs miniBB Community Forum / Bugs /
Short link for this topic:

Pre-moderation add-on and 'First 10 words' solution bug

 
Author Rock
Forums Member
#1 | Posted: 16 Apr 2009 04:50
There is a trouble in this addon and pre-moderation addon.

In brief First 10 words of the mentioned solution shown even if post is queued. Could anyone help me with this issue?
Author Paul
CEO
#2 | Posted: 17 Apr 2009 03:01 | Edited by: Paul
Yes, there is a bug which obviously wasn't discovered before 'cause it's rare in use :-)

There are needed to update both Pre-moderation add-on's code and miniBB's core code. It all will be fixed in the next release(s). Until now, there are steps to modify:

miniBB Files

- bb_func_ldisc.php, find this request:

if($row=db_simpleSelect(0, $Tp, 'poster_id, poster_name, post_time, topic_id, post_text', '', '', '', 'post_id '.$ordSql))

add 'post_id' to it:

if($row=db_simpleSelect(0, $Tp, 'poster_id, poster_name, post_time, topic_id, post_text, post_id', '', '', '', 'post_id '.$ordSql))

below find this line:

if(!isset($pVals[$row[3]])) $pVals[$row[3]]=array($row[0],$row[1],$row[2],$row[4]); else continue;

add '$row[5]' to it:

if(!isset($pVals[$row[3]])) $pVals[$row[3]]=array($row[0],$row[1],$row[2],$row[4], $row[5]); else continue;

Then find this line:

else $lastPostText=$lptxt;

BEFORE of it paste this:

elseif($preModerationType>0 and isset($premodPosts) and in_array($pVals[$topic][4], $premodPosts)) $lastPostText='';

The same actions needed for the similar code of bb_func_vtopic.php.

Pre-moderation add-on: addition to bb_plugins.php code is required.

Look up for require_once($premodDir.'premoder_posts.php');

This condition needs to be expanded to:

if((isset($textLd) and $textLd>0 and ($action=='' or $action=='vtopic') ) or $action=='vthread' or $action=='search') require_once($premodDir.'premoder_posts.php');

Let us know how it works.
Author Rock
Forums Member
#3 | Posted: 17 Apr 2009 19:09
Thanks, Paul!
Solution above works fine! :-)
 
Bugs miniBB Community Forum / Bugs / Pre-moderation add-on and 'First 10 words' solution bug Top
Your Reply Click this icon to move up to the quoted message

» Username  » Password 
You are welcome to post anonymously by entering a nickname with no password (if that nickname has not been taken by another member) or by leaving both fields empty. If you have a forums membership account, you can also sign in from this page without posting a message, or sign in and post at once.


Before posting, make sure your message is compliant with our forum posting rules. If not, it may be locked or deleted with no explanation.

 
miniBB Community Forum Powered by Free Forum Software miniBB ® Features  Requirements  Demo  Download  Showcase  Gallery of Arts
Compiler  Premium Extensions  Premium Support  License  Contacts