The user now has full control over this.
1. In the
newreply and
newthread replace
Code:
<br><input type="checkbox" name="sendtoforum" value="yes"> <b>Go back to forum:</b> after posting would you like to return to the forum.
with
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.
in
both templates!
2. In the
modifyoptions add this code
Code:
<tr>
<td bgcolor="#DFDFDF"><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="#DFDFDF"><normalfont>
<input type="radio" name="sendtoforumdef" value="yes" $sendtoforumdefchecked> yes
<input type="radio" name="sendtoforumdef" value="no" $sendtoforumdefnotchecked> no
</normalfont></td>
</tr>
right after
Code:
<tr>
<td bgcolor="#DFDFDF"><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="#DFDFDF"><normalfont>
<input type="radio" name="emailnotification" value="yes" $emailnotificationchecked> yes
<input type="radio" name="emailnotification" value="no" $emailnotificationnotchecked> no
</normalfont></td>
</tr>
3. 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";
}
4. In
newthread.php replace
PHP Code:
if ($bbuserinfo[emailnotification]) {
$emailchecked="checked";
}
with
PHP Code:
if ($bbuserinfo[emailnotification]) {
$emailchecked="checked";
}
if ($bbuserinfo[sendtoforumdef]!=0) {
$sendtoforumchecked="checked";
}
5. In
member.php replace
PHP Code:
$emailnotification=iif($emailnotification=="yes",1,0);
with
PHP Code:
$emailnotification=iif($emailnotification=="yes",1,0);
$sendtoforumdef=iif($sendtoforumdef=="yes",1,0);
Also replace
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',
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]'");
and add
PHP Code:
if ($bbuserinfo[sendtoforumdef]) {
$sendtoforumdefchecked="checked";
$sendtoforumdefnotchecked="";
} else {
$sendtoforumdefchecked="";
$sendtoforumdefnotchecked="checked";
}
right after
PHP Code:
if ($bbuserinfo[emailnotification]) {
$emailnotificationchecked="checked";
$emailnotificationnotchecked="";
} else {
$emailnotificationchecked="";
$emailnotificationnotchecked="checked";
}
6. And last but by no means least, run this SQL query:
Code:
ALTER TABLE user ADD sendtoforumdef SMALLINT(6) DEFAULT '0' not null AFTER emailnotification
This is it. I skipped adding this info to the register because it really doesn't matter, there are some option that are not available there as well, so it's not the end of the world.
Hope this is what you want.