Skip to:
Content
Pages
Categories
Search
Top
Bottom

forum underconstruction page

  • Hi,

    I thought there already was a plugin for this, but I can’t find it.

    What I am looking for is a way so the admin can put the forum in undercontruction-mode. Visitors will see a default underconstruction-page until the admin removes it again (with a selection option in the admin?). Very handy when updating a forum.

    _Null

Viewing 9 replies - 1 through 9 (of 9 total)

  • chrishajer
    Participant

    @chrishajer

    There is a plugin for WordPress but I haven’t seen one for bbPress.

    Thanks, gonna take a look at it. Perhaps it’s easy to convert :)


    chrishajer
    Participant

    @chrishajer

    I hope so. I typically use .htaccess to change the DirectoryIndex if I’m working on the forum, but that doesn’t prevent anyone from accessing the site from search engines or bookmarks with direct URLs. It just prevents access from the home page. It would be better to have a maintenance mode.

    I was thinking of a check in the header, since this is always loaded. If maintenance is true -> load maintenance page, else load forum. Very simple to do (if there is an hook in the header.php) . I’ll try to cook something up :)

    _Null

    Use a php call in the header that checks for a value (for construction) and if it does, serve up a static .html page would be the easiest. If you could create a plugin that just has a “checkbox” in the admin area and then a call to find out that option in the header.php that should work in theory right?

    Trent

    Yeah just my thoughts too, but playing with this, I think the header is not to right way to go because it only excists as a template file and there are no hooks for it. So if you would use this this way, you should modify every header.php in every template you have.

    Not a fun job to do if you have many and I believe a plugin should work with most templates and with many or non modification to any file. So I am looking at another file at the moment to see if it would work with that file too.

    _Null


    chrishajer
    Participant

    @chrishajer

    Doesn’t every template/theme header call bb_head();? So then you could write a plugin that calls something like add_action('bb_head', 'blah_maintenance_mode'); right? I think the header supplied should be a 503 header('HTTP/1.0 503 Service Unavailable');

    One of these days I’ll learn how to write a plugin :D

    Thx chris I’ll try that


    livibetter
    Member

    @livibetter

    Just a note, if you want to send a http response code, you need to use bb_init action (check init action for WP). If you use bb_head, you will get error since there is something has been sent to client side before your own header. And your own response code won’t be effective.

    I suggest you send header, bb_load_template and then exit in the action hook.

Viewing 9 replies - 1 through 9 (of 9 total)

You must be logged in to reply to this topic.