Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Contributor pewgeuges

    (@pewgeuges)

    @mushlih

    You may enumerate the classes in a comma-separated list:

    
    .class_a, .class_b, .class_c,
    .class_d, .class_e, .class_foot {
        /* styles */
    }
    

    There will be a better answer depending on what exactly you wish to achieve.

    Best regards.

    Thread Starter Mushlih Almubarak

    (@mushlih)

    It’s not possible because it will take up my time, because there are tons of footnotes on my site

    what exactly you wish to achieve.

    I use this plugin to show tours to my users, so if someone hovers over to the footnote, there will be a tour that says “Click here to view notes”.
    And the plugin uses a class to determine when the tour will be displayed, so it is impossible for me to adjust the class one by one because it will take a lot of time.

    Plugin Contributor pewgeuges

    (@pewgeuges)

    @mushlih

    There are two ways to set up the intended user experience:

    1. Using third-party tour

    The class footnote_referrer is already assigned to all footnote referrers’ enclosing span.

    If the plugin can be set to trigger the tour on hovering any element with this class, it should work.

    If the plugin does not support class name configuration, and provides its own class for users to add it on their websites, then you need to use a custom template. That is safe and easy thanks to @misfist code contribution, enabling you to keep the template in the location of your choice. Maybe the easiest is maintaining it in a plugin folder at wp-content/plugins/footnotes-custom/templates/public/footnote.html. In your copy of current footnote.html, add the new class, e.g. tour_trigger_class:

    
    <span
    	class="footnote_referrer tour_trigger_class"
    

    2. Using Footnotes tooltips

    The Footnotes plugin’s built-in tooltips show the content of the footnote that the referrer is being hovered of. If the tooltip should say “Click here to view notes” instead, that is not possible on your website, because currently the Footnotes plugin displays a dedicated tooltip text only when the footnote starts with this text, and the text is followed by a (configurable) shortcode [‌[/tooltip]].

    But on most websites, displaying the footnote content is the expected behavior of referrer tooltips.

    Maybe your website is among the websites where Footnotes’ jQuery tooltips don’t display while enabled (by default). Then you may enable alternative tooltips instead, in the dashboard under “Referrers and tooltips” > “Tooltips” metabox > Display alternative tooltips: Yes.

    Hope that one of these solutions is acceptable and works for you.

    • This reply was modified 5 years ago by pewgeuges. Reason: prevent wikilink parsing, reset to “[‌[/tooltip]]”
    • This reply was modified 5 years ago by pewgeuges.
    Thread Starter Mushlih Almubarak

    (@mushlih)

    It worked! The first way worked for me! Thank you very much.
    But … I have 3 footnotes on a post, when I move the cursor to footnote 3, the tour says “Click here to see the note” in the first footnote, not in the third footnote, do you know why?

    Plugin Contributor pewgeuges

    (@pewgeuges)

    Glad to hear it works. The mismatch is probably due to the way the tour is set up regarding the “here”. If “here” is a link to the first footnote, then it doesn’t work for the other footnotes. Without checking an example page I can’t tell too much, but probably the tour should direct your visitors to click right on the respective footnote referrer (“Click the number to see the note”).

    • This reply was modified 5 years ago by pewgeuges.
    Thread Starter Mushlih Almubarak

    (@mushlih)

    Without checking an example page

    Alright, I just made it here
    Now try to do:
    1. Visit the page, you will see there are 3 footnotes on the page
    2. Hover over to footnote 3, then see what happens
    3. Strange! what happens is the tour runs on the first footnotes, and not the 3rd.
    I’ve also applied footnote_referrer to the “Reference selector” and “Selector” sections of the tour plugin.
    I also don’t mind giving you admin access because it’s just a staging site.
    Thank you

    Plugin Contributor pewgeuges

    (@pewgeuges)

    @mushlih,

    Thank you for the example page, and for asking this question also on the forum of the tour plugin as the issue seems to be due to a limitation built into the (free version of?) the plugin, that I’ve just installed to look into it. When you hover the info button in the “Reference Selector” table header, the tooltip says: “[…] In case of selector for multiple elements, first is used.” That matches the behavior you are experiencing, in that if more than one element is selected by a selector that is a class, not an identifier, then only the first element having that class is considered, and even if the tour is replicated for the other elements with the class, it will be the same tour than for the first one.

    Therefore, I’d advise that you use the tour as a general tutorial to using footnotes, telling e.g. that clicking on the small numbers takes each one to its footnote at the bottom of the page, and there will be a link to get back up to resume reading the post.

    I will also mention that (like other footnotes plugins) Footnotes has a built-in feature that displays a tooltip on hovering a footnote referrer, and (unlike a generic tour) this tooltip displays the content of the footnote. If you have very large footnotes with several paragraphs and/or embedded media (some of which may already show up in the tooltip), you may use the truncation feature and configure the Read-on link text e.g. to tell: “Click here to see the full note”.

    I hope that this meets your requirements, as I don’t see any other solution now.

    Thread Starter Mushlih Almubarak

    (@mushlih)

    I will also mention that (like other footnotes plugins) Footnotes has a built-in feature that displays a tooltip on hovering a footnote referrer, and (unlike a generic tour) this tooltip displays the content of the footnote.

    Thanks a lot for explaining, but does your plugin have a feature where when someone scrolls the page to the footnote a tooltip will be displayed? So the user doesn’t have to hover over the footnote, but only scroll the page until the footnotes are visible, then the tooltip of your plugin will be displayed.

    Is there such a feature? If not, is it possible to include it in future features?
    Thank you very much for this great plugin

    Plugin Contributor pewgeuges

    (@pewgeuges)

    when someone scrolls the page to the footnote a tooltip will be displayed?

    I’m sorry, that is not possible with this plugin.

    Is there such a feature? If not, is it possible to include it in future features?

    The developers of the plugin may eventually pick it up and include it.

    Meanwhile and anyway, the first footnote referrer that your visitors see is almost always the first one, so the tour you have set up teaches how to access the footnotes and may get your visitors into the habits of hovering and clicking the referrers as they encounter them while reading the post. That is the usual way of handling footnotes. Sometimes authors draw attention to a particular footnote by mentioning it in the text. If you have footnotes that exceed the usual scope of sourcing and providing details, you might wish to make individual pages out of them instead, so your visitors may access them directly from the home page, a category page, or a SERP, additionally to citations and links in other posts’ footnotes.

    Auto displaying footnotes on merely scrolling the page is implemented on a number of websites by JavaScript so that all footnotes whose referrers are well in the viewport fill its bottom in stacked divs. But the bottom only. And these footnotes consist of fairly short references. Tooltip display covers content and should not be triggered without an explicit user action such as hovering a small area (hence their name).

    Glad to hear you enjoy the plugin, and thanks for your feedback.

    • This reply was modified 5 years ago by pewgeuges.
    Thread Starter Mushlih Almubarak

    (@mushlih)

    Thank you very much

Viewing 10 replies - 1 through 10 (of 10 total)

The topic ‘Make All Classes the Same’ is closed to new replies.