viernes, abril 26, 2013

Habilitar acceso MEDIAWIKI solo con LOGIN

Edite el archivo de LocalSettings.php,  copia en la seccion correspondiente lo siguiente:

# The following permissions were set based on your choice in the installer
$wgGroupPermissions['*']['edit'] = false;
$wgGroupPermissions['*']['read'] = false;
$wgGroupPermissions['*']['createpage']      = false;
$wgGroupPermissions['*']['createtalk']      = false;
$wgGroupPermissions['*']['createaccount']   = false;
$wgShowIPinHeader = false; # For non-logged in users

Agregue al final lo siguiente:

$wgAutoLogin = true;
#SetupAuthMyExtension();
$wgDisableCookieCheck = true;

# End of automatically generated settings.
# Add more configuration options below.
function NoLoginLinkOnMainPage( &$personal_urls ){
    unset( $personal_urls['login'] );
    unset( $personal_urls['anonlogin'] );
    return true;
}
$wgHooks['PersonalUrls'][]='NoLoginLinkOnMainPage';

No hay comentarios: