Support » Fixing WordPress » Smilies not showing in comments

  • I’ve implemented the WP-Grin smilie hack and have run into a problem that so far, no one has been able to fix. I added the smilies to my admin page so that I can use the smilies in my posts and they show up fine.
    I also added the smilies to my “wp-comments.php” page and the smilies are there. You can click on them and the code is even inserted into the text box but once the comment is posted, no smilies show up in the actual comment. When I go to look at the source code, I see this, instead of the smilie, I see this:

    Testing again!  

    Things I’ve checked:
    1. All of my option settings both pertaining to the comments and not pertaining directly to comments. My smilies are enable, the path is correct and everything else appears to be okay.
    2. ISO-8859-1 settings. Both my HTML/Test and WP are set to that
    3. I’ve searched the forums for a similar issue and cannot find one
    Does anyone have any idea why my smilies aren’t being coded correctly or why they’re not showing up?? I’m desperate at this point as I’ve racked my brain and can’t figure out what could be causing this.
    Thanks,
    Daisyhead

Viewing 8 replies - 1 through 8 (of 8 total)
  • hmm, i know this is of no help, but i have exactly the same problem. I implemented wp-grins today and the grins work like a charm in main post, but not in comments.
    No help, i know, but at least you know it’s not just you who has this problem 😉
    -perry

    maybe u need to specify absolute paths for the smiley folder. not sure… have not implemented yet…

    I tried using an absolute path and nothing. I believe it has to do with this thread, but I’m not sure how I need to attempt to fix this. Maybe an upgrade would do the trick? I’m a bit nervous about upgrading though.
    Daisyhead

    Try this–Template functions.php for showing smilies. 🙂 Line 1725 or so. Right after
    function comment_author_IP() {
    global $comment;
    echo stripslashes($comment->comment_author_IP);
    }
    but before
    function comment_date($d=”) {
    global $comment, $dateformat;
    if ($d == ”) {
    echo mysql2date($dateformat, $comment->comment_date);
    } else {
    echo mysql2date($d, $comment->comment_date);
    }
    }
    Replace with this:
    function comment_text() {
    global $comment;
    $comment_text = stripslashes($comment->comment_content);
    $comment_text = str_replace(‘<trackback />’, ”, $comment_text);
    $comment_text = str_replace(‘<pingback />’, ”, $comment_text);
    $comment_text = convert_chars($comment_text);
    $comment_text = convert_bbcode($comment_text);
    $comment_text = convert_gmcode($comment_text);
    $comment_text = make_clickable($comment_text);
    $comment_text = balanceTags($comment_text,1);
    $comment_text = apply_filters(‘comment_text’, $comment_text);
    $comment_text = convert_smilies($comment_text);
    echo $comment_text;
    }
    There are many threads about this on the board…I found this using search.

    SG, you’re a genius. They’re showing up now. What change was it that fixed it?
    WHEW! YAY! *does happy dance*
    Thank you! Thank you! Thank you!
    -Daisyhead

    So my smiles work, but you still can’t bold text, or add links to my comments either. Off to search for this one…
    -Daisyhead

    Glad that it worked. 🙂 It’s just a place in the code that has $comment_text = convert_smilies($comment_text); in it actually. I don’t know what version you are using, for the bold/links problem, but I’m sure the answer is out there.

    Mnn….strange, after I add in
    $comment_text = convert_smilies($comment_text);
    it still doesn’t show up the wp_grins Hack

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Smilies not showing in comments’ is closed to new replies.