I want to add the Login link to the sidebar and used the **Special:UserLogin 
previousely and had some Java Script to return to the current page.

In MediaWiki 1.27 this stopped working and I have been searching for a solution 
to get this working again. I found this -

==========

$wgHooks['SkinBuildSidebar'][] = 'lfHideSidebar';
function lfHideSidebar( $skin, &$bar ) {
  global $wgUser;
  // Hide sidebar for anonymous users
  if ( !$wgUser->isLoggedIn() ) {
    $bar = array(
      'navigation' => array(
        array(
          'text'   => wfMessage( 'login' ) -> text(),
          'href'   => SpecialPage::getTitleFor( 'Login' )->getLocalURL(),
          'id'     => 'n-login',
          'active' => ''
        )
      )
    );
  }
  return true;
}

=========


Does anyone know how to use addReturnTo() with the getLocalURL(), or someother 
way to return to the current page after login?




_______________________________________________
MediaWiki-l mailing list
To unsubscribe, go to:
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l

Reply via email to