miniBB Support Forums | 15 years on The Web
miniBB ®


 | Forums | Register | Reply | Search | Statistics | Manual |
Bugs miniBB Support Forums / Bugs /   

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

Author Rock
#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
Lead Developer
#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
#3 | Posted: 17 Apr 2009 19:09 
Thanks, Paul!
Solution above works fine! :-)

Bugs miniBB Support Forums / Bugs /
 Pre-moderation add-on and 'First 10 words' solution bug
 Share Topic's Link

Your Reply Click this icon to move up to the quoted message

You are welcome to post anonymously, by entering a nickname with no password (if the similar Username has not been taken yet), or by leaving both fields empty. If you have a forums 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 Support Forums Powered by Forum Software miniBB ® Home  Features  Requirements  Demo  Download  Showcase  Gallery of Arts
Compiler  Premium Extensions  Premium Support  License  Contact Us
Get the Captcha add-on: protect your miniBB-forums from the automated spam and flood.