Version: 1.00, by Admin (Coder)
Developer Last Online: Nov 2024
Version: 2.3.x
Rating:
Released: 01-28-2002
Last Update: Never
Installs: 1206
No support by the author.
Here's an easy one, it barely took 4 minutes to do. :china:
This hack will add a quick replying box at the bottom of all threads, only if the user has permission to reply, so when you need to reply to something real quickly you don't need to click the Post Reply button and wait for the page to load.
Instructions are in the attached .txt file, and if you want a demo... just look below.
NOTE: For the vB 2.3.2 version please see this post.
Extras:
If you want users who have the Use Email Notification option ON, to automatically subscribe to threads they reply to with this hack, see this post.
If you want to add an option for each user to turn this feature on and off, please see this post.
If you want smilies in your quick reply box please see this post.
Show Your Support
This modification may not be copied, reproduced or published elsewhere without author's permission.
I finally got this to work with 2.3.2 . The problem is that the instructions for showthread.php are wrong, or at least they were for my site.
PHP Code:
*** FIND ***
if (!$getperms['canviewothers'] and ($thread['postuserid']!=$bbuserinfo['userid'] or $bbuserinfo['userid']==0)) {
show_nopermission();
}
*** REPLACE WITH ******
if (!$getperms['canviewothers'] and $thread['postuserid']!=$bbuserinfo['userid']) {
show_nopermission();
}
*** FIND ***
if ($noshutdownfunc) {
$DB_site->query("UPDATE thread SET views=views+1 WHERE threadid='$threadid'");
} else {
$shutdownqueries[]="UPDATE LOW_PRIORITY thread SET views=views+1 WHERE threadid='$threadid'";
}
*** REPLACE WITH ***
if (($bbuserinfo['userid']!=$thread['postuserid']) and (!$getperms['canviewothers'] or !$getperms['canreplyothers'])) {
$replybox='';
} elseif (!$getperms['canview'] or (!$getperms['canreplyown'] and $bbuserinfo['userid']==$thread['postuserid'])) {
$replybox='';
} elseif (!$thread['open'] and !ismoderator($thread['forumid'],'canopenclose')) {
$replybox='';
} else {
$textareacols = gettextareawidth();
eval("\$replybox = "".gettemplate('showthread_replybox')."";");
}
if ($noshutdownfunc) {
$DB_site->query("UPDATE thread SET views=views+1 WHERE threadid='$threadid'");
} else {
$shutdownqueries[]="UPDATE LOW_PRIORITY thread SET views=views+1 WHERE threadid='$threadid'";
}
and then it works. In the instructions they have the top two finds as one. Problem is there is a bunch of code between them.
Anyone know how to make the smilies box so it uses the same formatting as the actual one in a new reply? I used the same $vbcode_smilies line as the newreply.php, and it displays the box, but without the proper border on the table, odd... ?
08-29-03 at 12:06 AM 99SIVTEC said this in Post #1121 I finally got this to work with 2.3.2 . The problem is that the instructions for showthread.php are wrong, or at least they were for my site.
PHP Code:
*** FIND ***
if (!$getperms['canviewothers'] and ($thread['postuserid']!=$bbuserinfo['userid'] or $bbuserinfo['userid']==0)) {
show_nopermission();
}
*** REPLACE WITH ******
if (!$getperms['canviewothers'] and $thread['postuserid']!=$bbuserinfo['userid']) {
show_nopermission();
}
*** FIND ***
if ($noshutdownfunc) {
$DB_site->query("UPDATE thread SET views=views+1 WHERE threadid='$threadid'");
} else {
$shutdownqueries[]="UPDATE LOW_PRIORITY thread SET views=views+1 WHERE threadid='$threadid'";
}
*** REPLACE WITH ***
if (($bbuserinfo['userid']!=$thread['postuserid']) and (!$getperms['canviewothers'] or !$getperms['canreplyothers'])) {
$replybox='';
} elseif (!$getperms['canview'] or (!$getperms['canreplyown'] and $bbuserinfo['userid']==$thread['postuserid'])) {
$replybox='';
} elseif (!$thread['open'] and !ismoderator($thread['forumid'],'canopenclose')) {
$replybox='';
} else {
$textareacols = gettextareawidth();
eval("\$replybox = "".gettemplate('showthread_replybox')."";");
}
if ($noshutdownfunc) {
$DB_site->query("UPDATE thread SET views=views+1 WHERE threadid='$threadid'");
} else {
$shutdownqueries[]="UPDATE LOW_PRIORITY thread SET views=views+1 WHERE threadid='$threadid'";
}
and then it works. In the instructions they have the top two finds as one. Problem is there is a bunch of code between them.
the problem is this line:
PHP Code:
if (!$getperms['canviewothers'] and ($thread['postuserid']!=$bbuserinfo['userid'] or $bbuserinfo['userid']==0)) {
show_nopermission();
}
is found twice in showthread.php
the second instance of this line in showthread has this line:
PHP Code:
if (!$getperms['canviewothers'] and ($thread['postuserid']!=$bbuserinfo['userid'] or $bbuserinfo['userid']==0)) {
show_nopermission();
}
if ($noshutdownfunc) {
$DB_site->query("UPDATE thread SET views=views+1 WHERE threadid='$threadid'");
} else {
$shutdownqueries[]="UPDATE LOW_PRIORITY thread SET views=views+1 WHERE threadid='$threadid'";
}
so the instruction code is correct... there should be no code between them... and there should be only one instance of this code in showthread.php