MyBB Community Forums

Full Version: Custom Pages for members only?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
How can I add one custom page that only members will be able to access it?
I want to put a shoutbox there or an IRC.
http://community.mybboard.net/thread-6615.html

Then put in something like this:

if($mybb->user['uid'] == 0)
{
error_no_permission();
}
So I put the code into the PHP code yes?
Like this:
<?php

define('IN_MYBB', 1); // (1a)
require "./global.php"; // (1b)

add_breadcrumb("Rules page", "rules.php"); // (2)

eval("\$rules = \"".$templates->get("rules")."\";"); // (3)
output_page($rules); // (4)

if($mybb->user['uid'] == 0)
{
error_no_permission();
} 
?>

Also is possible to add a custom message to the guest that acess the page?
I tried the code I posted before and it didn't worked.
You'd need the code I gave before the eval... line.
Thanks.
It worked.