miniBB ® 

miniBB

®
Support Forums
  
 | Start | Register | Search | Statistics | File Bank | Manual |
Bugs miniBB Support Forums / Bugs /  
 

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

 
Author Rock
Partaker
#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 
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
Partaker
#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


  ?
Post as a Guest, leaving the Password field blank. You could also enter a Guest name, if it's not taken by a member yet. Sign-in and post at once, or just sign-in, bypassing the message's text.


Before posting, make sure your message is compliant with forum rules; otherwise it could be locked or removed 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
Check out the Captcha add-on: protect your miniBB-forums from the automated spam and flood.


  ⇑