Support » Plugin: jQuery Comment Replies » [Plugin: jQuery Comment Replies] replace text with image

Viewing 4 replies - 1 through 4 (of 4 total)
  • For those who want to put a static image, simply remove the line

    $(this).text( $(this).text().innerHTML==

    Plugin Author Doodlebee


    Hi mauriciomesquita,

    I was away on a family emergency last week, but I saw your question on my site. I’ll repeat what I said over there:

    “Do you mean how to replace the text with an image?

    Open up “jQuery-comments.php”, and around line 35, look for function start_lvl(&$output, $depth, $args) {

    That’s the function that has the text (“Show Replies” and “Hide Replies”) for the expansion trigger. Just replace the text with the image call. You have to make sure the image path is correct, too (relative paths don’t work, unless you upload the image in the plugin directory).

    This sounds like perhaps I should make an option page, to edit the text and/or use an image? I could do that for a future release… thanks for the idea!”

    Your idea might be better in a separate functions.php file – that way you don’t have to edit the core plugin file (and thus have it overwritten when I update it).

    Hello, thanks for the help! The plugin is fantastic, very smart.

    This function is the “starting point” the text “Show Replies”. And I realy can replace “Show Replies” for a image!

    But, in practice, when I click on the image to expand comments and display the responses appears the text “Hide Replies”. And clicking again appears the text “Show Replies” and not the image.

    This text is in line 275:

    $(this).text( $(this).text() == ‘Show Replies’ ? ‘Hide Replies’ : ‘Show Replies’);

    However, replace this text for the image code displays the image code rather than the image itself.

    sorry my english, I’m brazilian
    Thanks again

    Plugin Author Doodlebee


    Ah! Yes. You’re correct – thanks for pointing that out.

    I do like this idea though – I’ll definitely incorporate this into the next release, so you can easily change this sort of thing. 🙂

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘[Plugin: jQuery Comment Replies] replace text with image’ is closed to new replies.