Here is actually some pretty easy solution on how to introduce these errors about the filling the Subject and the Message (may be at some later time I will also include them in miniBB package). This solution is for the latest miniBB 2.4 (and up).
Under your language pack, add the following variables:
$l_enterSubject='Please enter Subject!';
$l_enterMessage='Please enter Message!';
Modify
templates/main_post_form.html and before the code which says
<!--BBJSBUTTONS-->, paste the following JavaScript:
<script type="text/javascript">
<!--
var enterSubject='{$l_enterSubject}';
var enterMessage='{$l_enterMessage}';
//-->
</script>
Modify
templates/form.js, specifically,
function submitForm. To the vars definition, add
warn=l_accessDenied so it looks like:
var ftitle=false, ftext=false, flogin=false, fpass=false, user_usr='', user_pwd='', topicTitle='', postText='', fsubmit=true, warn=l_accessDenied;
Then modify the below code so it has new definitions and conditions:
if(fsubmit) {
pf.elements['subbut'].disabled=true; document.forms['postMsg'].submit();
}
else {
if(ftitle && topicTitle=='') warn=warn+'\n'+enterSubject;
if(ftext && postText=='') warn=warn+'\n'+enterMessage;
alert(warn);
return;
}
That would make the trick... In addition to "You are not allowed..." sentence, now you should see either Subject or Message warning, or both.
Hope this helps the newbies! :)