miniBB ® 

miniBB

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

$emptySubscribe option doesn't work

 
Author Vishal
Partaker
#1 | Posted: 25 Dec 2008 22:53 
I have turned on "$emptySubscribe" and I have tried both $emailusers=1 and 2 but when I try to subscribe without posting any text, I get message:

"Your message text is either empty or too short to be posted on this forum based on our content rules. Please edit your posting and try submitting again."

Author Paul
Lead Developer 
#2 | Posted: 26 Dec 2008 03:21 
It appears this feature is so rare that nobody have noticed the bug earlier :-)

We will fix it in the upcoming release; until now you could try this: modify bb_func_pthread.php file and locate the code:

$compareTL=strlen(trim(strip_tags($postText)));
$sce=FALSE; if(isset($simpleCodes)) foreach($simpleCodes as $e) { if(substr_count($postText, $e)>0) { $sce=TRUE; break; } }

if( ($compareTL==0 or ($compareTL>0 and $compareTL<$post_text_minlength)) and !$sce) {
$errorMSG=$l_emptyPost; $correctErr=$backErrorLink;
$title.=$l_forbidden; $loginError=1;
echo load_header(); echo ParseTpl(makeUp('main_warning')); return;
}

if ($postText=='') {
//Insert user into email notifies if allowed
if (isset($emptySubscribe) and $emptySubscribe and $user_id!=0 and isset($_POST['CheckSendMail']) and emailCheckBox()!='' and substr(emailCheckBox(),0,8)!='<!--U-->') {
$ae=db_simpleSelect(0,$Ts,'count(*)','user_id','=',$user_id,'','','topic_id','=',$topic); $ae=$ae[0];
if($ae==0) { $topic_id=$topic; insertArray(array('user_id','topic_id'),$Ts); }
}
return;
}

$poster_ip=$thisIp;
One of the block of this code should be moved below that way:

if ($postText=='') {
//Insert user into email notifies if allowed
if (isset($emptySubscribe) and $emptySubscribe and $user_id!=0 and isset($_POST['CheckSendMail']) and emailCheckBox()!='' and substr(emailCheckBox(),0,8)!='<!--U-->') {
$ae=db_simpleSelect(0,$Ts,'count(*)','user_id','=',$user_id,'','','topic_id','=',$topic); $ae=$ae[0];
if($ae==0) { $topic_id=$topic; insertArray(array('user_id','topic_id'),$Ts); }
}
return;
}

$compareTL=strlen(trim(strip_tags($postText)));
$sce=FALSE; if(isset($simpleCodes)) foreach($simpleCodes as $e) { if(substr_count($postText, $e)>0) { $sce=TRUE; break; } }

if( ($compareTL==0 or ($compareTL>0 and $compareTL<$post_text_minlength)) and !$sce) {
$errorMSG=$l_emptyPost; $correctErr=$backErrorLink;
$title.=$l_forbidden; $loginError=1;
echo load_header(); echo ParseTpl(makeUp('main_warning')); return;
}

$poster_ip=$thisIp;
Try to fix it and let me know if it works... thanks.

Author Vishal
Partaker
#3 | Posted: 28 Dec 2008 05:25 
Thanks Paul! It seems to work.

Bugs miniBB Support Forums / Bugs /
 $emptySubscribe option doesn't work
 Share Topic's Link

This topic is closed. New replies are not allowed.

 

 
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.


  ⇑