Jump to content

Extension talk:LanguageFunctions

Add topic
From mediawiki.org
Latest comment: 12 years ago by Boaconstructor in topic A couple of things to ask about

A couple of things to ask about

[edit]

Thanks, first of all, the extension is easily installed and works fine.

  1. I do not understand the designation of {{#ifmultlang: content}} construction.
  2. In LanguageFunctions.php there is a piece of code to paste into MediaWiki:Common.js to make custom buttons in editor mode. It is a shame but I could not find this code file.

I'd be grateful for your comment.

Boaconstructor (talk) 12:13, 4 May 2012 (UTC)Reply

funny appearing due to a wrong download

[edit]

It's not working... the extension code it's all over my wiki and theres a lot of errors like Warning: Cannot modify header information - headers already sent by (output started at /home/romuloca/public_html/rcd/es_wiki/extensions/LanguageFunctions/LanguageFunctions.php:7) in /home/romuloca/public_html/rcd/es_wiki/includes/WebResponse.php on line 16. Im usig the 1.15 mediaqiki version.

Can you help me pls?

--Romulocantor 16:02, 20 July 2009 (UTC)Reply

Obviously, I'm not seeing that. I'm also using 1.15 so it doesn't seem like a version problem. Can you post the relevant section of your LocalSettings.php? And also, what other extensions do you have installed?
--Leovitch 01:13, 21 July 2009 (UTC)Reply

Hello, I had the same problem. This extension seams to be not working and it makes funny things allover my wiki! Since you don't use SVN, you have to download the source from here:

Extension:LanguageFunctions/v0.1.2/LanguageFunctions.php
Extension:LanguageFunctions/v0.1.1/LanguageFunctions.i18n.php
Extension:LanguageFunctions/v0.1.1/LanguageFunctions.i18n.magic.php

BUT, if you use the rigth-mouse-klick, the whole wiki page will be downloaded and can not work correctly. If you follow the link and download the code starting with "<?php" everything works very well...

--Jostar 17:38, 14 August 2009 (UTC)Reply

Hi, as I requested with the other user, could you post the relevant section of your LocalSettings.php file, and highlight any other extensions you're using? Since it's working for me, I don't have any way to figure out what your problem is just from the description.
Thanks, Leo
--Leovitch 04:39, 18 August 2009 (UTC)Reply
Please read correctly. There is NO PROBLEM with your extension, only a problem can occur due to wrong download, user created. --Jostar 09:08, 21 August 2009 (UTC)Reply

Problems with MSIE

[edit]

In MSIE 7 a click to a language goes directly to the main wiki page. In Firefox everything works fine. So I changed the code as following:

 
function lfExtendSidebar( $skin, &$bar ) {
	global $wgLanguageFunctions_LanguageFilters, $wgTitle;
 
	$contents = "<ul>\n";
	foreach ($wgLanguageFunctions_LanguageFilters as $filter => $langCode ) {
    if (!$sprache_exists_in_page) {
      $contents .= "<li><nobr>";
      if (isset($_COOKIE['lfmw_langs']) and $_COOKIE['lfmw_langs'] == $langCode) {
        $contents .= wfMsg('lfunc_'.$filter)." &#10003;";
      } else {
          $contents .= "<a href='".$wgTitle."' onclick='lfmediawiki_languageCookie(\"$langCode\")' >".wfMsg('lfunc_'.$filter)."</a>";
      }
      $contents .= "</nobr></li>\n";
    }

where ".$wgTitle." is included.

There are two more changes:

  • each line of a link is sourrounded by <nobr>-Tags to avoid line breaks
  • the choosen page is not longer displayed as a link


to do:

  • the check mark " ✓" (" &#10003;") is not displayed correct in older browsers -> add picture, or, if old browser an other char?
  • if (!$sprache_exists_in_page) -> Only display the language option if there is a "iflang"-tag in the page. Can somebody help, please?
  • only display "all" if the user has the "edit-right"
  • display "userdefault" if the user is logged in, display "wiki default" if the user is an IP