Version: , by Admin (Coder)
Developer Last Online: Nov 2024
Version: 2.2.x
Rating:
Released: 08-27-2001
Last Update: Never
Installs: 31
No support by the author.
This hack gives the user the option to select whether he wants to be sent to the forum after posting, or to the thread he posted in.
You can select this option in your profile, and also at the bottom of the new post screen.
In newreply.php replace
PHP Code:
// redirect
if ($prevpost[visible]) {
with
PHP Code:
// redirect
if ($prevpost[visible] && !$sendtoforum) {
and also in the same file replace
PHP Code:
// redirect
if ($visible) {
with
PHP Code:
// redirect
if ($visible && !$sendtoforum) {
and still in newreply.php replace
PHP Code:
if ($bbuserinfo[emailnotification]!=0) {
$emailchecked="checked";
}
with
PHP Code:
if ($bbuserinfo[emailnotification]) {
$emailchecked="checked";
}
if ($bbuserinfo[sendtoforumdef]!=0) {
$sendtoforumchecked="checked";
}
if ($bbuserinfo[emailnotification]) {
$emailchecked="checked";
}
with
PHP Code:
if ($bbuserinfo[emailnotification]) {
$emailchecked="checked";
}
if ($bbuserinfo[sendtoforumdef]!=0) {
$sendtoforumchecked="checked";
}
And in poll.php replace
PHP Code:
// redirect
if ($threadinfo[visible]) {
with
PHP Code:
// redirect
if ($threadinfo[visible] && !$sendtoforum) {
Now, in your newreply and newthread templates, add this code
Code:
<br><input type="checkbox" name="sendtoforum" value="yes" $sendtoforumchecked> <b>Go back to forum:</b> after posting would you like to return to the forum.
right after this code
Code:
<br><input type="checkbox" name="signature" value="yes" $signaturechecked> <b>Show Signature:</b> include your profile signature. Only registered users may have signatures.
In the modifyoptions template add this code
Code:
<tr>
<td bgcolor="{secondaltcolor}"><normalfont><b>Use 'Send to forum' by default?</b></normalfont><br>
<smallfont>Using this option will send you back to the forum after posting a new message.</smallfont></td>
<td bgcolor="{secondaltcolor}"><normalfont>
<input type="radio" name="sendtoforumdef" value="yes" $sendtoforumdefchecked> yes
<input type="radio" name="sendtoforumdef" value="no" $sendtoforumdefnotchecked> no
</normalfont></td>
</tr>
right after this code
Code:
<tr>
<td bgcolor="{secondaltcolor}"><normalfont><b>Use 'Email Notification' by default?</b></normalfont><br>
<smallfont>Using this option emails you whenever someone replies to a thread that you have participated in.</smallfont></td>
<td bgcolor="{secondaltcolor}"><normalfont>
<input type="radio" name="emailnotification" value="yes" $emailnotificationchecked> yes
<input type="radio" name="emailnotification" value="no" $emailnotificationnotchecked> no
</normalfont></td>
</tr>
$DB_site->query("UPDATE user
SET ".$updatestyles."adminemail='$adminemail',
showemail='$showemail',invisible='$invisible',cookieuser='$cookieuser',
maxposts='".addslashes($umaxposts)."',daysprune='".addslashes($prunedays)."',
timezoneoffset='".addslashes($timezoneoffset)."',emailnotification='$emailnotification',
startofweek='".addslashes($startofweek)."',options='$options',receivepm='$receivepm',
emailonpm='$emailonpm',pmpopup='$pmpopup',usergroupid='$bbuserinfo[usergroupid]',
nosessionhash='$nosessionhash'
WHERE userid='$bbuserinfo[userid]'");
with
PHP Code:
$DB_site->query("UPDATE user
SET ".$updatestyles."adminemail='$adminemail',
showemail='$showemail',invisible='$invisible',cookieuser='$cookieuser',
maxposts='".addslashes($umaxposts)."',daysprune='".addslashes($prunedays)."',
timezoneoffset='".addslashes($timezoneoffset)."',emailnotification='$emailnotification',sendtoforumdef='$sendtoforumdef',
startofweek='".addslashes($startofweek)."',options='$options',receivepm='$receivepm',
emailonpm='$emailonpm',pmpopup='$pmpopup',usergroupid='$bbuserinfo[usergroupid]',
nosessionhash='$nosessionhash'
WHERE userid='$bbuserinfo[userid]'");
Sure no trouble at all (After all, Chen did all the hard work )
The instructions said this:
Quote:
Originally posted by FireFly Now, in your newreply and newthread templates, add this code
Code:
<br><input type="checkbox" name="sendtoforum" value="yes" $sendtoforumchecked> <b>Go back to forum:</b> after posting would you like to return to the forum.
right after this code
Code:
<br><input type="checkbox" name="signature" value="yes" $signaturechecked> <b>Show Signature:</b> include your profile signature. Only registered users may have signatures.
I just went into my editpost template, and did the same as he instructed us for the newreply & newthread
Also, Firefly had
Quote:
after posting would you like to return to the forum.
I changed it to
Quote:
after posting would you like to return to the forum?
Originally posted by NYI Fan Yes, I installed this on my vB 2.2.2 and it's working beautifully
Ok!!! I'll try to install it today!!! Cause before I've made the changes in newreplay.php and when I'm post something, then everytime I'm backing to forum, not to my post :china: