Quote:
Second, one of my users says (not unreasonably) "why does it appear on every page of a thread... why not just the last one"...
|
This is a valid point: we argue a lot on our board, and it's easy to post a reply without reading where the argument is going...
To make your reply box always appear at the END of the conversation (which will be at the beginning if you sort your posts the other way round!)... search for the following in the hack:
PHP Code:
$textareacols = gettextareawidth();
eval("\$replybox = \"".gettemplate('showthread_replybox')."\";");
Replace with:
PHP Code:
//We might have a reply box here
//Get total posts in this thread
$jrc_threadinfo=$DB_site->query_first("SELECT COUNT(*) AS posts FROM post WHERE threadid='$threadid'");
//Check post order
if (!$postorder) {
// newest last page
$jrc_wherearewe=$jrc_threadinfo[posts]-($perpage*$pagenumber);
} else {
// oldest last page
$jrc_wherearewe=($perpage*$pagenumber)-$jrc_threadinfo[posts];
}
// print a reply box on page containing last post
if ($jrc_wherearewe<=0 or (!isset($pagenumber) and ($jrc_threadinfo[posts]<$perpage))) {
$textareacols = gettextareawidth();
eval("\$replybox = \"".gettemplate('showthread_replybox')."\";");
}
Hope that's of use to you.