• Resolved pscolv

    (@pscolv)


    Hi,

    I’ve installed this plugin and it’s perfect for the cooking terms glossary I’m using it for. However I miss the possibility of adding pictures to illustrate some of the terms. I’ve been looking into the code and I don’t see any filter allowing me to hook such a capability, and I guess it could be a valuable enhancement to get this possibility, ie at least a filters on admin & public sides, and at best the “add picture” function itself.

    Thanks in advance !

    • This topic was modified 6 years ago by pscolv.

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Jeroen Peters

    (@jeroenpeters1986)

    Hi @pscolv,

    thank you for your kind words, I am glad that you are using it! Nice website byt the way!

    The Name Directory was designed for text only in the beginning, but in time I have changed it to be HTML compatible, so everyone with HMTL knowledge can markup their description as they like.

    I hope this can be a solution for you too. When you upload files in the Media Library you can see the URL’s of the images to add them with an image tag like <img src="https://goutu.org/pic.jpg">.

    It’s not as easy as a full blown editor, but for the majority of the people this works perfectly (just text). With it’s “hidden” HTML capabilities I hope to give some power to webmasters, but this way I can keep the plugin as simple as intended.

    Would this maybe work for you?

    Kind regards,

    Jeroen Peters

    Plugin Author Jeroen Peters

    (@jeroenpeters1986)

    Hi @pscolv,

    I was wondering if my reply work for you?

    Kind regards,

    Jeroen Peters

    Thread Starter pscolv

    (@pscolv)

    Hi Jeroen,

    Actually I was referring to something a bit more automated as plain insertion. Images are just an example, but to make the plugin really scalable and matching different use cases (buttons, etc…) it would be good to add wordpress filters and actions within, both on admin and front-end sides.

    Example in file shortcode.php, function name_directory_show_directory :

    Line 306 : $print_description = apply_filters( ‘name-directory-description’, html_entity_decode(stripslashes($entry[‘description’])), $entry, $directory );

    Line 321 (after the echo) : do_action( ‘name-directory-in-loop’, $entry, $directory);

    I hope you see what I mean there,

    Regards,

    Pascal.

    Plugin Author Jeroen Peters

    (@jeroenpeters1986)

    Hi Pascal,

    Thanks for your explaination. Not many people ask to have images in the descriptions, and that is why I don’t have a full-blown HTML editor in there at the moment, because it could easily pose styling problems (which people will report here, while I can’t help).

    I am happy with your example code, I did not know how such a thing would work. This is something that I can implement without the risk of being too-much. As a developer you can hook in to those actions and the normal users will not see it.

    Thanks again, I will checkout how I will implement it and see if there are more places to hook.

    Kind regards,

    Jeroen Peters

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Feature request : add picture’ is closed to new replies.