N!ck
10-06-2002, 10:00 PM
Here is a very simple hack that allows your users to choose where they want to be redirected to after posting a reply via QuickReply. I made this because I don't think it's truly quick unless you have the option to go back to the forum or main index. Screenshot is here (https://vborg.vbsupport.ru/showthread.php?action=showpost&postid=307617).
---------------------------------------------------------------------------------
Step 1 - newreply.php
Find:
if ($visible) {
$goto="showthread.php?s=$session[sessionhash]&postid=$postid#post$postid";
} else {
$goto="forumdisplay.php?s=$session[sessionhash]&forumid=$threadinfo[forumid]";
}
Replace with:
if ($visible && !$returntowhere) {
$goto="showthread.php?s=$session[sessionhash]&postid=$postid#post$postid";
} else {
if ($returntowhere=="forumhome") {
$goto="index.php?s=$session[sessionhash]";
} elseif ($returntowhere=="thread") {
$goto="showthread.php?s=$session[sessionhash]&postid=$postid#post$postid";
} else {
$goto="forumdisplay.php?s=$session[sessionhash]&forumid=$threadinfo[forumid]";
}
}
---------------------------------------------------------------------------------
Step 2 - Template: showthread_replybox
Find:
</tr>
</table>
</td>
</tr>
</table>
</td></tr></table>
Replace with:
</tr>
</table>
</td>
</tr>
<tr><td bgcolor="#F1F1F1" valign="top"><normalfont><b>Return to:</b></normalfont></td>
<td bgcolor="#F1F1F1"><select name="returntowhere" class="bginput"><option value="thread" selected>this thread</option><option value="forumdisplay">this forum</option><option value="forumhome">$bbtitle home</option></select><br><smallfont>After submitting reply, where do you want to go?</smallfont></td>
</tr>
</table>
</td></tr></table>
---------------------------------------------------------------------------------
Step 3 - Template: redirect_postthanks
Find:
You will now be taken to your post.
Replace with:
You will now be taken to your post or selected destination.
---------------------------------------------------------------------------------
Done! Please click install if you use this.
If you would like to use this on your regular post reply page as well, click here (https://vborg.vbsupport.ru/showthread.php?s=&postid=321822&action=showpost) for instructions.
---------------------------------------------------------------------------------
Step 1 - newreply.php
Find:
if ($visible) {
$goto="showthread.php?s=$session[sessionhash]&postid=$postid#post$postid";
} else {
$goto="forumdisplay.php?s=$session[sessionhash]&forumid=$threadinfo[forumid]";
}
Replace with:
if ($visible && !$returntowhere) {
$goto="showthread.php?s=$session[sessionhash]&postid=$postid#post$postid";
} else {
if ($returntowhere=="forumhome") {
$goto="index.php?s=$session[sessionhash]";
} elseif ($returntowhere=="thread") {
$goto="showthread.php?s=$session[sessionhash]&postid=$postid#post$postid";
} else {
$goto="forumdisplay.php?s=$session[sessionhash]&forumid=$threadinfo[forumid]";
}
}
---------------------------------------------------------------------------------
Step 2 - Template: showthread_replybox
Find:
</tr>
</table>
</td>
</tr>
</table>
</td></tr></table>
Replace with:
</tr>
</table>
</td>
</tr>
<tr><td bgcolor="#F1F1F1" valign="top"><normalfont><b>Return to:</b></normalfont></td>
<td bgcolor="#F1F1F1"><select name="returntowhere" class="bginput"><option value="thread" selected>this thread</option><option value="forumdisplay">this forum</option><option value="forumhome">$bbtitle home</option></select><br><smallfont>After submitting reply, where do you want to go?</smallfont></td>
</tr>
</table>
</td></tr></table>
---------------------------------------------------------------------------------
Step 3 - Template: redirect_postthanks
Find:
You will now be taken to your post.
Replace with:
You will now be taken to your post or selected destination.
---------------------------------------------------------------------------------
Done! Please click install if you use this.
If you would like to use this on your regular post reply page as well, click here (https://vborg.vbsupport.ru/showthread.php?s=&postid=321822&action=showpost) for instructions.