WordPress.org

Ready to get started?Download WordPress

Forums

CM Tooltip Glossary
[resolved] [Plugin: EnhancedTooltipGlossary] Multi-word term overridden by single-word term (7 posts)

  1. iamarogue
    Member
    Posted 1 year ago #

    I'm having a problem with teaching the plugin which term to use. My glossary includes the following terms:

    -"public"
    -"public engagement"
    -"public engagement initiative"
    -"public engagement mechanism"

    The glossary was always defaulting to displaying the definition for "public", so I ended up deleting that definition, and now it defaults to "public engagement." I've tried changing the dates (since I thought it might default to older) but no luck.

    Could you at least tell me what the default behaviour is for the plugin? Does it choose the first term that matches based on... post ID? I could probably figure out a workaround if I knew how it did the logic.

    However, I do have a request (for later): could you make sure the plugin keeps reading the string of text until there is only one match? Or, at the very least, let the user order the terms in the order they would like to be matched? (i.e. "public engagement initiative" takes priority over "public")

    http://wordpress.org/extend/plugins/enhanced-tooltipglossary/

    [ Please do not bump, it's not permitted here. ]

  2. figureone
    Member
    Posted 1 year ago #

    Hey maintainers,
    I've got a fix for this. Is there a good way for me to get the code to you so you can incorporate it in version 1.2?
    i've added two fixes to the code: first is sorting the glossary terms by length (so longer terms get replaced first), and second is not making replacements if a term is already within an anchor tag.

  3. figureone
    Member
    Posted 1 year ago #

    You can see the patch here:
    http://pastebin.com/mykzTmH1
    If you want to give me svn access, I can commit it to the repo, too.

  4. CM Plugins
    Member
    Plugin Author

    Posted 1 year ago #

    Thanks for the code. We integrated in the last version release 1.2 which also include other new features.

  5. figureone
    Member
    Posted 1 year ago #

    Awesome, thanks guys!

  6. daggerdragon
    Member
    Posted 1 year ago #

    This fix works as expected on posts and pages, but within glossary definition pages (the auto-generated ones), multi-word terms get overridden by their simpler counterparts.

    For example, I have "commission" and "commission schedule" defined as glossary terms. On the definition page for "Commission Schedule", every time I type "commission schedule", "commission" gets highlighted unnecessarily.

    Could you give us an option to turn this on/off? A simple way would be to auto-wrap same-page terms with [glossary_exclude].

    Thank you!

  7. CM Plugins
    Member
    Plugin Author

    Posted 1 year ago #

    Please check if the last version 1.4 fix this issue. It should

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic