Prev |  | Next

### 3.6.3. common_no_forum

This hook is called in case a forum_id is requested for an unknown or inaccessible forum. It can be used for doing things like logging the bad requests or fully overriding Phorum's default behavior for these cases (which is redirecting the user back to the index page).

Call time:

In `common.php`, right after detecting that a requested forum does not exist or is inaccessible and right before redirecting the user back to the Phorum index page.

Hook input:

No input.

Hook output:

No output.

Example code:

    function phorum_mod_foo_common_no_forum()
    {
        // Return a 404 Not found error instead of redirecting
        // the user back to the index.
        header("HTTP/1.0 404 Not Found");
        print "<html><head>\n";
        print "  <title>404 - Not Found</title>\n";
        print "</head><body>";
        print "  <h1>404 - Forum Not Found</h1>";
        print "</body></html>";
        exit();
    }

Prev | Up | Next
| Home |