##############################################################
## MOD Title: Simple Quick Reply - Add Smilies
## MOD Author: Nightrider < > (Blake) http://4fxearth.net
## MOD Description: Adds emoticons to the simple quick reply box...
## MOD Version: 1.0.0
##
## Installation Level: Easy
## Installation Time: 1 minute
## Files To Edit: viewtopic.php
##                templates/subSilver/viewtopic_body.tpl
## Included Files: n/a
##############################################################
## For Security Purposes, Please Check: http://www.phpbb.com/mods/ for the
## latest version of this MOD. Downloading this MOD from other sites could cause malicious code
## to enter into your phpBB Forum. As such, phpBB will not offer support for MOD's not offered
## in our MOD-Database, located at: http://www.phpbb.com/mods/
##############################################################
## Author Notes:
##
##############################################################
##
## MOD History:
##
##    2008-01-27 - Version 1.0.0
##       - Initial release
##
##############################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
##############################################################
#
#-----[ OPEN ]------------------------------------------
#
viewtopic.php
#
#-----[ FIND ]------------------------------------------
#
include($phpbb_root_path . 'includes/bbcode.'.$phpEx);

#
#-----[ AFTER, ADD ]--------------------------------------
#
include($phpbb_root_path . 'includes/functions_post.'.$phpEx);
#
#-----[ FIND ]------------------------------------------
#
// Simple Quick Reply MOD
//
if ( ($is_auth['auth_reply']
{
#
#-----[ AFTER, ADD ]------------------------------------
#

	// Generate smilies listing for page output
	generate_smilies('inline', PAGE_POSTING);
#
#-----[ OPEN ]------------------------------------------
#
templates/subSilver/viewtopic_body.tpl

#
#-----[ FIND ]------------------------------------------
#
<table
#
#-----[ BEFORE, ADD ]------------------------------------------
#
<script language="JavaScript" type="text/javascript">
<!--

<!-- BEGIN switch_quick_reply -->
// Helpline messages
b_help = "{L_BBCODE_B_HELP}";
i_help = "{L_BBCODE_I_HELP}";
u_help = "{L_BBCODE_U_HELP}";
q_help = "{L_BBCODE_Q_HELP}";
c_help = "{L_BBCODE_C_HELP}";
l_help = "{L_BBCODE_L_HELP}";
o_help = "{L_BBCODE_O_HELP}";
p_help = "{L_BBCODE_P_HELP}";
w_help = "{L_BBCODE_W_HELP}";
a_help = "{L_BBCODE_A_HELP}";
s_help = "{L_BBCODE_S_HELP}";
f_help = "{L_BBCODE_F_HELP}";


// Shows the help messages in the helpline window
function helpline(help) {
	document.post.helpbox.value = eval(help + "_help");
}


function emoticon(text) {
	var txtarea = document.post.message;
	text = ' ' + text + ' ';
	if (txtarea.createTextRange && txtarea.caretPos) {
		var caretPos = txtarea.caretPos;
		caretPos.text = caretPos.text.charAt(caretPos.text.length - 1) == ' ' ? caretPos.text + text + ' ' : caretPos.text + text;
		txtarea.focus();
	} else {
		txtarea.value  += text;
		txtarea.focus();
	}
}


function bbfontstyle(bbopen, bbclose) {
	var txtarea = document.post.message;

	if ((clientVer >= 4) && is_ie && is_win) {
		theSelection = document.selection.createRange().text;
		if (!theSelection) {
			txtarea.value += bbopen + bbclose;
			txtarea.focus();
			return;
		}
		document.selection.createRange().text = bbopen + theSelection + bbclose;
		txtarea.focus();
		return;
	}
	else if (txtarea.selectionEnd && (txtarea.selectionEnd - txtarea.selectionStart > 0))
	{
		mozWrap(txtarea, bbopen, bbclose);
		return;
	}
	else
	{
		txtarea.value += bbopen + bbclose;
		txtarea.focus();
	}
	storeCaret(txtarea);
}

<!-- END switch_quick_reply -->

//-->
</script>

#
#-----[ FIND ]------------------------------------------
#
<!-- BEGIN switch_quick_reply -->
<tr>
#
#-----[ AFTER, ADD ]------------------------------------------
#
			<td class="row1" valign="middle" align="center">
			  <table border="0" cellspacing="0" cellpadding="5">
				<!-- END switch_quick_reply -->
				<!-- BEGIN smilies_row -->
				<tr align="center" valign="middle">
				  <!-- BEGIN smilies_col -->
				  <td><img src="{smilies_row.smilies_col.SMILEY_IMG}" border="0" onmouseover="this.style.cursor='hand';" onclick="emoticon('{smilies_row.smilies_col.SMILEY_CODE}');" alt="{smilies_row.smilies_col.SMILEY_DESC}" title="{smilies_row.smilies_col.SMILEY_DESC}" /></td>
				  <!-- END smilies_col -->
				</tr>
				<!-- END smilies_row -->
				<!-- BEGIN switch_smilies_extra -->
				<tr align="center">
				  <td colspan="{S_SMILIES_COLSPAN}"><span  class="nav"><a href="{U_MORE_SMILIES}" onclick="window.open('{U_MORE_SMILIES}', '_phpbbsmilies', 'HEIGHT=300,resizable=yes,scrollbars=yes,WIDTH=250');return false;" target="_phpbbsmilies" class="nav">{L_MORE_SMILIES}</a></span></td>
				</tr>
				<!-- END switch_smilies_extra -->
				<!-- BEGIN switch_quick_reply -->
			  </table>
			</td>
#
#-----[ FIND ]------------------------------------------
#
<td class="row1"
#
#-----[ IN-LINE FIND ]------------------------------------------
#
>
#
#-----[ IN-LINE BEFORE, ADD ]------------------------------------------
#
 width="100%"
#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM