This
sould work.
Stick this in the phpinclude: (edit the forumids part)
PHP Code:
if (strpos($_SERVER['PHP_SELF'], 'showthread.php') != false)
{
$textareacols = gettextareawidth();
$forumids = "1"; // forum ids quick reply will show in, seprate with comma's
if ($forumids==$forumid) {
eval("\$quickreply = \"".gettemplate("mist_quickreply")."\";");
} else {
$quickreply = "";
}
}
In the showthread template find:
Code:
<!-- first unread and next/prev -->
<table cellpadding="2" cellspacing="0" border="0" width="95%" align="center">
<tr>
<td><smallfont>$pagenav </smallfont></td>
<td align="right"><smallfont>
<img src="https://vborg.vbsupport.ru/images/prev.gif" alt="" border="0">
<a href="showthread.php?s=$session[sessionhash]&threadid=$threadid&goto=nextoldest">Last Thread</a>
<a href="showthread.php?s=$session[sessionhash]&threadid=$threadid&goto=nextnewest">Next Thread</a>
<img src="https://vborg.vbsupport.ru/images/next.gif" alt="" border="0">
</smallfont></td>
</tr>
</table>
<!-- first unread and next/prev -->
Below that add:
Make a new template named mist_quickreply and populate it with:
Code:
<! -- hackless quick reply -->
<br />
<script language="javascript">
<!--
var postmaxchars = $postmaxchars;
function validate(theform) {
if (theform.message.value=="") {
alert("Please complete the message field.");
return false; }
if (postmaxchars != 0) {
if (theform.message.value.length > $postmaxchars) {
alert("Your message is too long.\n\nReduce your message to $postmaxchars characters.\nIt is currently "+theform.message.value.length+" characters long.");
return false; }
else { return true; }
} else { return true; }
}
function checklength(theform) {
if (postmaxchars != 0) { message = "\nThe maximum permitted length is $postmaxchars characters."; }
else { message = ""; }
alert("Your message is "+theform.message.value.length+" characters long."+message);
}
//-->
</script>
<table width="{contenttablewidth}" cellpadding="4" cellspacing="0" border="1" style="border-collapse: collapse" bordercolor="{tablebordercolor}" {tableinvisibleextra} align="center" >
<tr>
<td bgcolor="{tableheadbgcolor}" colspan="2">
<normalfont color="{tableheadtextcolor}"><b>Post Reply:</b></normalfont>
</td>
</tr>
<tr valign="top">
<td width="20%" bgcolor="{firstaltcolor}">
<normalfont color="{pagetextcolor}"><b>Your Reply:</b></normalfont>
</td>
<td bgcolor="{firstaltcolor}" width="80%">
<form enctype="multipart/form-data" action="newreply.php" name="quickreply" method="post" onSubmit="return validate(this)">
<input type="hidden" name="s" value="$session[sessionhash]">
<input type="hidden" name="action" value="postreply">
<input type="hidden" name="threadid" value="$threadid">
<input type="hidden" name="title" value="">
<input type="hidden" name="iconid" value="0">
<input type="hidden" name="parseurl" value="yes">
<input type="hidden" name="email" value="">
<input type="hidden" name="disablesmilies" value="">
<input type="hidden" name="closethread" value="">
<input type="hidden" name="hiddenreply" value="">
<input type="hidden" name="signature" value="yes">
<input type="hidden" name="rating" value="0">
<textarea name="message" rows="7" cols="$textareacols" wrap="virtual" tabindex="1"></textarea>
<br />
<input type="submit" class="bginput" name="submit" value="Submit Reply" accesskey="s" tabindex="2">
<input type="reset" class="bginput" name="reset" value="Reset Form" accesskey="r" tabindex="3">
<br />
<smallfont><a href="javascript:checklength(document.quickreply);">[check message length]</a></smallfont>
</form>
</td>
</tr>
</table>
<! -- /hackless quick reply -->
Note: This will add one query to forums that use quick reply (on showthread.php), this is because i put it in a template. You can avoid the query by hacking showthread.php or hard coding the template into phpinclude (something i dident want to do because of overhead). if you want to hack:
open showthread.php
Find:
Replace with:
Code:
showthread,mist_quickreply