Version 1.3 timestamp 10:39 11/02/2009
Installation (for moodle 1.9.4)
WARNING: this hack is only intended for people who know what they are doing, at own risk, not to be done on a production server but only on a test server...
copy file filter.php instead of existing moodle/mod/glossary/filter.php
copy folder tooltip to you moodle/mod/glossary/formats
copy file glossary.php to your moodledata/lang/en_utf8_local
NOTE.- If you know how to do it and prefer that solution you can patch your existing filter.php by using patch file glossarypatchjr.txt.
HOW TO USE
For the Gloossary that you wish to display its definitions in a tooltip instead of a link to a popup window as in standard moodle behavior, go to Update this glossary and in Display format select Tooltip definitions display.
1- Because this display system puts into memory not only the Concepts but also the whole definitions, you should not use the Tooltip setting for longish glossaries nor for longish definitions, other wise you might notice a slowing-down of your moodle site. Please experiment.
2- In MSIE 6 and 7 and in FireFox 3 the tooltip definitions are completely displayed, but they are truncated in FireFox 2.
3- When you install this hack you can modify the filter.php file which gives you a choice between 2 kinds of "tooltip display".
a) simple "TITLE" tooltip display
b) more elaborated tooltip display based on the OVERLIB library (standard in Moodle distributions).
The advantage of using the OVERLIB library is that it displays everything in the definition: text formatting, images, etc. However it may refuse to display some "complex" or longish definitions; again, you'll have to experiment and select the type which is best suited to your needs.
If moodlers wish so, I might provide for 2 different formats, to provide easy choice for end-user between display a) and b).
To switch between the 2 kinds of tooltip displays, in file filter.php locate lines 180-190 and comment out the type you do not want to use. Note that the filter.php file (and the patch file) are distributed with the simple TITLE tooltip enabled by default.
If you "play" with the settings you will have to completely empty your moodle cache to see the new display take effetc!!!
post remarks here or contact firstname.lastname@example.org