Extension talk:Terminology

Hallo, was ist nun genau der Unterschied zwischen Terminoloy und der Glossary Extension?

2008-Jul-03: ''I wrote the original extension called Glossary, and it was improved on quite a bit by others. I adopted a version that was completely rewritten by BarkerJr and started improving it again. However a heavily modified version of my original code seems to still be popular. Rather than get into a wiki revert war with my extension, I created a new extension with the much improved code.''

xkahn

Holp
Ok. I have terminology up and running and i LOVE how it highlights the words on the page (dotted underline) MUCH better idea than mine for changing the colours. I did it and my pages looked like rainbows.. this works much better.

Now I am still having problems (and i have ws_tooltip.js installed) getting it to display hyperlinks and formatting. If i use the ws_tooltip references the way they are showed on the page for that, everything is fine but when i try to put them on the terminology page and have the other pages reference them, all that shows up is the actual code.

Has anyone been able to get this working?

Kay

2008-Jul-03: ''I've updated the instructions now. Is it easier to follow?''

xkahn

2008-Jul-15: Looks great!!! Thank you so much

Kay

Formatting
Ok after ton of fighting and trying to understand the code in Terminology.php and the code in wz_tooltip.js I finally have a solution. I am going to document it here and if anyone with more knowledge of php and js can tell me a better way to do this, i'd be thrilled. I don't like messing with other people's code, especially when i have almost NO knowledge at all of the language being used to write it. There is a line that reads:
 * $span->setAttribute('onmouseover', "TagToTip('$term', STICKY, true, DURATION, -400)");

I commented out this line using // and replaced it with
 * $span->setAttribute('onmouseover', "Tip('$definition')");

and then commented out:
 * $span->setAttribute('onmouseout', "UnTip");

After doing this i was about to use  for adding line breaks and  tags for external hyperlinks to my entries on the Terminology page. One thing that is VERY important to keep in mind all instances of quotes in the hyperlink must be either converted to ascii or preceded with a \ for the hyperlink to work.

If you plan to use external hyperlinks, you also need to play with your settings in the .js file to get the combination of a wait time that works well for you. You can use any combination of sticky and clickclose or closebtn that works for your particular page.

I have also tried using unordered lists using the html tags and keeping everything on one line and that seems to work fine. I am guessing any formatting that required a hard carriage return to be placed on the Terminology page within the definition would cause things to break.

Example of the unordered list I used: TestAnother Test

==Kay

2008-Jul-03: ''I've updated the code now to handle your suggestions. Hyperlinks should now work by default. You shouldn't need to escape anything to get them to work. I've done some light testing, so let me know if it doesn't work.''

xkahn

2008-Jul-15: Ok we finished updating to the new version, changing our Terminology page to account for the hyperlinks and everything looks great! Thank you so much for all our help.

There is ONE other thing and i'm not even sure it's possible or if you'd even want to be bothered. BUT have you ever considered the implementation of something set in local settings that allowed for having every instance of a page show up with the tooltip OR simply the first instance? We've just noticed that some of our pages are almost entirely green and we haven't decided if we want to modify our terminology page to have less words on it.

Kay

2008-Aug-27: This isn't too hard. Find the line that says:

and change the "-1" to 1 or 2.

xkahn

..........Addendum

Ok I am running into a few problems. Not with the formatting but with multiple word 'terms' If i have a one word term that appears within another term that is made up of more than one word, the second term is not recognized as an entry.

For example: Reference Global Reference

The 'Reference' in 'Global Reference' shows up underlined and pops up the definition for 'Reference' but I can't get 'Global Reference' to work at all unless i delete 'Reference'

Any ideas?

==Kay

2008-Jul-03: ''This is basically an implementation detail. Try changing the order of the definitions.''

xkahn

2008-Jul-15: I made the change and it worked perfectly. Thanks so much!

Kay

Changing wiki page name
Ok this one is probably pretty simple but could anyone tell me how to change the name of the page in the wiki from Terminology to something else (probably Acronyms)

What exactly do i need to edit within the .php files to make this work (and/or IS it possible)

Kay

2008-Jul-03: ''Line 46: $rev = Revision::newFromTitle(Title::makeTitle(null, 'Terminology')); defines the name of the page. Simply change 'Terminology' to whatever you want.''

xkahn

2008-Jul-15: Thank you!!

Kay

How do i make it work?
Ok. The extension is working, but how do i make it work with the wz_tooltip.js practically ? Where do i put the code and what code ? and how do i format the text ? How do i format the text for terminology ? I want to make the tooltip to look nicer but all i get is the text on all the screen. I want to make a tooltip with 5 rows how do i do that ??

2008-Jul-03: ''I've updated the instructions now. Is it easier to follow?''

xkahn

What defines an acronym?
I am trying to figure out what characters are allowed within what is an 'acronyn' dashes '-' seem to work fine but several of ours have ampersands '&' and slashes '/' When i put a plain ampersand in ;ACRO&NYM: the & and all text following vanishes. I tried the equivalent (had to add spaces to get it to show up, everything else translated it into &) and it shows up right on the terminology page but is not recognized as an acronym (ie does not get the green underscore or popup box) Any thoughts on how to work around this?

Kay

2008-Aug-27: You've got some crazy acronyms! The trouble is the ampersand is a special character in regular expressions and the terminology code is feeding it raw to a regex parser. Try putting a backslash or two in front? I haven't tried this...

xkahn

2008-10-13

Crazy acronyms? What defines crazy? AT&T is one which comes to mind quickly.

Is anyone else having issues?
Mine is real flaky and I keep having to clear from my pages when it works at all....

GobleS 16:33, 25 August 2008 (UTC)

2008-Aug-27: I'm not sure what you mean. No, it isn't flaky for me. What happens when it doesn't work? Why are you removing a meta tag? What version of mediawiki? What OS/Distro/Platform are you running on? Which version of PHP?

xkahn


 * The problem is that the meta tag is put on everypage that it modifies. And it is displayed as text on the page, and it places it in there everytime the page is saved so 3 saves = 3 meta tags!

This is on a HP Proliant DL380 G4 running Windows 2008 with:

* MediaWiki: 1.11.0 * PHP: 5.2.5 * MySQL: 5.0.45 Thanks for anything you can suggest.

GobleS 23:51, 27 August 2008 (UTC)

2008-Aug-28: I've updated the code to support the FCKeditor, which was causing your problem. Simply click the "wikitext" button to edit the page in the FCKeditor.

xkahn

Mis-interpretation of acronym
I added the acronym for ;SAN:Storage Area Network as shown.

The problem is than my wiki is mostly in french and that the word "sans" appear with a dotted underline. Anyone got this problem? --Abrillon 16:56, 27 August 2008 (UTC)

Problem circumvented. Changed line $texts = preg_split('/\b('.preg_quote($term).'s?)\b/iu', $node->textContent, -1, PREG_SPLIT_DELIM_CAPTURE); to $texts = preg_split('/\b('.preg_quote($term).'s?)\b/u', $node->textContent, -1, PREG_SPLIT_DELIM_CAPTURE); to remove the case insensitivity so that SAN SANs are underline but sans san are not.

--Abrillon 13:30, 28 August 2008 (UTC)

2008-Aug-28: That's a great fix. Acronyms are case sensitive anyway. Thanks.

--xkahn

System load
Hello,

great extension, but it makes my Wiki very very slow. I put a list with at least 621 definitions to the Terminology side. If this is too much, I have to turn off the whole feature - and I don't want to.

Any Ideas, how to fast it up?

--62.128.18.198 13:01, 9 September 2008 (UTC)

There are a number of ways to speed up the extension, but it will likely always be O(n) time to hilight the definitions. So as the number of definitions grows, the extension will slow down. There may be improvements to the substitution I could make, or it might be possible to cache the final document.

--xkahn 5/29/2009

Highlighting an acronym only once on a page
For acronyms that appear more than once on a single page, would it be possible to make that acronym get highlighted once only? How would the extension need to be edited to do this?

Exclude pages, create links
Hi, First, thanks for this great extension. Is there a way to exclude some pages from being parsed... eg, I'd like the page Terminology not to show the tooltips, same for the main page...

I like the green underline system, but is there a simple way to add [[ around the acronym in the text so that it becomes a link to its own page ?

Thanks Doc

Issues with NCL extension
Hi again, Looks very much like Terminology is causing NCL extension strange behaviour... when terminology runs, then, the hook can be used only once on a page... Any help welcome... Thanks Doc

Short URL
Hi! The Terminology extension didn't work at all for me on my newly istalled wiki, so I gave up and did my next task, fixing a Short URL. When that was done, I saw to my surprise that the Terminology started to work. /MikaelLindmark 11:46, 13 October 2008 (UTC)

Hiding the underline on printed version
I don't think it's terribly useful to have the green underlines appear on a printed version of a wiki page, so I figured out a minor change so that they only appear on the screen:

In the terminologySetup function, change the following line: $wgOut->addHTML(" "); to: $wgOut->addHTML(" "); -- Hawaiian717 21:36, 14 January 2009 (UTC)

Great suggestion! I've added this code in. Thanks.

-- xkahn May 29, 2009

Warning-Message
Hi,

I installed the extension. It works, but on every wiki page the following warning message is displayed:

Warning: Cannot modify header information - headers already sent by (output started at /home/imc/public_html/extensions/terminology.php:143) in /home/imc/public_html/includes/WebResponse.php on line 16

How can I get rid of this?


 * MediaWiki 	1.14.0
 * PHP 	5.2.8 (cgi)
 * MySQL 	4.1.22-standard

-Bernhard