3
showing 'Register now' is not a feature IMO.
It is a an small displaying bug.
It should not show the register link when the registration is off.
to solve this you should do this.
1- in XOOPS255/system/blocks/system_blocks.php function b_system_login_show()
add these:
function b_system_login_show()
{
global $xoopsUser, $xoopsConfig;
if (!$xoopsUser) {
$block = array();
$block['lang_username'] = _USERNAME;
$block['unamevalue'] = "";
$block['lang_password'] = _PASSWORD;
$block['lang_login'] = _LOGIN;
$block['lang_lostpass'] = _MB_SYSTEM_LPASS;
$block['lang_registernow'] = _MB_SYSTEM_RNOW;
//$block['lang_rememberme'] = _MB_SYSTEM_REMEMBERME;
if ($xoopsConfig['use_ssl'] == 1 && $xoopsConfig['sslloginlink'] != '') {
$block['sslloginlink'] = "javascript:openWithSelfMain('".$xoopsConfig['sslloginlink']."', 'ssllogin', 300, 200);">"._MB_SYSTEM_SECURE."";
} elseif ($xoopsConfig['usercookie']) {
$block['lang_rememberme'] = _MB_SYSTEM_REMEMBERME;
}
// START to add allow_register config
$config_handler =& xoops_gethandler('config');
$GLOBALS['xoopsConfigUser'] = $config_handler->getConfigsByCat(XOOPS_CONF_USER);
$block['allow_register'] = $GLOBALS['xoopsConfigUser']['allow_register'];
// END to add allow_register config
return $block;
}
return false;
}
then in the block template.
XOOPS255/modules/system/templates/blocks/system_block_login.html
add this:
<{if $block.allow_register}>
<a href="<{xoAppUrl register.php}>" title="<{$block.lang_registernow}>"><{$block.lang_registernow}>a>
<{/if}>