Extension talk:Glossary

--Sorin Sbarnea 16:07, 27 May 2008 (UTC) Removed comments because the information is too old and all modifications were included in the last release.

Can't "shake" off the Glossary info from the mouse cursor !!
I installed the 'latest' Glossary version '2008.05.27' - Works well on my Wiki 1.12 ..

When I place the mouse over a word, then move the mouse off the word, the information stays there forever and follows the mouse !!

It would also be nice if the Glossary words could be a 'green' colour - I'm sure at one time it was working that way ?

Any help given will be much appreciated ...

--Dick 07:00, 28 May 2008 (UTC)

Solution: Can't "shake" off the Glossary info from the mouse cursor !!
Search for $span->setAttribute('onmouseover', "TagToTip('$term')"); in Glossary.php and add a new line after that.

The new line has to be: $span->setAttribute('onmouseout', "UnTip");

After that you have to save the pages again because wiki is obviously caching the page content. (I'm new to mediawiki and had the same problem today. I have no idea (yet) on how to solve this cacheing problem otherwise.)

Christoph

...............

Thank You Christoph - your suggestion did the trick for me ... I didn't have to re-save pages either, just did a refresh on my browser and that was that .. I've used 'onmouseover' before but never thought about your solution - brain definitely getting too old ......

Now, if I can just get the 'green' colour back to the glossary words on the pages !!

--Dick 10:10, 28 May 2008 (UTC)

...............

I asked about the green colour too and was given this response. I can't test it out because currently I can't get glossary to work at all (as noted below) but since you seem to have it up and running, maybe this will help:
 * (this is a piece of a larger email i sent to Benjamin Kahn)
 * > 2)      it allows for the acronyms to show up highlighted or in a different
 * > colour from the rest of the text so users know to mouseover
 * >Yes. There is a line in the most recent version that looks like this:
 * >$wgOut->addHTML(" ");
 * >Simply change the style definition on that line to anything you want.
 * >.glossarydef {color: lightblue;}
 * >would work.
 * >Simply change the style definition on that line to anything you want.
 * >.glossarydef {color: lightblue;}
 * >would work.
 * >would work.
 * >would work.

--Kay

...............

Kay,

I couldn't get your suggestion to work but did change this line in Glossary.php version '2008.05.27'

$span->setAttribute('style', 'cursor:help');

to read as:

$span->setAttribute('style', 'cursor:help; color:green');

which now gives me a green Glossary word ... Thanks for the idea ...

--Dick 14:42, 28 May 2008 (UTC)

....................

Excellent! I honestly had no idea HOW to implement it, just wanted to pass on what i'd received in response, thought it might make more sense to someone who is more familiar with all of the code behind this than i am. I am glad it pointed you in the right direction. if i can ever get it back up and running again, i may try the suggestion you just made above.

--Kay

....................

Ok. i found the Glossary.php version '2008.05.27' and installed it and it is working. I tried changing the line as you stated above and it didn't work for me. I still get the little question mark but nothing at all shows up green. not the mark nor the text that the mark appears above when you mouseover.

--Kay

....................

Try clearing your cache - it may be the culprit..

As a matter of interest, a long time ago I placed the following at the end of my LocalSettings.php file

$wgCacheEpoch = max( $wgCacheEpoch, gmdate( 'YmdHis', @filemtime( __FILE__ ) ) );
 * 1) When you make changes to this configuration file, this will make
 * 2) sure that cached pages are cleared.

This does as it suggests and I can edit as I wish ...

--Dick 15:25, 28 May 2008 (UTC)

....................

Ok i have that line in my LocalSettings.php it's actually been there but it isn't at the bottom. do you think that could be causing the problem?

--Kay

....................

Well I reckon that by having it at the end of the script would allow all the setting to be applied and then the cache flushed rather than some setting being set, cache being flushed and then other setting being set afterwards by LocalSettings.php ...

--Dick 08:54, 30 May 2008 (UTC)

Having problems
Ok here is the information from my 'version' MediaWiki 1.12.0 PHP 5.2.4 (apache2handler) MySQL 5.0.44

I installed the glossary.php listed for PHP 5 and I also got the most recent copy of wz_tooltip.js. When i enable glossary.php via LocalSettings.php some of the pages look alright but for others, ( including special pages --> version) display: HTTP 500 Internal Server Error with the text The website cannot display the page

I have tried renaming the wz_tooltip.js so it doesn't get picked up at all and the problem remains. --Kay

...............

Interesting Kay - I also have one page on my wiki which won't display when i have the Glossary active.

If I look at my Apache error log it indicates that I had a 'timeout' ....

I have noticed a small delay on the loading of various wiki pages when Glossary was activated ... I assumed that this delay was due to the Glossary checking the page for 'keywords' and that my page that doesn't load and times out was because of the long time needed to do the check ?? .. Not sure if my theory is correct of course.

Possibly there is a setting in Apache that could alter the timing to load webpages ??

--Dick 11:00, 28 May 2008 (UTC)

...............

While I was on a 'roll' I decided to try out my theory - it appeared to work !!

I edited my 'php.ini' file and modified the time of 30 seconds (default) to 60 seconds

max_execution_time = 30    ; Maximum execution time of each script, in seconds

to

max_execution_time = 60    ; Maximum execution time of each script, in seconds

The page on my wiki which wouldn't load and gave a blank screen when Glossary was activated now loads correctly ...

I suggest that you look at your Apache error log file and see if it indicates a timeout on the relevant 'problem' page and then edit the 'php.ini' file accordingly ..

--Dick 15:20, 28 May 2008 (UTC)

...............

30 seconds seems like a VERY long time to display a page. A small delay? This sounds like you have another problem. What is your server doing that pages are taking so long?

--User:Xkahn 14:53, 29 May 2008 (EDT)

...............

It appeared ONLY on the one page as I mentioned earlier - all the other wiki pages load reasonably fast ... I do have other server daemons running doing other jobs on my Linux box ...

As I said earlier, when I activate Glossary, then I notice a small delay when loading pages compared to when Glossary is deactivated. My 'theory' was that Glossary was referencing the keywords on the relevant page.

My url is http://www.zs6ro.co.za ... (Most of the 'green' words' are from the Glossary) ... The 'problem' page is at http://www.zs6ro.co.za/wiki/index.php/Amateur_radio in case you want to do comparisons but the Internet route delays etc may cloud the issue ... (Of course I'm testing on my LAN without the Internet involved, except maybe on some embedded links on the page. The pictures on the page are all local (on the same box) but possibly each one takes some time to load, adding up to more that the default 30 seconds)

My worharound works but if I can get back to the 30 second default it would make me much happier ..

--Dick 08:42, 30 May 2008 (UTC)

All I get is a Question Mark in the tooltip
Hi, I setup the extension as instructed, and created a few entries in the Glossary page, but when I hover the mouse over the words, all I get is a Question mark next to the cursor instead of the actual tooltip. Any clue what I should do from here? Thanks!

Simon (using MW 1.12)

...............

Make sure that you have 'wz_tooltip.js' installed and that Glossary.php knows which subdirectory its in !!

--Dick 17:23, 28 May 2008 (UTC)

...............

Thanks for the tip.. But I'm still having trouble. It's weird. In glossary.php, I have .

When I look at the Page Source, it resolves as: 

Everything should work, I don't understand. When loading the page, there is an error that says: "TagToTip is not defined"

...............

Check that the sub-directory 'tooltip' is 'tooltip' and not possibly 'Tooltip !! .. In Linux case is very important.

--Dick 08:42, 30 May 2008 (UTC)

...............

SOLUTION: I found the problem. I was using an outdated version of wz_tooltip.js. (Version 3.45) I upgraded to version 5.12 and it works. Thanks to all,

Simon June 16h,2008

Formating in Glossary Page
Hi,

Just a quick question. Can you include formating in the Glossary Page? e.g. can I have subheadings for each letter? Or will this impact the function of the solution?

Thanks

George

..........

That's what i've been trying to find out. People say that you should be able to if you are using the wz_tooltip.js but no one has been able to tell me HOW to implement it. I've been able to get it to work nicely when i actually apply the js to an entry directly ON the page and do mouseover but i can't get it to work when it it pulling information from the glossary page. i think it may have something to do with how the information is passed to the tooltip.

==Kay

..........

Ok. They both are so similar i had to pick one or the other and I've ended up using Terminology.php and with some small modifications to the .php i now have formatting working in the tooltip boxes as well as external hyperlinks. Since some of the discussion on this page seems to cover both Glossary and Terminology and to try to keep things as clear as possible, i am going to document what i did over on the Extension:Terminology discussion page so if anyone wants to use it.. OR (quite possibly) to tell me a better way to do what i did, the discussion will all be attached to the appropriate extension.

==Kay

Pages not displaying
Hi,

I've installed the extension as described and created the Terminology page. The tooltip function appears to work (at least on the Terminology page). However when I go to my other pages in the wiki they are not being displayed. I implemented the php.ini change described above, but it doesn't solve the issue. I had a look the log files and this is what is reported back.

[client 161.30.167.79] PHP Fatal error: Call to a member function on a non-object in /srv/mediawiki/extensions/terminology.php on line 58, referer: http://161.30.167.79/wiki/index.php/CB

The CB page, for example does not contain anything extraordinary other than text.

George .......... Did you check to make sure that your terminology.php is pointing to the correct directory for the location of wz_tooltip.js? i always forget to do that and things get really weird

=Kay

Doesn't work as expected...
Hi

I've been using the previous version of Glossary and was very happy with it... As I upgraded to MW 1.12 it seemed to stop working. I then moved to the new version, and have to say it doesn't do what I expected. Why now doesn't it take care of case ? I end with all 'it' hilighted in green where I would expect only "IT" (Information Technology) to be... Also, previous version had the ability to be turned off when editing, deleting... which was very convenient ! I enjoyed also the simple HTML return code that could easily modified by newby as I am. I changed it to add a link to the acronym page... Is there a way to bring that capability back ?

What is the difference between Glossary and Terminology ? Apart from the fact that Glossary worked straight on my MW 1.12 and I couldn't have Terminology to work :(

Is there a way for Glossary not to parse links (ie I would prefer not to get tooltips on acronyls that are part of a link on page) ?

Thanks in advance for all your help.

Doc Color