PDA

View Full Version : Return to Forum after Thread/Reply


CSnet
03-07-2005, 07:22 PM
Hey,

If there anyway of redirecting to the forum rather then the thread once posted a reply or thread?

Many thanks!

SirJonathan
03-07-2005, 07:36 PM
I'm looking for this as well! :)

Soup
03-07-2005, 08:18 PM
in file newreply.php around line 257


// ### NOT PREVIEW - ACTUAL POST ###
if ($newpost['visible'])
{
$url = "showthread.php?$session[sessionurl]p=$newpost[postid]&posted=1#post$newpost[postid]";
}
else
{
$_REQUEST['forceredirect'] = 1;
$url = "forumdisplay.php?$session[sessionurl]f=$foruminfo[forumid]";
}
eval(print_standard_redirect('redirect_postthanks' ));


Change everything to (or comment out the other lines)


$_REQUEST['forceredirect'] = 1;
$url = "forumdisplay.php?$session[sessionurl]f=$foruminfo[forumid]";
eval(print_standard_redirect('redirect_postthanks' ));



in file newthread.php, around line 155


if ($newpost['postpoll'])
{
$url = "poll.php?$session[sessionurl]t=$newpost[threadid]&polloptions=$newpost[polloptions]";
}
else if ($newpost['visible'])
{
$url = "showthread.php?$session[sessionurl]p=$newpost[postid]#post$newpost[postid]";
}
else
{
$_REQUEST['forceredirect'] = 1;
$url = "forumdisplay.php?$session[sessionurl]f=$foruminfo[forumid]";
}
eval(print_standard_redirect('redirect_postthanks' ));


Change it to


if ($newpost['postpoll'])
{
$url = "poll.php?$session[sessionurl]t=$newpost[threadid]&polloptions=$newpost[polloptions]";
}
else
{
$_REQUEST['forceredirect'] = 1;
$url = "forumdisplay.php?$session[sessionurl]f=$foruminfo[forumid]";
}
eval(print_standard_redirect('redirect_postthanks' ));

AllStarFreebies
03-09-2005, 04:19 AM
Awesome fix... beats the other post which involves about 15 separate fixes!