Customized Board Disabled Page

Need some custom code changes to the phpBB core simple enough that you feel doesn't require an extension? Then post your request here so that community members can provide some assistance.

NOTE: NO OFFICIAL SUPPORT IS PROVIDED IN THIS SUB-FORUM
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

NOTE: NO OFFICIAL SUPPORT IS PROVIDED IN THIS SUB-FORUM
Post Reply
RamsesV
Registered User
Posts: 8
Joined: Wed Apr 04, 2018 6:26 pm

Customized Board Disabled Page

Post by RamsesV »

Hi all,

I have a "portal site", which is set as default page to connect to. It is located in the / directory and called portal.php and has a template in my style folder. This works great as by now and I am happy with this simple portal page. What I now would like to do, is to still display this page, when the board is disabled and give information to the user, why the board is currently not reachable.

I am looking for the code, which is only displaying the board disable message and a way to cahnge it, so my portal.php is displayed instead of the disabled message. As I don't use the index.php as start page, I assume it should be easy to say that the board disable feature works with index.php, but not with the portal.php. Am I right?

Thanks in advance
RamsesV
User avatar
mrgoldy
Development Team Member
Development Team Member
Posts: 1394
Joined: Tue Oct 06, 2009 7:34 pm
Location: The Netherlands
Name: Gijs
Contact:

Re: Customized Board Disabled Page

Post by mrgoldy »

What you can do, is the following:

In your portal.php add the following definition near the top:
define('SKIP_CHECK_DISABLED', true);

And then replace the triggered error in phpbb\user with a redirect() to your portal.php.
https://github.com/phpbb/phpbb/blob/mas ... #L378-L384
redirect(append_sid("{$phpbb_root_path}portal.{$phpEx}"));
phpBB Studio / Member of the Studio

Contributing: You can do it too! Including testing Pull Requests (PR).
phpBB Development and Testing made easy.
RamsesV
Registered User
Posts: 8
Joined: Wed Apr 04, 2018 6:26 pm

Re: Customized Board Disabled Page

Post by RamsesV »

Hi mrgoldy,

that is working just great, thanks a lot!
Post Reply

Return to “phpBB Custom Coding”