Here's the version without IPmasks:
Open global.php and look for this line:
PHP Code:
require_once('./includes/init.php');
Below that line, add the following:
PHP Code:
function authenticate() {
header("WWW-Authenticate: Basic realm=Please login with your user/pass");
header("HTTP/1.0 401 Unauthorized");
echo "Authentication failed...";
exit;
}
if (!isset($_SERVER['PHP_AUTH_USER'])) {
authenticate();
} else {
if ($userauth=$DB_site->query_first("SELECT password,salt FROM user WHERE username='$_SERVER[PHP_AUTH_USER]'")) {
if (!(md5(md5($_SERVER['PHP_AUTH_PW']) . $userauth['salt']) == $userauth['password'])) {
authenticate();
}
} else {
authenticate();
}
}
This will put a HTaccess popup box on all your regular forum pages. As for the admincp/modcp, it might be easier to just change the location of those to something else (can be edited in the /includes/config.php).
Make sure you don't have any extra .htaccess files with an additional htaccess/htpasswd, else it's gonna get messy