Extension talk:LanguageSelector/LQT Archive 1

LANGUAGE_SELECTOR_AS_PORTLET
Hello,

I have install this very interresting extension on my Wiki. And I wanted to use the value "LANGUAGE_SELECTOR_AS_PORTLET" for "$wgLanguageSelectorLocation" but it doesn't run. I use a Skin based on Monbook. Only values LANGUAGE_SELECTOR_AT_TOP_OF_TEXT and LANGUAGE_SELECTOR_IN_TOOLBOX can run on my Wiki. I don't know if I have to change some values on LanguageSelector.php?

(I'm sorry for my english, but I'm a french student!) Sébastien 14:22, 6 April 2007 (UTC)


 * The other options only work with MediaWiki 1.10 and newer. You can add support for this by hacking the SkinTemplate.php file: near the end of the outputPage function, before // execute template, add this:

// original version by hansm if( !wfRunHooks( 'SkinTemplateOutputPageBeforeExec', array( &$this, &$tpl ) ) ) { wfDebug( __METHOD__ . ': Hook SkinTemplateOutputPageBeforeExec broke outputPage execution!' ); }
 * well, just this would probably do:

wfRunHooks( 'SkinTemplateOutputPageBeforeExec', array( $this, $tpl );
 * No guarantee, though. Perhaps just wait a few days for MW 1.10 to come out officially. -- Duesentrieb ⇌ 21:04, 6 April 2007 (UTC)


 * Thank you for your quick help, now I can use this attribute on my Wiki v1.8.3. Sébastien 07:07, 10 April 2007 (UTC)

Bug with LANGUAGE_SELECTOR_INTO_TITLE
LANGUAGE_SELECTOR_INTO_TITLE does not work with MediaWiki 1.10alpha (r19865). It just displays the raw HTML data instead of the box itself. The source code of the page contains things like: &lt;span id=&quot;languageselector-box-1&quot; class=&quot;languageselector &quot; style=&quot;&quot;&gt; instead of Please look into the page source in order to see the difference. ;-) I couldn't find out what is going wrong in the extensions. :-( Arnomane 18:06, 27 May 2007 (UTC)

Same problem happens with 1.11alpha (r22507) too (SVN checkout from today). So I guess it is not an incompatibility in an older MediaWiki version but a bug in the extension. Arnomane 14:18, 28 May 2007 (UTC)

MediaWiki: 1.11alpha
Extension is broken, at least since r23511.

Invalid NULL return from broken hook wfLanguageSelectorSkinTemplateOutputPageBeforeExec

Backtrace:


 * 1) 0 /home2/web/w/includes/SkinTemplate.php(457): wfRunHooks('SkinTemplateOut...', Array)
 * 2) 1 /home2/web/w/includes/OutputPage.php(695): SkinTemplate->outputPage(Object(OutputPage))
 * 3) 2 /home2/web/w/includes/Wiki.php(307): OutputPage->output
 * 4) 3 /home2/web/index.php(90): MediaWiki->finalCleanup(Array, Object(LoadBalancer), Object(OutputPage))
 * 5) 4 {main}

LanguageSelector.php, line 215: -       return; +       return true;

fixs this.

How can make it works?
Hello, I think this extension is really good for my wiki. but, It doesn't work.

Here is the way i was installed.

1. copied languageselector.php to extentions/LanguageSelector/

2. add require_once( "$IP/extensions/LanguageSelector/LanguageSelector.php" ); to my localsetting.php

and I have some error messages above the wiki like,

'''Warning: array_keys [function.array-keys]: The first argument should be an array in /home/webhost/hansco/public_html/wiki-en/extensions/LanguageSelector/LanguageSelector.php on line 82

Warning: Invalid argument supplied for foreach in /home/webhost/hansco/public_html/wiki-en/extensions/LanguageSelector/LanguageSelector.php on line 290

Warning: Invalid argument supplied for foreach in /home/webhost/hansco/public_html/wiki-en/extensions/LanguageSelector/LanguageSelector.php on line 339'''

is there anyawy to make it work correctly?

I saw the way to configure the detail option about it. but I don't know exactly how...

I thought I can use default setting (without any edit except add "require_once" line into Localsetting.php) ...

Is there any simple way to use this extension??

Sorry about my poor English..


 * make sure you include the extension near the end of your LocalSettings.php - do not put custom settings at the top.
 * If that doesn't fix it, i don't know what is wrong - basically, it complains about wgLanguageNames being null - which can't happen, really. At least i don't know how it could. -- Duesentrieb ⇌ 11:04, 22 July 2007 (UTC)