---Attention: There's a newer version of this hack in the next post! ---
Well, just in case someone's still waiting for a solution of this problem, I found a solution.
You need the "Tooltips"-Plugin by Enrico Stahn as well as the "Glossary"-Plugin by Rob Antonishen.
Make sure that the Glossary-Plugin appears in the List of Plugins above the Tooltips plugin!
After that you have to edit the file "plugins/serendipity_event_glossary/serendipity_event_glossary.php".
Starting at line 210, you'll find the following code:
Code: Select all
if (serendipity_db_bool($this->get_config('markall',false))) {
if ($this->get_config('type')=='HILITE') {
$text = preg_replace($_pattern, '<span title="' . $glossaryitem[1] . '" class="serendipity_glossaryMarkup">$1</span>', $text);
} else { /* 'APPEND' */
$text = preg_replace($_pattern, '$1<sup><span title="' . $glossaryitem[1] . '" class="serendipity_glossaryMarkup">[?]</span></sup>', $text);
}
} else {
if ($this->get_config('type')=='HILITE') {
$text = preg_replace($_pattern, '<span title="' . $glossaryitem[1] . '" class="serendipity_glossaryMarkup">$1</span>', $text, 1);
} else { /* 'APPEND' */
$text = preg_replace($_pattern, '$1<sup><span title="' . $glossaryitem[1] . '" class="serendipity_glossaryMarkup">[?]</span></sup>', $text, 1);
}
}
Now we simply change the code so that no longer a <span>-Tag is used - we want the plugin to use the [s9y-tooltips]-Tag that is being provided by the Tooltips-Plugin:
Code: Select all
if (serendipity_db_bool($this->get_config('markall',false))) {
if ($this->get_config('type')=='HILITE') {
$text = preg_replace($_pattern, '[s9y-tooltips ' . $glossaryitem[1] . ']$1[/s9y-tooltips]', $text);
} else { /* 'APPEND' */
$text = preg_replace($_pattern, '[s9y-tooltips ' . $glossaryitem[1] . ']$1<small>[?]</small>[/s9y-tooltips]', $text);
}
} else {
if ($this->get_config('type')=='HILITE') {
$text = preg_replace($_pattern, '[s9y-tooltips ' . $glossaryitem[1] . ']$1[/s9y-tooltips]', $text, 1);
} else { /* 'APPEND' */
$text = preg_replace($_pattern, '[s9y-tooltips ' . $glossaryitem[1] . ']$1<small>[?]</small>[/s9y-tooltips]', $text, 1);
}
}
Please note that I made two other small changes to the code: If you choose to have a small [?] appended to the word, this [?] will be formatted using <small> instead of <sup>. And, last but not least, even if you choose "append", you can point your mouse at the whole word to see the tooltip.
For an exmaple, have a look at
this entry at
my blog.