1
This is a first attempt at a hack that lets XOOPS admins control whether legacy "bare pages" (e.g. backend.php, userinfo.php) should be accessible or not. Since I'm not a programmer, it could be made useful if a real one steps in and reviews/corrects it.
If you have a
test server ready and can do a
clean install, download and test this hack from
http://www.zoologia.bio.br/barepages.zipIt will not work on an existing XOOPS site because I don't know how to add records to the (prefix)_config table
![](https://xoops.org/uploads/smil42e7a46795b71.gif)
.
It works like
$config_handler =& xoops_gethandler('config');
$xoopsConfigBare =& $config_handler->getConfigsByCat(XOOPS_CONF_BARE);
if ($xoopsConfigBare['bare_on'] != 1) {
redirect_header('index.php',3,_NOPERM);
exit();
}
And for userinfo.php, the "block anonymous access to userinfo.php" hack is in:
$config_handler =& xoops_gethandler('config');
$xoopsConfigBare =& $config_handler->getConfigsByCat(XOOPS_CONF_BARE);
if ($xoopsConfigBare['bare_userinfo'] != 1) {
redirect_header('index.php',3,_NOPERM);
exit();
}
if ($xoopsConfigBare['bare_userinfo_all'] != 1) {
if ( !$xoopsUser ) {
redirect_header('index.php',3,_NOPERM);
exit();}
}
Feel free to re-write, improve, ignore, laugh at, mock, correct, whatever