WordPress.org

Ready to get started?Download WordPress

Forums

Custom Smilies SE hack for if you use the PHP function to display the emoticons (1 post)

  1. Dgold
    Member
    Posted 5 years ago #

    This is an awesome plugin.

    http://wordpress.org/extend/plugins/custom-smilies-se/

    But for those who want to use the PHP call instead of automatically placing the emoticons below your comments form.

    This is the PHP to put in your Comments template,
    <?php if ( function_exists(cs_print_smilies) ) {cs_print_smilies();} ?>

    To make it work without displaying twice (such as above and below your Comments form), you may need to hack the plugin code like this for now:

    You can remove the line 368 in for25.php, so it will be the same as 2.2.

    And now a secret tip for anyone who didn't feel like counting 368 lines. The line to remove is this:
    add_action('comment_form', 'cs_print_smilies');

    The plugin author has said he will work on adding an optional switch so it won't be necessary to hack the code for this then.

    I have had to do this 2 or 3 times now, when upgrading. It took me a while to find the line # in the code again, or the post on the author's blog about it, so I decided to post this here for all.

Topic Closed

This topic has been closed to new replies.

About this Topic