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]'");
<br><input type="checkbox" name="signature" value="yes" $signaturechecked> <b>Show Signature:</b> include your profile signature. Only registered users may have signatures.
<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.
</smallfont></
I'm having the same problem Christine was having, but the fix you supplied for her doesn't seem to have done the job for me. It works for New Topics and Polls, but not the reply. I've double and triple checked everything, and it matches your instructions to a "T". Ran the Query with no problem. At a bit of a loss as to what to do.