On 10 February 2012 17:32, Beebe, Mary J <[email protected]> wrote:
> I was trying to use this old extension: 
> http://www.mediawiki.org/wiki/Extension:UserLoginLog to log login attempts.  
> It used $wgMessageCache; therefore it worked fine until we went to a 1.18 
> wiki.  I tried to modernize it by creating a UserLoginLog.i18n file to keep 
> the messages.
>
>
>
> I have $wgExtensionMessagesFiles['userLoginLog'] = dirname( __FILE__ ) . 
> "/UserLoginLog.i18n.php";  at setup.

Looks good this far.

> A sample method is:
>
> function wfUserLoginLogSuccess(&$user) {
>
>        wfLoadExtensionMessages( 'userLoginLog' );
>
>        $log = new LogPage('userlogin',false);
>
>        $log->addEntry('success',$user->getUserPage(),wfGetIP());
>
>        return true;
>
>        }
>
>
>
> The statement 'wfLoadExtensionMessages( 'userLoginLog' );' does not seem to 
> do anything because the message in the log is  <userlogin-success>  instead 
> of the message.

wfLoadExtensionMessages hasn't done anything for a while. The needed
messages are loaded automatically, as long as the files are registered
with $wgExtensionMessagesFiles.

> I am not sure how to pass in the message log name or how to make it global 
> now that wgmessageCache is no longer available.  Is there a document on how 
> to use the logging feature in the wiki?

Maybe your i18n file is not properly formatted, or it is cached. Try
running 'php maintenance/rebuildLocalisationCache.php' fom the command
line.
  -Niklas


-- 
Niklas Laxström

_______________________________________________
Wikitech-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Reply via email to