Hi Fearghal,
Based on techairlines instructions, I’m providing you with a working example.
For this test, create a new directory in the root of your forums and call it whatever you want (I called mine “mytest”). You forums root directory is the one that has these directories: admin, archive, cache, images and others.
Place a copy of your standard web page in this new directory.
Add the following php code to the beginning of your page:
PHP Code:
<?php
define('IN_MYBB', 1);
require_once "../global.php";
$allowedgroups = array ( '4', '8' );
if (!in_array ( $mybb->user['usergroup'], $allowedgroups ))
{
die ( 'You can\'t access this page!' );
}
?>
Rename the page so that the extension is ".php" (not html)
This is the full example of what I tested and it works fine.
PHP Code:
<?php
define('IN_MYBB', 1);
require_once "../global.php";
$allowedgroups = array ( '4', '8' );
if (!in_array ( $mybb->user['usergroup'], $allowedgroups ))
{
die ( 'You can\'t access this page!' );
}
?>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=windows-1250">
<title></title>
</head>
<body>
<h1>
My site has a really nice layout
and design and I want to keep it like that
</h1>
</body>
</html>
Finally, just let me add that this method is not very secure and quite vulnerable, so please be careful what you post.