Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Please say, is there a way to display glossary terms as tooltip/popup?
Comments
Comment #1
fgmNot sure about what your asking there. Could you explain in what context you'd want this type of display ? Or ideally make up an image showing what you mean.
Comment #2
fgmBump. No more details on that request ?
Comment #3
clashar CreditAttribution: clashar commentedSorry for long delay,
I meant that description for the term as a tooltip (pop-up) would be very good feature.
For example I browse your page http://www.riff.org/articles/produits, and see PHP term that is underscored/linked and it would be good to see the description as tooltip when you mouse hover a term without going to another page http://www.riff.org/g2/entries/PHP.
Comment #4
fgmInteresting feature, although it has a database cost. I added it in today's dev version, which should be rerolled in the next 12 hours. Thanks for the idea.
Comment #5
clashar CreditAttribution: clashar commentedMerci beaucoup for quick reply! I hope both the terms and descriptions could use Unicode (for French/Cyrillic) characters?
Comment #6
fgmThis is not a problem indeed. There used to be some problems with URLencoding of fragments for cyrillic, but only on sites without clean URLs, which are no longer supported anyway.
Comment #8
clashar CreditAttribution: clashar commentedI've checked "Enable tooltips on definitions" in G2 settings page, terms are linked, but my definitions still do not show as tooltip.
How could I check, maybe terms should be wrapped with some div tags or ..?
Comment #9
fgmHave you cleared your cache after changing that setting ?
Please post a dump of the HTML being generated for such a link. For
<dfn>CSS</dfn>
, it should look like<a href="http://drop6/g2/entries/CSS" class="g2-dfn-link" title="Cascading Style Sheets">CSS</a>
, assuming a definition for CSS exists in your local glossary.Comment #10
clashar CreditAttribution: clashar commentedyes, I cleared my cache.
I looked in Firebug for the linked term, it seems that "title" is empty:
école
what could I try to test?
Comment #11
clashar CreditAttribution: clashar commentedsorry didn't put code well:
Comment #12
fgmThe tooltip is taken from the node teaser, which in G2 is also the "Entry expansion (for acronyms) or translation" on the edit forms, which appears by default as "In other words" on node views.
In your case, you have left that field empty so G2 displays it as you created it: empty.
Comment #13
clashar CreditAttribution: clashar commentedfgm,
thank you, it works now!
one minor bug for me, at the end of the tool-tip line there is
<br />
tag, I checked the field "Entry expansion (for acronyms) or translation: " and deleted any unseen characters on the line's end, but this br tag still appears.any hint?
Comment #14
clashar CreditAttribution: clashar commentedComment #15
fgmI suppose your configuration for the Filtered HTML input format includes the (default core) LF to BR filter. Since G2 uses teasers, which have a format (unlike titles, which are plain text), it needs to apply the input format for the teaser; so if your content includes a new line after that filter, this will be converted by the core filter to a BR.
I am not able to reproduce the problem on a test site, though.
Comment #16
clashar CreditAttribution: clashar commentedI checked my Filter HTML, there was no BR, then I added. But anyway BR tag appears in tooltip.
I tested to save node in Full HTML format, only then BR tag dissapeared. No matter in which format G2 entry was saved.
So maybe I should just to save node with G2 terms only in Full HTML node.
Comment #17
fgmThis is a solution. You can also analyze further which filter causes this: on my test system, even with the end of line converter, these never appear, so it is probably an other filter. At any rate, this does not appear to be a G2 issue.