miniBB ® miniBB®
miniBB Support Forums
 | Forums | Register | Reply | Search | Statistics | Manual |
Custom Tutorials and Modifications miniBB Support Forums / Custom Tutorials and Modifications /   

Disable registrations and display a temporary page

Author Vishal
Registered
#1 | Posted: 2 Mar 2009 03:20 | Edited by: Vishal 
We can turn off registrations using $enableNewRegistrations, but this removes the registration link as such. Is there a way to disable registrations keeping the registration link intact. But on clicking the Register link, it should display a custom template containing some temporary notice or so.

Author Paul
Lead Developer
#2 | Posted: 2 Mar 2009 04:16 | Edited by: Paul 
Sorry I didn't understand that.

If registrations are disabled, that means what it means: users won't be able to register. What kind of "notice" do you mean - does it means you still want to allow users to register, but just accepting some disclaimer before? In that case, refer to our "Disclaimer" solution...

Author Vishal
Registered
#3 | Posted: 2 Mar 2009 09:24 | Edited by: Vishal 
OK I'll try to be more clear. When I disable registrations, the Registration link will be there, but when users click on the registration link, it should only display a custom page containing information that the registrations are disabled at the moment and reason if any or any temporary notice. That's all.

Author Paul
Lead Developer
#4 | Posted: 3 Mar 2009 04:48 
As always, it's possible to achieve adding an interuption to bb_plugins.php (preferrably at the top of that file, before Captcha etc.):

if($action=='register' or $action=='registernew'){
$enableNewRegistrations=FALSE;
echo load_header();
echo ParseTpl(makeUp('registration_disabled'));
$endtime=get_microtime();
$totaltime=sprintf ("%01.3f", ($endtime-$starttime));
if(isset($includeFooter) and $includeFooter!='') include($includeFooter); else echo ParseTpl(makeUp('main_footer'));
exit;
}

Then under templates/registration_disabled.html put any HTML and text regarding disabled registrations.

Author Vishal
Registered
#5 | Posted: 3 Mar 2009 04:56 
Thanks Paul! I'll try this out and let you know.

Regards,

Vishal

Custom Tutorials and Modifications miniBB Support Forums / Custom Tutorials and Modifications / Disable registrations and display a temporary page Top

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

 Short link for this topic:

 ?
Only registered users are allowed to post here. Please, enter your username/password details upon posting a message, or register first.


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 ® Features  Requirements  Demo  Download  Showcase  Gallery of Arts
Compiler  Premium Extensions  Premium Support  License  Contacts
Install the Captcha add-on: protect your miniBB-forums from the automated spam and flood.
Captcha Addon for miniBB