The documentation illustrates how to add smiles to comments via a pop up window.
I want the smiles to be right bellow the input form with no pop up window.
Can someone please post some code as to how to do this?
This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.
The active forums are here.
November 06, 2010 10:23am
Subscribe [2]#1 / Nov 06, 2010 10:23am
The documentation illustrates how to add smiles to comments via a pop up window.
I want the smiles to be right bellow the input form with no pop up window.
Can someone please post some code as to how to do this?
#2 / Nov 07, 2010 2:34pm
Hi George K,
Something like this should work:
1. Add the following block of code to your template where you want the list of smilies to appear:
<table border="0" width="100%" cellpadding="6" cellspacing="1">
{exp:emoticon columns="4"}
<tr class="row">
<td class="red"><div>{smiley}</div></td>
</tr>
{/exp:emoticon}
</table>2. Add this code to your template HTML head:
<script language="javascript">
<!--
function add_smiley(smiley)
{
document.getElementById('comment_form').comment.value += " " + smiley + " ";
document.getElementById('comment_form').comment.focus();
}
//-->
</script>As you can see this is just a slightly modified version of the example in the documentation.
Cheers
Greg