Extension talk:Lingo/2011
This page used the LiquidThreads extension to give structured discussions. It has since been converted to wikitext, so the content and history here are only an approximation of what was actually displayed at the time these comments were made. |
Shortcomings
I have been using the Terminology extension for about a year and have a few feature requests to address shortcomings:
- Contextual Glossary - There is the possibility of having acronyms with dual definitions, like POST which depends on context of the article. A parser tag would solve this problem. Default functionality would work without parser tags based on the word order on the Terminology page.
- Per-word disable - VIA parser tag, one should be able to disable the tooltip, such as when the word POST refers to HTTP POST,
- Per-page/Per Category/Per Namespace disable - Similar to above Joe-carbone 19:25, 26 May 2011 (UTC)
- The latest SVN version
- shows all definitions for an acronym that has multiple definitions
- ignores any element (e.g. div or table) with class='noglossary' (not internationalized)
- provides a magic word __NOGLOSSARY__ (internationalized) to suppress the glossary for the respective article
- provides a config setting $wgexLingoUseNamespaces to specify what namespaces should be used
- to exclude e.g. namespace NS_TALK from marking up you have to set
$wgexLingoUseNamespaces[NS_TALK]=false;
- everything not explicitly set to false will be marked up F.trott 21:52, 11 June 2011 (UTC)
- to exclude e.g. namespace NS_TALK from marking up you have to set
Problems
The code looks nice, but this extension - breaks the html source of the page, adding < html > and < /html > each time it's called (e.g. by templates) - preg_match_all don't recognize UTF-8 (e.g. cyrillic words) - preg_match_all offset are misplaced when 2-bit chars are in the text - should use mb_xxx functions IP 88.125.44.86 19:26, 26 May 2011 (UTC)
- Both problems should be solved in the latest SVN version. F.trott 17:09, 27 May 2011 (UTC)
Error: Strict Standards: Only variables should be assigned by reference in C:\xampp\htdocs\wiki\extensions\Lingo\Lingo.php on line 89
After installation according to: http://www.mediawiki.org/wiki/Extension:Lingo I get: Error: Strict Standards: Only variables should be assigned by reference in C:\xampp\htdocs\wiki\extensions\Lingo\Lingo.php on line 89
Is this a known solution, how can I solve this ? 62.58.98.250 14:00, 31 May 2011 (UTC)
- The version from SVN should fix this. F.trott 14:27, 31 May 2011 (UTC)
Localisation of "Terminology"
Hi, as I understand the name of the mentioned page cannot be changed/localised. It would be cool if it is at least possible to localise it. Cheers [[kgh]] 21:10, 7 June 2011 (UTC)
- I agree, that this is not ideal. However, I am not sure that this should be handled using l10n. I think the better way would be to just add a variable that can be set in LocalSettings.php, e.g. $lingoGlossaryPage or something like that. This way you could set it to whatever name you like. F.trott 22:03, 7 June 2011 (UTC)
- This issue struck my mind whilst translating the description message for this extension. That is why I thougt of a i10n solution. However, to me it sounds to be a very good and preferable solution to change this via the setting of a variable. Something like that should be there since people will instinctively try to change the name of this page. [[kgh]] 07:36, 8 June 2011 (UTC)
- The pagename can now be customized by setting the variable $wgexLingoPage after the require_once in LocalSettings.php.
- The default is a localized pagename. If you are unsure, what that name is in your language, just go to Special:Version, you'll find a link there. F.trott 21:05, 10 June 2011 (UTC)
- That's awesome. :) I appreciate your work creating a very useful extension. Thank you and cheers [[kgh]] 21:19, 10 June 2011 (UTC)
- This issue struck my mind whilst translating the description message for this extension. That is why I thougt of a i10n solution. However, to me it sounds to be a very good and preferable solution to change this via the setting of a variable. Something like that should be there since people will instinctively try to change the name of this page. [[kgh]] 07:36, 8 June 2011 (UTC)
Use of acronym and abbr tags instead of span
I'm just thinking aloud here, but for both semantic and (I think more importantly) web accessibility reasons, is it possible to make use of the proper acronym and abbr tags instead of span? This would be of benefit to screen readers used by visually-impaired users, and also take care of the tooltip display without the need for JavaScript.
Then there is question of how to automatically distinguish between acronyms (e.g. RAM) and abbreviations (e.g. CPU) yet still have the Terminology page human-readable. Perhaps there could be two subpages of the Terminology page (Terminology/Acronyms and Terminology/Abbreviations). These two pages could be (i) simply transcluded into the Terminology page, or perhaps (ii) merged into a single alphabetical list if possible. David 09:50, 24 June 2011 (UTC)
- In principle I agree, that it would be highly desirable to use
abbr
. However, this element only supports having exactly one plain-text definition for one term. It is not possible to have several definitions for one term or links or any other html elements inside.acronym
is obsolete in html5. - Javascript is only used to position the tooltip. It is absolutely possible to use the extension without Javascript. The only drawback is, that the tooltip will be displayed off-screen if the term is to the very right or bottom of the screen.
- Having more then one page of definitions and just transcluding them is difficult. Transcluding means invoking the wiki parser on the page. This however would also translate the semi-colons and colons used to code the terms and definitions into html. IIRC there is a way to produce "expanded" wiki text, but I'll have to investigate that. I'll note it as a feature request. F.trott 16:20, 25 June 2011 (UTC)
Only works with certain Categoried content?
Hey there! Currently i'm having a slight issue in that the mouse over will only occur from content in a certain category! It's very strange and took me a while to work out this was the problem. Any ideas why? Thankyou :) 90.215.232.86 22:55, 12 July 2011 (UTC)
- It is indeed very strange and I have no idea. Your wiki is not public by any chance? F.trott 11:52, 13 July 2011 (UTC)
Support of extended alphabet letters?
When will Lingo support extended letters such as àéèöâ? And what about non-roman characters such as arabic, japanese, gujarati, etc... writing systems? thanks. 82.245.211.111 07:02, 31 July 2011 (UTC)
- It should support these already. Does it not? F.trott 10:25, 31 July 2011 (UTC)
- It works in the Terminology page
- but it doesn't work when you type the acronym and do a mouse hovering.
- Here's a screenshot :
- I'm using MW 1.16.2, I also tried on a clean installation, same problem. 82.245.211.111 10:05, 14 August 2011 (UTC)
- Edit :
- The problem was with the 0.1 version. Latest version works but it disables smoothgallery (not the case with 0.1)! Can it be fixed? 82.245.211.111 10:13, 14 August 2011 (UTC)
- My guess is, that Lingo interferes with some JavaScript. Try wrapping the gallery in an HTML element (e.g. a span or a div) and specifying class="noglossary".
- Should look something like this:
<div class="noglossary"> <sgallery> Image1.jpg Image2.gif Image3.png </sgallery> </div>
- Cheers, F.trott 11:29, 14 August 2011 (UTC)
- Thanks!
- I embedded the gallery in an HTML element -> works, no problem
- I installed Lingo -> Smoothgallery is not disabled but pages where Smoothgallery and Lingo are, the page has a shrunken sidebar and tabs (page, discussion, remove, etc...)
- Workaround -> Do not use acronyms on articles containing Smoothgallery, it seems to fix that problem, it doesn't bother me but still it should be reviewed I guess...
- You can also put
<div class="noglossary">acronym</div></pre> between the acronym to impeach Lingo intervening. [[Special:Contributions/82.245.211.111|82.245.211.111]] 19:43, 14 August 2011 (UTC) ::::::I'll look into that. Thanks for the report! ::::::Cheers, [[User:F.trott|F.trott]] 20:41, 14 August 2011 (UTC) ::::::Lingo had a bug, were inline JavaScript was damaged. This should be fixed in version 0.3 now. [[User:F.trott|F.trott]] 21:31, 3 December 2011 (UTC) == Spaces and Brackets upsetting the extension == Hi, This does not deal with terms with a space in a phrase you may wish to refer to. I am doing some ITIL work and wish to refer to "Known Error" for instance. I also do not get the underline when the term is in brackets. Will these issue be addressed or am I doing something wrong. Many thanks JO [[Special:Contributions/95.131.110.104|95.131.110.104]] 11:52, 9 August 2011 (UTC) :Since version 0.2 you should be able to use any characters in a term (including punctuation, spaces, all UTF-8 characters, but excluding the colon (:) of course). [[User:F.trott|F.trott]] 12:03, 9 August 2011 (UTC) ::Thanks but it does not seem to be working. ::For example this code: ::<code> <nowiki>='''K'''=</code> ;Known Error:An Incident or Problem for which the root cause is known and for which a Temporary Work-around or a permanent alternative has been identified.</nowiki> ::Does not result in Known Error being underlined on any pages. ::The version from the version page on my wiki is "Version 20110108" ::Thanks ::Jeremy [[Special:Contributions/193.109.254.20|193.109.254.20]] 10:03, 11 August 2011 (UTC) :::Ok, your version is the very first version of the extension. There was no real version numbering done back then, hence the date in the version string. :::To use special characters you will have to upgrade to the last version. :::Cheers, [[User:F.trott|F.trott]] 10:24, 11 August 2011 (UTC) ::::Thanks. That solved things that issue. I now have an issue whereby trailing spaces are stripped off and underlined terms run into the following text. ::::Many thanks ::::JO [[Special:Contributions/95.131.110.109|95.131.110.109]] 07:24, 9 September 2011 (UTC) :::::I am not sure I understand the problem. Could you give more detail? E.g. what is the term, what is the text where it should be marked up. If you could even give a link where I could see this, that would be ideal. :::::Cheers, [[User:F.trott|F.trott]] 20:31, 12 September 2011 (UTC) ::::::Tried to upload then email you the link butmy account is not "confirmed" yet. ::::::If I create a sentence like this and "sentence" is a term on the terminology page then when it is displayed it will have no space between "sentence" and "like". ::::::Hope that makes more sense. ::::::<span class="mw-default-size">[[image:Lingo_Issue.jpg|220x220px]]</span> [[Special:Contributions/95.131.110.118|95.131.110.118]] 08:54, 19 September 2011 (UTC) :::::::Thanks, yes, I got it now. :) :::::::It is odd though, I never saw this behaviour here. Um, wild guess, but on the terminology page, is there a space (or anything else) between the terms and their definition? And if so, does it work, if there is no space there? [[User:F.trott|F.trott]] 09:27, 19 September 2011 (UTC) ::::::::Tried the following and no difference. ::::::::;ICT :Information and Communications Technology ::::::::;IEMPS: Integrated EnvironMental Project System ::::::::;Incident : A fault with any of the services (software/hardware) provided by IT whereby that service does not operate in the manner in which it was planned to.:All Incidents should be logged with the Service Desk for attention/resolution. ::::::::A carriage return before the colon breaks the functionality and no underline is seen. ::::::::Thanks ::::::::Jeremy [[User:Jeremy.Osborn|Jeremy.Osborn]] 12:38, 19 September 2011 (UTC) :::::::::I think this should work now with the latest SVN version. Could you give it a try? :::::::::Also carriage returns should now work. [[User:F.trott|F.trott]] 19:44, 20 October 2011 (UTC) ::::::::::First, I want to say that I am rather fond of this extension, thank you very much for maintaining it [[User:F.trott|F.trott]]. However, I am using the latest version from SVN and I am still seeing the problem where trailing spaces are removed by Lingo. There are no extra spaces in my 'Terminology' page. I am afraid my knowledge of php is rather too limited to try and pinpoint a cause in the code but I will keep trying. [[User:H.Mills|H.Mills]] 14:06, 7 November 2011 (UTC) :::::::::::Oh, do you mean removed from around the terms? That is done on purpose. Else users would have to be extra careful on how to format the Terminology page, e.g. :::::::::::<syntaxhighlight lang='text'>;foo:bar ;foo : bar ; foo : bar
- would result in three different terms, which to me seems undesirable. Is there a use case for not trimming the terms and definitions?
- Cheers, F.trott 15:27, 7 November 2011 (UTC)
- Thank you for the prompt reply: I appreciate why the Terminology page behaves as it does and that does make sense.
- I should have been a bit clearer though. The issue I am seeing is not on the Terminology page but is on all other pages. When a term appears elsewhere in the wiki the trailing space is removed by Lingo.
- Example:
How HMRC overtaxed us.
- becomes
How HMRCovertaxed us.
- when Lingo is used.
- I presume that that is not intentional behaviour! Do you have any idea what could be causing it? H.Mills 12:56, 8 November 2011 (UTC)
- Hmm, that's odd. It works here and I have no clue what could go wrong. Your wiki is not public by any chance, is it? F.trott 13:19, 8 November 2011 (UTC)
- I'm afraid it's a private wiki. However I have a bit more information: it does not trim non-breaking spaces and it only trims the spaces in Internet Explorer (tested on IE9). It still only happens when Lingo is turned on but might that help narrow it down? H.Mills 14:47, 8 November 2011 (UTC)
- Yes, this definitely helps. I was thinking of some PHP issue, but it seems to be a JavaScript or CSS problem. I will try to find a solution, not sure if I can - it really is an IE bug. F.trott 15:03, 8 November 2011 (UTC)
- We just have to live with IE's little quirks. Thanks for looking anyway! H.Mills 15:14, 8 November 2011 (UTC)
- This is definitely an IE issue, most likely a CSS conflict. The problem in my organization is that we are running MW on an intranet, and IE 8 automatically turns on "Compatibility View" on intranet sites. It's this mode that causes the problem.
- The frustrating part is that if you view the code, the space is there. In fact, if you highlight the word to the right of the underlined term, you can actually see that there is a space there, but the term is overlapping it. I know there are some width bugs in IE, but I haven't been able to figure out how to work around this one. Jlemley 01:24, 9 November 2011 (UTC)
- As it turns out, the solution was very simple. The problem is that when IE sees consecutive spaces, it removes the second one. In this case, there is a space being forced into the span on line 78 of LingoElement.php. IE saw this as the first of two consecutive spaces... removing that space resolved the issue.
$element = $doc->createElement( (...) 'UTF-8' ) . ' ' );
- is now:
$element = $doc->createElement( (...) 'UTF-8' ));
Jlemley 20:42, 9 November 2011 (UTC)- Cool, I'll fix it in SVN.
- Now I wonder why I put this thing in in the first place.
- Anyway, thanks for the fix!
- Cheers, F.trott 22:12, 9 November 2011 (UTC)
- Yes, this definitely helps. I was thinking of some PHP issue, but it seems to be a JavaScript or CSS problem. I will try to find a solution, not sure if I can - it really is an IE bug. F.trott 15:03, 8 November 2011 (UTC)
- I'm afraid it's a private wiki. However I have a bit more information: it does not trim non-breaking spaces and it only trims the spaces in Internet Explorer (tested on IE9). It still only happens when Lingo is turned on but might that help narrow it down? H.Mills 14:47, 8 November 2011 (UTC)
- Hmm, that's odd. It works here and I have no clue what could go wrong. Your wiki is not public by any chance, is it? F.trott 13:19, 8 November 2011 (UTC)
- Sorry for the delays in replying. I tried the version before 0.3 on various platforms, (WAMP, MAMP and WIMP I guess. IIS instead of Apache), and the WIMP platform still had the same issue. I recently tried 0.3 with the same result I think, (too many variations around me at the moment), but them went to MW 1.18.1 and now all seems well. Perhaps there was something in my 1.16 setup. I upgraded by installing 1.18.1, copying across images and extensions to the new install then adjusting localsettings.php to point at the 1.16 database then ran the update script.
- I will keep you informed of anything else I come across.
- Thanks
- Jeremy 95.131.110.118 08:34, 8 February 2012 (UTC)
- Thanks!
Support of multiple monitors
Hello,
I have 2 monitors on the same computer and Lingo doesn't support them, for instance when you fly over a long term, its meaning is displayed on two lines, while when you have one monitor it displays on one line only.
I've found in Lingo.js line 39 : var naturalWidth = tipdef.width();
If you put a value between the brackets, it gives a fixed size to the tip which "solves" the problem but it doesn't adapt itself to the lenght of the term description.
Any fix? Renrenfr560 20:17, 14 August 2011 (UTC)
- You are right , putting a number there only fixes the problem for your particular setup.I think this may be a browser issue. Have you tried a different browser? F.trott 20:50, 14 August 2011 (UTC)
- Indeed, it doesn't work with Firefox but it works with Google Chrome. Renrenfr560 21:42, 14 August 2011 (UTC)
- Ok, I do not think that I will do anything about it. The algorithm in Lingo's JavScript tries to guess the "natural" width of the tooltip. However, what is considered the natural width depends very much on the browser and its layout algorithm. F.trott 19:59, 20 August 2011 (UTC)
- Indeed, it doesn't work with Firefox but it works with Google Chrome. Renrenfr560 21:42, 14 August 2011 (UTC)
Interaction bug with MediaWiki:Sidebar
Hello to all,
Lingo is a great extension, but it seems that there is an interaction bug between Lingo and MediaWiki:Sidebar. In fact, when, Lingo is ON, links and collapsing in the sidebar does not work anymore.
Any ideas ? Thanks 193.51.33.109 12:07, 2 September 2011 (UTC)
- In the beginning while testing Lingo we had some trouble while Extension:UsabilityInitiative (Vector controls MediaWiki:Sidebar) was installed. This extension is abandoned and no longer compatible with MediaWiki 1.16+. MWJames 07:29, 8 September 2011 (UTC)
- The individual components of UsabilityInitiative have been moved to their own extensions (like Extension:Vector), and those components are no longer compatible with MW 1.16. However, if you are stuck on 1.16 for the moment, Extension:UsabilityInitiative is the way you have to go. The problem is that Lingo loads JQuery itself, which conflicts with UI. I worked around this by editing LingoParser.php and commenting out lines 280 and 283 so that Lingo would not load JQuery. This allowed the sidebar to collapse again, and Lingo still works. Jlemley 14:57, 9 November 2011 (UTC)
- (Edit: Sorry, answered the wrong thread.) F.trott 21:28, 3 December 2011 (UTC)
Converting from Glossary, but few terms marked up
Thanks so much for your work on this wonderful extension. I was using Glossary from a few years ago and was directed to this project as its successor. I successfully, I think, required the extension and changed the LingoPage:
require_once("$IP/extensions/Lingo/Lingo.php"); $wgexLingoPage = 'Glossary';
I see Lingo tool tips on the Glossary page and on one new heading that I entered.
http://www.circopedia.org/index.php/Glossary
And here on the first title:
http://www.circopedia.org/index.php/Charlie_Cairoli
But other pages have lost their existing Glossary entries and do not get marked up even when I edit them. Do I need somehow to force the pages to be reparsed? Thanks for any help or advice you might have!
Charles 24.147.53.50 15:06, 7 September 2011 (UTC)
Magic word 'noglossary' not found
We are running MediaWiki 1.5.1 using PHP 5.2.6-1+lenny13 (apache2handler). After I installed the extension all pages showed an internal error with the headline "magic word 'noglossary' not found". In the backtrace 23 points were listed pointing to certain lines in files such as MagicWord.php, Parser.php and Cite.php. Extension:Terminology, however, works fine. Could someone explain the reasons, in case other people run into the same problem? Thanks, Ob.helm 07:33, 26 September 2011 (UTC)
- I guess (and hope) you mean MW 1.15. Alas this is still to old, Lingo was written for MW 1.16 and above. I would recommend to upgrade MW, version 1.17 is the current one. F.trott 16:34, 11 October 2011 (UTC)
Glossary entry containing "0"
Hi,
Glossary entries containing "0" like the following one:
;JB007:James Bond
will give a strange result like "JB007007" where the string starting with "0" appears twice! Any idea? (Mediawiki 1.17 + Lingo 0.2 + Vector extension)
Many thanks for this nice extension :-)
Philippe Cornucopia 13:14, 27 September 2011 (UTC)
- Nice spot! Will fix it tonight. This happens because for PHP "0", 0, and FALSE are all equivalent.
- Edit: Done. Bug is fixed in new version 0.2.1
- Thanks, F.trott 16:32, 11 October 2011 (UTC)
- Many thanks for the bug fix and this nice support. Philippe Cornucopia 20:53, 11 October 2011 (UTC)
Partial words highlighted
Hello!
I've just finished uploading my Wiki installation to a real server (up to now it was self hosted on my computer) and I noticed something strange: entries from the Terminology page are highlighted even if they are not a whole word but a part of another. For instance:
- entry CAR, but the word CARdiology gets a partial highlight of the "car" part.
Any idea what might be causing that?
Thanks a lot! Zkvvoob 15:43, 11 October 2011 (UTC)
- Just tried to reproduce it, but could not.
- What version of PHP, MW and of Lingo are you using?
- Is your wiki public so I could have a look?
- Cheers, F.trott 15:59, 11 October 2011 (UTC)
- Hello and thank you for taking the time to asnwer!
- My Wiki, unfortunately, is closed and you would need to register in order to read the articles, so I wouldn't want to bother you this much. Besides, it's not in English...
- Anyway, here's a screenshot in which you can clearly see my problem: the word from the Terminology page is "rigor", however it appears highlighted as a part of Grigoriy.
- http://tinypic.com/r/14wc1sg/7
- As for the versions:
- MediaWiki 1.17.0,
- PHP 5.2.17 (cgi),
- MySQL 5.0.92-community-log
- Any ideas? Zkvvoob 14:12, 14 October 2011 (UTC)
- And this happens with Lingo 0.2?
- Edit: Never mind, I know what the problem is. The algorithm does not properly align on word bounderies for cyrillic script. I'll try to fix it. F.trott 14:49, 14 October 2011 (UTC)
- I think I fixed it. Could you try the latest version from SVN? F.trott 19:36, 17 October 2011 (UTC)
- It is fixed, indeed. Thank you very much!
- On another matter, is there any possibility to have links between some of the entries in the Terminology page? For example, if we have a main entry of a word, another - like the plural form, to extract the explanation from the main entry? This would be very handy, because in Bulgarian the definite article is actually formed by adding a suffix to the word, rather than a separate particle as it is in English. Zkvvoob 18:45, 20 October 2011 (UTC)
- Sure it's possible. Just download the latest SVN and then put someting like this into your Terminology page:
;Foo ;Bar ;Baz :Bogus word used in examples
- All three words (Foo, Bar, Baz) will now have the same definition.
- Thanks for this good idea! :) F.trott 19:41, 20 October 2011 (UTC)
- You are amazing! Thank you so much for the quick reaction and for all your support! Zkvvoob 08:20, 28 October 2011 (UTC)
- Hello again!
- Sorry for bothering you, but only now did I find out that the new syntaxes has a problem. Namely: after a set of several words that are supposed to share a definition, the next word's tooltip picks both its definition and the one of the group above.
- Here is a screenshot with your example above put at the top of out Terminology page: http://tinypic.com/r/344pq37/5
- Any idea what might be causing this and if there is a way around the problem?
- Thanks in advance for your time! Zkvvoob 14:57, 12 November 2011 (UTC)
- In my org, we found that this syntax works best:
;baz:Definition 1
;baz:Definition 2
- This successfully shows both definitions on hover, and does not create the overlap you reported. Unfortunately, this causes the term to be listed twice on the glossary page, but it's the only way we were able to make more than one definition appear. Jlemley 15:31, 14 November 2011 (UTC)
- Hi Zkvvoob,
- it's fixed now in SVN.
- Cheers, F.trott 17:30, 16 November 2011 (UTC)
- Once again: THANK YOU VERY MUCH!!! Zkvvoob 14:43, 17 November 2011 (UTC)
- I think I fixed it. Could you try the latest version from SVN? F.trott 19:36, 17 October 2011 (UTC)
Glossary entries in titles and sub-titles
Hi, Glossary entries in titles and sub-titles are not displayed properly (I am not talking about page names): the mouse pointer changes to the question mark but the associated definition is not displayed (Mediawiki 1.17 + Lingo 0.2... I will try the 0.2.1 version tomorrow)...
==JB007==
with in the glossary the following entry:
;JB007:James Bond
It could be a css issue but I am not yet sure. Many thanks, Philippe Cornucopia 21:11, 11 October 2011 (UTC)
- It is indeed a CSS issue. Vector and Monobook skin (and probably others) set overflow:hidden for headlines. I do not know, why they would do this, it seems unnecessary to me.
- To fix it find the CSS rules governing h1, h2, ... h6 in your skins CSS file and comment out or delete the overflow:hidden rule. For Monobook this is main.css around line 112, for Vector it is screen.css around line 728. F.trott 08:11, 12 October 2011 (UTC)
- Perfect! Once again, Many thanks! Philippe Cornucopia 09:03, 12 October 2011 (UTC)
Can't get it to work at all
I am using mediawiki 1.16.5 php 5.3.2(apache) and mysql 5.0.41-log
I was previously using terminology and while it "worked" pages that had html tags or used the input box or forms extension would not show up. I liked how Lingo allowed for limiting to namespace.
I tried installed as is 'out of the box' before putting in the namespace limitations.. and all of my pages show up completely blank as soon as the extension is enabled. No error message..but no page either. when i disable the extension in local settings, it all comes back. I'm not sure where to start debugging because with no error message i don't know what about the extension it's not happy with. I am going to try disabling all of my other extensions and seeing if that helps but figured i'd post here while working my way thru that in case anyone had any thoughts.
Thanks Kay 13:02, 18 October 2011 (UTC)
- Hi Kay,
- sorry about the trouble. You are right, a blank screen is not easy to debug.
- To display errors include the following statements in your LocalSettings.php somewhere at the top:
- F.trott 14:44, 18 October 2011 (UTC)
error_reporting(E_ALL | E_STRICT); ini_set("display_errors", 1);
- ok i added the code segment you showed above.. saved off my localsettings.php.. uploaded it back to the server.. reloaded the page.. and nothing. i still don't get any error messages.. i simply get a http 500 error. as soon as i turn lingo back off and re upload localsettings.php my pages come back. I've checked a variety of the pages just to make sure it wasn't something that happened to be on one page.. perhaps use of an extension that conflicts.. and none of the pages in my wiki will show up, all http 500 errors.. if i hadn't be able to use terminology i'd be less confused.. but since the one worked and this is a reworking of that.. i didn't think the site would balk this much. Kay 16:18, 18 October 2011 (UTC)
- Hmm, not good. Do you have access to the server logs? F.trott 20:22, 18 October 2011 (UTC)
- i don't think so. i have to upload all of my changes to a dev server that is separate from the actual real server and then use a java script to transfer them over but i'll ask .. do you know which specific files would be useful? someone else is going to have to get them to me and i want to be able to give as explicit instructions as possible to point them to what i need or they will either get something that won't help OR decide that what i am asking is too much work and they don't want to be bothered. Kay 10:12, 19 October 2011 (UTC)
- Difficult. This depends very much on how the server is set up. The name and location of the log file can be found in the server config file in the ErrorLog directive. On Unixes it is often named error_log and to be found in the /var/log/apache/ directory. If in doubt, if that directory exists ask for all the files in there.
- Another thing that I can think of is, that for some reason you might be missing the dom module. If you want to check this first, create a php file with the following content:
<?php phpinfo();
- Upload this file to your server and access it via your browser. It should give you loads of information. One of the sections should be titled "dom" and basically say that all its services are enabled (DOM/XML, HTML Support, XPath Support,...). After doing this remember to delete the file again! Making all the information public could pose a security risk. F.trott 12:26, 19 October 2011 (UTC)
- Hmm. ok. i made the file and uploaded it and went to look at it.. i see nothing about DOM... i have one header that says Quercus and one that says PHP variables.
- i think i can copy/paste what is under quercus.. cause i am a little confused by one part:
>>PHP Version => 5.3.2 >>System => SunOS 5.9 sparcv9 >>Build Date => 20100511 >>Configure Command => n/a >>Server API => CGI >>Virtual Directory Support => disabled >>Configuration File (php.ini) Path => null >>PHP API => 20031224 >>PHP Extension => 20041030 >>Debug Build => no >>Thread Safety => enabled >>Registered PHP Streams => php, file, http, https
- Should Configuration File (php.ini) Path => be null?
- the other section is too big to dump to here and might contain information i shouldn't dump to here (not sure, it's rather large)
- but i did a search and there is no reference to 'dom' Kay 13:43, 19 October 2011 (UTC)
- Ok, I guess this is the problem then. Lingo depends on the DOM module. It is part of the standard PHP packages these days, so your admins should be able to enable it.
- Just googled Quercus. It might not be so easy to just turn on the DOM module after all. Apparently Quercus is a relatively new PHP implementation in JAVA and may not yet have the module. F.trott 14:41, 19 October 2011 (UTC)
- Yes. after much poking and prodding and being very irritated at the non answers i was getting.. i finally got people to tell me that.. they couldn't figure out how to get php to install on the server.. so they went with some sort of emulated version. and they KNOW (have known) that there are large pieces missing.. but, even tho they knew i was having issues getting stuff working, they didn't think it important to tell me this.. until i finally tripped on the information myself thanks to you. so it may all be a moot point. apparently no one can figure out how to get php installed and the emulated version doesn't have all the pieces i need. Kay 15:17, 19 October 2011 (UTC)
- Ok. so i took my install of mediawiki at home and upgraded to 1.16.5 to match the install i was testing at work.. installed all of the same extensions we had there...including Lingo.. and it works just fine. No errors at all. So now i need to try to convince them to move the wiki someplace where we don't have to deal with emulators and stuff. thanks so much for the quick assistance. Kay 21:41, 24 October 2011 (UTC)
- Yes. after much poking and prodding and being very irritated at the non answers i was getting.. i finally got people to tell me that.. they couldn't figure out how to get php to install on the server.. so they went with some sort of emulated version. and they KNOW (have known) that there are large pieces missing.. but, even tho they knew i was having issues getting stuff working, they didn't think it important to tell me this.. until i finally tripped on the information myself thanks to you. so it may all be a moot point. apparently no one can figure out how to get php installed and the emulated version doesn't have all the pieces i need. Kay 15:17, 19 October 2011 (UTC)
- i don't think so. i have to upload all of my changes to a dev server that is separate from the actual real server and then use a java script to transfer them over but i'll ask .. do you know which specific files would be useful? someone else is going to have to get them to me and i want to be able to give as explicit instructions as possible to point them to what i need or they will either get something that won't help OR decide that what i am asking is too much work and they don't want to be bothered. Kay 10:12, 19 October 2011 (UTC)
- Hmm, not good. Do you have access to the server logs? F.trott 20:22, 18 October 2011 (UTC)
- ok i added the code segment you showed above.. saved off my localsettings.php.. uploaded it back to the server.. reloaded the page.. and nothing. i still don't get any error messages.. i simply get a http 500 error. as soon as i turn lingo back off and re upload localsettings.php my pages come back. I've checked a variety of the pages just to make sure it wasn't something that happened to be on one page.. perhaps use of an extension that conflicts.. and none of the pages in my wiki will show up, all http 500 errors.. if i hadn't be able to use terminology i'd be less confused.. but since the one worked and this is a reworking of that.. i didn't think the site would balk this much. Kay 16:18, 18 October 2011 (UTC)
Wikify glossary entries (feature request ;-)
Hi :) In a glossary entry, it is sometimes useful to add internal and/or external links.
;007:James Bond [[w:fr:007|my link]]
- 007
- James Bond my link
Do you think it is something difficult to implement (I do understand the difficulty regarding the complex computation for the size of the message, and I am sure that there are many other difficulties...) Many thanks, Philippe Cornucopia 20:30, 20 October 2011 (UTC)
- I agree that it would be very useful. I just turned parsing on and did some profiling. The time spent in the relevant method went from 1.6ms to 717.5ms per request. It may be that in some future version I can figure out how to utilize the cache, but until then I will not turn on parsing. F.trott 20:55, 20 October 2011 (UTC)
- Many thanks for your test that quickly give a raw answer regarding the complexity. Best regards. Philippe Cornucopia 11:38, 21 October 2011 (UTC)
Extra CDATA code being added to embedded scripts.
Some of my wiki articles use javascript to pop open new windows. This stopped working after installing Lingo. I also use SmoothGallery (already discussed below in Support of extended alphabet letters?), which also broke. I was able to resolve both by changing line 259 in the LingoParser.php file. It appears that the saveXML function will insert a CDATA wrapper around any javascript in order to ensure properly formed XML. However, I'm not sure that XML is necessary for this output, is it? I changed it to saveHTML, and it seems to work:
$text .= $doc->saveHTML( $child ); Jlemley 16:40, 10 November 2011 (UTC)
- I think it had something to do with saveHTML being fairly new and not being supported in older PHP versions, but that was some time ago. I'll look at it again. F.trott 10:50, 11 November 2011 (UTC)
- Found it. The node parameter was only added in PHP 5.3.6. MW still supports PHP 5.2.3. I implemented a different fix instead and put it on SVN.
- I could not get SmoothGallery to work properly, so testing is limited. Could you give it a try? F.trott 20:00, 16 November 2011 (UTC)
Following space vanishes
I just found a strange quirk and its appearance is so limited that you may not want to bother trying to fix it but i figured i'd let you know.
In IE 7 the space following the use of a defined term vanishes. I've tried placing multiple spaces to no avail. I can alter the code to force a space but then the ones that were showing properly have a double space after which is almost worse. I can't get it to repeat with any other browser or any other IE version. I only noticed it because my work laptop has 7 installed and I don't have admin rights on it to upgrade. When i use my personal laptop i don't see the problem and people i know using firefox haven't seen it either. Kay 10:44, 16 November 2011 (UTC)
- Hi Kay,
- this should be fixed in the version available from SVN. Sorry, I did not have time yet to package and properly release it.
- You can get the SVN version from here: http://www.mediawiki.org/wiki/Special:ExtensionDistributor?extdist_extension=Lingo
- Cheers, F.trott 11:05, 16 November 2011 (UTC)
- when i clicked the link it sent me to the 'download mediawiki extension' not svn.. did i end up in the right spot? Kay 13:36, 18 November 2011 (UTC)
- Yes, that's exactly the right spot. It will take the SVN version, zip it up and provide it for download. One more thing, though: You need to select the development version (trunk). The other one is already deprecated. F.trott 14:03, 18 November 2011 (UTC)
- Perfect!!! thanks so much!
- just noticed something odd. not sure that anything can be done. if you use lingo. and you need to copy/paste text from a page that has an acronym that is defined.. when you paste the text.. you get the acronym AND the spelled out definition from the popup-box. Kay 14:10, 21 November 2011 (UTC)
- Hmm, I can see why it happens, but there is no quick fix for it. The definitions are stored in the text next to the acronym and then hidden by CSS. When you hover over the acronym, the CSS is changed to show the popup. I'll see what I can do, but to be honest, I think this could even be considered a browser bug - if an element is hidden they should not consider it as marked. F.trott 15:23, 21 November 2011 (UTC)
- Hmm, just tried it. It works alright for Firefox, Opera and Chrome under Linux. F.trott 20:06, 27 November 2011 (UTC)
- Next question. the wiki i am working with has the extension LiquidThreads installed which adds some namespaces:
- Thread 90
- Thread_talk 91
- Summary 92
- Summary_talk 93
- Additionally the wiki has been 'named' using the $wgSitename so we have the namespaces
- Sitename 4
- Sitename_talk 5
- as well as one additional that i created thru LocalSettings.php
- define("NS_STANDARD", 128);
- define("NS_STANDARD_TALK", 129);
- $wgExtraNamespaces[NS_STANDARD] = "Standard";
- $wgExtraNamespaces[NS_STANDARD_TALK] = "Standard_talk";
- i only want Lingo to be active in the Standard namespace so i modified the array in Lingo.php to account for the additional namespaces and set them to false. Howevever all of them except for Standard throw back an error message saying that Lingo doesn't recognize them. Do i need to refer them by namespace number in the Lingo.php array rather than their name? Kay 10:40, 1 December 2011 (UTC)
- Yes, it should be the namespace number or at least it should resolve to the namespace number. E.g. using NS_STANDARD resolves to 128, so it works. I do not know if LiquidThreads defines constants for the namespaces and what they are called. F.trott 11:00, 1 December 2011 (UTC)
- Yes, that's exactly the right spot. It will take the SVN version, zip it up and provide it for download. One more thing, though: You need to select the development version (trunk). The other one is already deprecated. F.trott 14:03, 18 November 2011 (UTC)
- when i clicked the link it sent me to the 'download mediawiki extension' not svn.. did i end up in the right spot? Kay 13:36, 18 November 2011 (UTC)
Lingo is Finicky
I solved my problem, but just in case anyone else has it, I thought I'd post the information here. The terminology page for Lingo is very finicky. When they say format it like this:
;Term1:Def1
;Term2:Def2
They mean format it EXACTLY like that. The following does not work:
;Term1
:Def1
;Term2
:Def2
This does not work either:
;Term1
;TermVar1 :Def
When it breaks, it breaks in ways that may not make the cause immediately apparent. Your list may have some tooltips, which may stop several tips above where the error is. If the problems are severe enough, it will stop working altogether. Rloconne 03:56, 2 December 2011 (UTC)
- Try the latest dev version from SVN. Both of your mentioned cases should work there.
- If you think the extension does not behave as it should, please report exactly what you did, what happened, what you would have expected to happen. "If the problems are severe enough, it will stop working altogether." is not specific enough.
- Cheers, F.trott 09:56, 2 December 2011 (UTC)
Lingo case-sensitive
Hello,
Very nice extension. I was wondering if Lingo supports case-insensitive words? When a definition is added on the Terminology page (in lowercase) the definition is only picked up by lowercase words in the article (and not in words starting with a capital e.g. at the start of a sentence).
One could add the word starting with a capital in the Terminology, but maintenance would be a lot more work. Remcow 11:17, 6 December 2011 (UTC)
- Hi,
- Lingo currently does not support case-insensitive words. The problem is, that every transformation, every additional check results in a performance hit and thus must be very carefully considered. I will look into it, but I really am not sure if I will ever implement it.
- Cheers, F.trott 13:38, 6 December 2011 (UTC)
- Hi,
- Thanks for your answer. Those sound like valid reasons. Nevertheless the extension is very helpful for our project.
- Regards,
- Remco 217.112.113.162 16:13, 6 December 2011 (UTC)
- Hi,
- First of all thank you for this great extension!
- I could also use something like a flag that specifies that the term is not case sensitive. basically I see two variants to achieve that:
- manual: permit multiple definitions for the same definition.. use a separator like "," to separate different terms. As it is now.. i have to write the same term in different casing with the same definition
- automatic: this would be much easier for the user, but heavier for the system.. I do not know how the extension is implemented, however I can see a few possible ways to achieve this:
- per word case analysis - very expensive but pretty straight forward to implement
- enhance dictionary - this would be a much more flexible way to achieve the same thing without the feature being to expensive. By default or based on a flag specified by the user of the extension, you could generate more search words (or strings in case of multi-word terms) in the dictionary based on the same word. However when generating the extra words you can take into consideration the most common cases when terms change:
- first letter both casings A/a (2 subcases: for each word and for the first word only)
- entire string both casings A/a
- Thanks again for the extension!
- Best Regards Ioan-Paul Pirău 10:18, 8 February 2012 (UTC)
- I also vote for creating a flag to make the glossary case-insensative. Or just follow the mediawiki format for page headers. If a term begins with a capitalization, then it can match a version where the first letter is capitalized or not capitalized. If you are worried about performance, then create a flag in the LocalSettings.php file. Zzmonty (talk) 20:52, 20 January 2015 (UTC)