• Resolved kukiko

    (@kukiko)


    Hi there,
    We are looking for a Glossary plugin that can:

    • create terms in different categories (Glossary does that)
    • show a list of terms that are in a certain category (Glossary does that)
    • show a list of terms that are in the text of the current page or post, in a certain category.

    Is there a shortcode for this too? Or in the Premium version?

    Thanks

    Rianne
    Kuki+Ko

Viewing 11 replies - 1 through 11 (of 11 total)
  • Plugin Author Daniele Scasciafratte

    (@mte90)

    HI,
    so for the 3rd point you can do in this way:

    * Inside a page where the glossary plugin will inject terms you can set what taxonomy to use to pick the terms
    * To get a list instead that injected in the article you can use the footnote mode like in this page https://demo.codeat.co/glossary/wiki/back-to-the-future/

    If I am not wrong footnotes are for premium customers https://docs.codeat.co/glossary/premium-features/#footnotes

    Closing after 2 weeks.

    The idea is to have two or more widgets (let’s call them widgets) on the page, that ONLY show the terms that are in this specific posts.

    So it the post was this, and the Bold words where in category A and the Italic words are in catergory B:

    Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi ac lacus fermentum, mollis ex sed, bibendum felis. Pellentesque pharetra condimentum justo vitae mollis. Ut id dui fringilla turpis gravida ullamcorper et a quam. Aliquam erat volutpat. Proin ut pellentesque tortor. Curabitur dictum viverra gravida. In faucibus diam ut mi sodales, vel lobortis dolor dapibus.

    Then the page would display the post, with those words tooltipped, as glossary already does, but somewhere else on the page would be two block like this:

    Cat A
    ipsum – Nunc sit amet turpis rutrum, pulvinar eros.
    Morbi – Nullam at tellus at tortor imperdiet pretium.
    lacus – Nam scelerisque congue dictum. Duis dapibus ex.

    Cat B
    consectetur – Praesent id ante ut lectus sodales pulvinar.
    fermentum – Aliquam scelerisque malesuada dictum. Pellentesque at ante.

    So, to the side of the page you would find ONLY those words that where used in that specific post, with their explanation (the same text as would be shown in the tooltips).

    I don’t believe the solution you gave is the right one.
    We want this to go ‘automagically’, so once we create the glossary with all the terms divided up in to categories, for every post that contains some words from the glossary, those words would be tooltipped (as glossary does) AND we would want to dispay those words at the side of the page (in a widget maybe).




    Hi acesaurus,
    so those are more details compared to the firrst support request.
    Right now the settings in the post are for the global injection, the shortcode will just ignore them if used so you can’t use for a section a specific set and another in the same page with another set of terms.

    You can only use the global injection that will use the post settings and the shortcode the global one.

    Moving on to shows those details in a widget is not possible as we just hook in the content and do a search on the fly, we have the footnote mode that shows the content found in the page bottom but of course on the whole term list.

    Hi Daniele, thanks for the answer! So, if I understand right, footnote mode does only show the words found in the post. I will look at that and then get back to you.

    You can see a demo of the footnote on https://demo.codeat.co/glossary/wiki/back-to-the-future/ that is available with the pro version.

    Hmmmmmm I bought the pro version but enabling footnotes does nothing.
    It the docs it says: ‘If your site contains footnotes’… do I need to do something special to have my post contain footnotes? Is there a code or something to make words footnotes? The glossary words don’t turn into footnotes?

    Sorry, I got it, you need to go to settings and enable footnotes.

    I used the footnote stuff to make something similar, but of course this is not nearly usable code.
    1. need to set the dropdown ‘tooltip’ or ‘tooltip and link’.
    2. need to use the pro versioon
    3. need to set the extra-footer to ‘link’ (if you set to excerpt, something breaks.. ?!??!?!)
    4. to be done: figure out how to show these in categories. It just list them all like the footer stuff, but it still shows the tooltip (what we want) AND a list of words at te bottom of the page (shoud also have excerpts).

    In /usr/share/wordpress/wp-content/plugins/glossary-by-codeat-premium/frontend/Core/Term_Injector.php at line 109

                        $this->regex_match();
                        $this->replace_with_utf_8();
                            $this->regex_match();
                            $this->replace_with_utf_8();
    
    //Ace
                            $type = new Type\TermsList;
                            $type->initialize();
                            $this->text .= $type->append_content( $this->terms_to_inject );
    
    // end Ace
    
                            if ( \gt_fs()->is_plan__premium_only( 'professional' ) ) {
    

    So this code is always on, not what you want, but okay for is.

    A new file in /usr/share/wordpress/wp-content/plugins/glossary-by-codeat-premium/frontend/Core/Type/ just a copy of Footnote.php, the file named Termslist.php,

    with these changes:
    class TermsList extends Engine\Base {
    *** instead of Footer

    public function html( array $atts ) {
    return;
    // array( 'before' => '', 'value' => $atts[ 'replace' ] . '', 'after' => '' );
    }

    *** don’t add anything to the word it self (it already has a tooltip and/or link)

    /* if ( !\is_type_inject_set_as( 'footnote' ) ) {
    return '';
    }
    */

    *** removed this to make it work

    that was it.

    So the TermsList thing is always included (which is okay for us but not for others of course) and it makes a list of words (like footnotes) while not touching the tooltips or links. It would be nice to get the excerpts working, and then of course to get the categories working, and that would be great at the end of the page, even better if they could move to the side somehow (maybe with css or so).

    I realize this is a mess but I hope you understand what we need and want.

    Footnote is a premium feature and you are now a premium customer.

    It is better to move on our ticket platform so we can discuss if we need to add filters and other things more easily, as the wp.org forum doesn’t allows discussions for premium versions.

    https://support.codeat.co/

    ok

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘How to show only the terms that are in the current page or post’ is closed to new replies.