Page 1 of 1

[SOLVED]redirect to topic after reply..

Posted: Sat Feb 12, 2011 11:10 pm
by baller1234
Hello All,

I have a phpbb3 forum and got a qstion.

When members reply on a topic, they are always redirected to there post/reply instead of the topic. Does someone knows the code change for this?

Thanx in advance!

Re: redirect to topic after reply..

Posted: Sat Feb 12, 2011 11:29 pm
by Sierron
But they get redirected to the topic. phpBB just use #p{postnumber} to jump to the post which the author made.

I don't really know, which code do you need to change for that, but I think that's somewhere in the templates. Can you just explain me, why this is not the right behavior for you? :?: (can't find a suitable smiley)

Re: redirect to topic after reply..

Posted: Sat Feb 12, 2011 11:35 pm
by baller1234
well, when there are alot of replys, like 150 or so, you need to go back to the first post/topic. Thats anoying..

Re: redirect to topic after reply..

Posted: Mon Feb 14, 2011 7:56 pm
by baller1234
sorry to bump this.. Anyone got a answer?

Re: redirect to topic after reply..

Posted: Mon Feb 14, 2011 10:53 pm
by 4_seven
where should the redirect go to?

Re: redirect to topic after reply..

Posted: Tue Feb 15, 2011 9:16 am
by AmigoJack
Open /includes/functions_posting.php and find:

Code: Select all

        if ($mode != 'post')
        {
            $params .= '&p=' . $data['post_id'];
            $add_anchor = '#p' . $data['post_id'];
        } 
Change to:

Code: Select all

        /*if ($mode != 'post')
        {
            $params .= '&p=' . $data['post_id'];
            $add_anchor = '#p' . $data['post_id'];
        }*/ 
Untested.

Re: redirect to topic after reply..

Posted: Tue Feb 15, 2011 12:49 pm
by baller1234
AmigoJack wrote:Open /includes/functions_posting.php and find:

Code: Select all

        if ($mode != 'post')
        {
            $params .= '&p=' . $data['post_id'];
            $add_anchor = '#p' . $data['post_id'];
        } 
Change to:

Code: Select all

        /*if ($mode != 'post')
        {
            $params .= '&p=' . $data['post_id'];
            $add_anchor = '#p' . $data['post_id'];
        }*/ 
Untested.

thanx alot... works like a charm!

Re: [SOLVED]redirect to topic after reply..

Posted: Tue Feb 15, 2011 3:24 pm
by Wingman1
Damn the change didnt do anything for me, is there any chance someone might be able to tell me the code needed for both regular and quick replies please?

Re: [SOLVED]redirect to topic after reply..

Posted: Tue Feb 15, 2011 3:39 pm
by AmigoJack
Those end up to be the same. Attach your PHP file, so I can take a look.

Re: [SOLVED]redirect to topic after reply..

Posted: Sun Feb 20, 2011 1:51 am
by Sierron
Wingman1 wrote:Damn the change didnt do anything for me, is there any chance someone might be able to tell me the code needed for both regular and quick replies please?
Did you purged your template cache?

Re: [SOLVED]redirect to topic after reply..

Posted: Sun Feb 20, 2011 9:00 am
by AmigoJack
Sierron wrote:purged your template cache?
That's not needed at all (since no templates are touched).

Re: [SOLVED]redirect to topic after reply..

Posted: Mon Feb 21, 2011 8:28 pm
by Sierron
AmigoJack wrote:
Sierron wrote:purged your template cache?
That's not needed at all (since no templates are touched).
Well, okay. Thanks for the information.