miniBB ® miniBB®
miniBB Support Forums
 | Forums | Register | Search | Statistics | Manual |
Specific miniBB Support Forums / Specific /   

Disable quick-answer-field for guests

Author Shen
Registered
#1 | Posted: 16 Jan 2009 05:32 
Hi everybody,
I have synchonized my database with miniBB - works great.

Now I want to hide the quick-answer fields and login-buttons for guests.

In bb_func_vthread.php it works great. I changed:

if ($c1 or $c4){
$mainPostForm='';$mainPostArea='';
$nTop=0;
$displayQuote='false';
}
else {
$mainPostForm=ParseTpl(makeUp('main_post_form'));
$mainPostArea=makeUp('main_post_area');
$nTop=1;
}
}
else {
$mainPostArea=makeUp('main_post_closed');
$displayQuote='false';
}
$mainPostArea=ParseTpl($mainPostArea);

to:

//EDIT ANFANG
if ($user_id==0){
$mainPostArea='';
}
//EDIT ENDE
elseif ($c1 or $c4){
$mainPostForm='';$mainPostArea='';
$nTop=0;
$displayQuote='false';
}
else {
$mainPostForm=ParseTpl(makeUp('main_post_form'));
$mainPostArea=makeUp('main_post_area');
$nTop=1;
}
}
else {
$mainPostArea=makeUp('main_post_closed');
$displayQuote='false';
}
$mainPostArea=ParseTpl($mainPostArea);


I tried to find this possibility in bb_func_vtopic.php.
I changed the following code, but there is still the subject header left if I do it like this.
//Original:
$mainPostForm=ParseTpl(makeUp('main_post_form'));

changed to:

if($user_id==0){
$mainPostForm='';
}
else $mainPostForm=ParseTpl(makeUp('main_post_form'));


Do somebody know a solution?

Thank you very much!

Author Paul
Lead Developer
#2 | Posted: 16 Jan 2009 06:54 | Edited by: Paul 
Here is how to hide posting form from guests.

Your solution is a bit wrong, because it supposes modifying the core file. If you will upgrade the core scripts, you will need to roll-back all your changes, which is very uncomfortable and requires additional time and skills.

All you request could be done at the add-ons level only. Just recently I have developed the similar solution for SlashGear forums.

Author Shen
Registered
#3 | Posted: 17 Jan 2009 03:46 
Hi,
thank you very much for this hint.
I followed the instructions and it works now! :)

Specific miniBB Support Forums / Specific / Disable quick-answer-field for guests Top
This topic is closed. New replies are not allowed.
 
miniBB Support Forums Powered by Forum Software miniBB ® Features  Requirements  Demo  Download  Showcase  Gallery of Arts
Compiler  Premium Extensions  Premium Support  License  Contacts
Check out the Captcha add-on: protect your miniBB-forums from the automated spam and flood.
Captcha Addon for miniBB