Forum Moderators: coopster
In viewtopic.php
//
// Simple Quick Reply MOD
//
if ($sqr_auth)
{
$template->assign_vars(array(
'L_EMPTY_MSG' => $lang['Empty_message'],
'L_QUICK_REPLY' => $lang['Quick_Reply'],
'L_HIDE_QUICK_REPLY' => $lang['Quick_Reply_Hide'],
'L_USERNAME' => $lang['Username'],
'L_QUICK_SMILIES' => $lang['Quick_Reply_Smilies'],
'L_SUBJECT' => $lang['Subject'],
'L_MESSAGE_BODY' => $lang['Message_body'],
'L_OPTIONS' => $lang['Options'],
'L_PREVIEW' => $lang['Preview'],
'L_SPELLCHECK' => $lang['Spellcheck'],
'L_SUBMIT' => $lang['Submit'],
'L_DISABLE_HTML' => $lang['Disable_HTML_post'],
'L_DISABLE_BBCODE' => $lang['Disable_BBCode_post'],
'L_DISABLE_SMILIES' => $lang['Disable_Smilies_post'],
'L_ATTACH_SIGNATURE' => $lang['Attach_signature'],
'L_NOTIFY_ON_REPLY' => $lang['Notify'],
'S_ATTACH_SIG' => (( $userdata['session_logged_in'] )? $userdata['user_attachsig'] : '')? '1' : '',
'S_NOTIFY' => (( $userdata['session_logged_in'] )? $userdata['user_notify'] : '')? '1' : '',
'S_POSTING' => append_sid('posting.'.$phpEx),
'S_SID' => $userdata['session_id'],
'S_TOPIC_ID' => $topic_id,
'U_QUICK_SMILIES' => append_sid('posting.'.$phpEx.'?mode=smilies') )
);
$template->assign_block_vars('switch_quick_reply', array() );
if(!$userdata['session_logged_in'] )
{
$template->assign_block_vars('switch_quick_reply.switch_user_logged_out', array() );
}
else
{
$template->assign_block_vars('switch_quick_reply.switch_user_logged_in', array() );
}
}
//
// Simple Quick Reply MOD
//
In viewtopic_body.tpl:
<!-- BEGIN switch_quick_reply -->
<form action="{S_POSTING}" method="post" name="post" onsubmit="return checkForm(this)" id="quickreply">
<script language="JavaScript" type="text/javascript"><!--
function checkForm() {
formErrors = false;
if (document.post.message.value.length < 2) {
formErrors = '{L_EMPTY_MSG}';
}
if (formErrors) {
alert(formErrors);
return false;
} else {
return true;
}
}
//--></script>
<table border="0" cellpadding="3" cellspacing="1" class="forumline" align="center">
<tr>
<th class="thHead" colspan="2" height="25" id="quickreply_head"><b>{L_QUICK_REPLY}</b></th>
</tr>
<!-- BEGIN switch_user_logged_out -->
<tr>
<td class="row1"><span class="gen"><b>{L_USERNAME}:</b></span></td>
<td class="row2"><span class="genmed"><input class="post" type="text" name="username" size="25" maxlength="25" value="" /></span></td>
</tr>
<!-- END switch_user_logged_out -->
<tr>
<td width="22%" class="row1" valign="top"><span class="gen"><b>{L_MESSAGE_BODY}:</b></span><br /><br /><span class="gensmall"><a href="{U_QUICK_SMILIES}" onclick="window.open('{U_QUICK_SMILIES}', '_phpbbsmilies', 'HEIGHT=300,resizable=yes,scrollbars=yes,WIDTH=250');return false;" target="_phpbbsmilies">{L_QUICK_SMILIES}</a></span></td>
<td width="78%" class="row2" valign="top"><textarea name="message" rows="10" cols="35" wrap="virtual" style="width:450px" class="post"></textarea></td>
</tr>
<tr>
<td class="catBottom" colspan="2" align="center" height="28">
<input type="hidden" name="attach_sig" value="{S_ATTACH_SIG}" />
<input type="hidden" name="notify" value="{S_NOTIFY}" />
<input type="hidden" name="mode" value="reply" />
<input type="hidden" name="sid" value="{S_SID}" />
<input type="hidden" name="t" value="{S_TOPIC_ID}" />
<input type="submit" name="preview" class="mainoption" value="{L_PREVIEW}" /> <input type="submit" accesskey="s" name="post" class="mainoption" value="{L_SUBMIT}" />
</td>
</tr>
</table>
</form>
<!-- END switch_quick_reply -->
In lang_main.php:
// Simple Quick Reply MOD
$lang['Quick_Reply'] = 'Quick Reply';
$lang['Quick_Reply_Smilies'] = 'Add smilies';
$lang['Quick_Reply_Hide'] = 'Hide Quick Reply';
I did try to find help on the phpBB forum that provided this but was unable to find it.
Thanks for any help :)
Best of luck!