Q: How do you input each smiley?
A: There are currently two options:
Q: How do I add support for CTI for comments to my theme?
A: If your theme does not already support automatically adding the CTI interface for comments, though most themes do, you may add support by following these instructions:
- Open the comments.php file for your theme and look for the text
<?php do_action('comment_form', $post->ID) ?> - If the text is missing, locate your comment textarea which should be something like
<textarea name="comment" id="comment"></textarea>
and add<?php do_action('comment_form', $post->ID); ?>either above or below the textarea. Wherever you add this line, the CTI scrollbox will appear.
Q: How do I add the CTI interface to any textarea?
A: In the event you have a custom textarea - for whatever reason (i.e. another plugin) - you can add the CTI interface to that textarea. Unfortunately, though you will be able to easily insert the smiley shorthand to a custom textarea, additional modification may be necessary for the inserted shorthand to be converted to graphical smileys.
- You can use the function
<?php tse_cti_anywhere( 'target', OUTPUT ); ?>
where 'target' is the ID of the textarea you are using and OUTPUT is boolean TRUE or FALSE. Simply add the provided function wherever you want the clickable smileys to appear. - Set OUTPUT to TRUE to echo the CTI smileys to the page, and FALSE to use the output of the function in a variable.
- 'target' defaults to 'comment' if not set.
- OUTPUT defaults to TRUE if not set.
Q: How do you change the spacing between the CTI smileys?
A: There are two properties that can affect the spacing of the CTI smileys. Depending on your theme, you may need to modify one or both properties to change the spacing. To be safe, you should plan on modifying both by inserting the following code at the end of your theme's style.css file.
#tseCTIsmileys-comment img {
margin: 0px;
padding: 1px;
}If you want to increase the spacing, leave the margin set to 0px and increase the padding.
Q: I see the smileys, but nothing happens when I click them. How do I fix it?
A: There are a couple of things that can cause the smileys to not be clickable. The first is simple, and the other problems and solutions require basic knowledge of HTML.
- MCEComments is enabled: Unless you are using the MCEComments plugin, there is no reason to have MCEComments enabled for Tango Smileys Extended. Open the TSE Options page and make sure MCEComments is unchecked. Even if it looks unchecked, click Update Options anyway.
- Wrong ID: Tango Smileys Extended finds the comment textarea by looking for its ID, which is almost always comment. If your comment textarea has an ID other than comment, then TSE can't find it. You should check your theme's comments.php file to make sure the textarea has an ID of comment. If the ID is not comment, then change it. It should look something like this:
<textarea name="comment" id="comment" rows="10" columns=""></textarea>
- Invalid HTML: Valid HTML requires that no two elements have the same ID. Unfortunately, sometimes theme authors forget to check IDs before creating a new element, and the new element will have the same ID as an existing element. The textarea for the comment form will almost always have an ID of comment, so if another element on the page is given an ID of comment then TSE will not work. The easiest way to check for this is to load a post on your site and view the source. You should search for id="comment". If you find more than one (which should be the comment textarea), then you need to edit your theme and change the conflicting element.