PDA

View Full Version : Add a Smilie Button to Quick Reply & Quick Edit


feldon23
Wed 27th Sep '06, 11:57am
This is a simple template modification that adds a Smilie button to the Quick Reply and Quick Edit toolbars which brings up a Smilie popup window. Clicking on any Smilie in the popup window places it in the editor window at the cursor's location. This mod does not add a Smilie popup menu.

Make the changes below in each of these two templates:
Showthread Templates -> showthread_quickreply
Postbit Templates -> postbit_quickedit

Find this:
<td><div class="imagebutton" id="{$editorid}_cmd_wrap0_quote"><img src="$stylevar[imgdir_editor]/quote.gif" width="21" height="20" alt="$vbphrase[wrap_quote_tags]" /></div></td>and Add below it:
<td><img src="$stylevar[imgdir_editor]/separator.gif" width="6" height="20" alt="" /></td>
<td><a href="#" onclick="vB_Editor['$editorid'].open_smilie_window(smiliewindow_x, smiliewindow_y); return false">
<img src="$stylevar[imgdir_editor]/smilie.gif" alt="Smilies" border="0" /></a></td>If you want to change the default smilie "button" that this uses, replace the image located at /images/editor/smilie.gif.

This is derived from a template mod posted on vBulletin.org here (http://www.vbulletin.org/forum/showthread.php?t=93544#post751052).