1
feer
[Newbb] Redirect to the last page
  • 2005/7/15 12:32

  • feer

  • Just popping in

  • Posts: 20

  • Since: 2002/2/23


Hi

When you post a new message on a thread (with more than one page) the user is redirect on the first page of the topic, it would be great if the user could be redirect to the last page...the last message in fact.

Do you think this code could be easily hacked ?

---
../newbb/post.php (line 226 at 233)
---

if ( $HTTP_POST_VARS['viewmode'] == "flat" ) {
redirect_header("viewtopic.php?topic_id=".$forumpost->topic()."&post_id=".$postid."&order=".$order."&viewmode=flat&pid=".$pid."&forum=".$forum."#forumpost".$postid."",2,_MD_THANKSSUBMIT);
exit();
} else {
$post_id = $forumpost->postid();
redirect_header("viewtopic.php?topic_id=".$forumpost->topic()."&post_id=".$postid."&order=".$order."&viewmode=thread&pid=".$pid."&forum=".$forum."#forumpost".$postid."",2,_MD_THANKSSUBMIT);
exit();
}

2
bluenova
Re: [Newbb] Redirect to the last page

Maybe you should submit this here on the CBB site.

3
feer
Re: [Newbb] Redirect to the last page
  • 2005/7/15 15:22

  • feer

  • Just popping in

  • Posts: 20

  • Since: 2002/2/23


Thanks bluenova, but newbb is not supported anymore ?

4
adrock
Re: [Newbb] Redirect to the last page
  • 2005/7/15 15:42

  • adrock

  • Quite a regular

  • Posts: 291

  • Since: 2004/12/7


If I'm not mistaken, that problem is solved in the individuals user preferences for viewing the forums. As long as they have all of their own prefs set to show the 'newest first', then they are always redirected back to the newest topic/post/comment.
Affordable Web Hosting - Family - Fun!...and not always in that order!

5
bluenova
Re: [Newbb] Redirect to the last page

True, but it would be a nice addition to CBB for those of us that use 'oldest first', NewBB is not in active development.

***Edit***
Just realised I've been talking cr*p, it does go to the last page?? It with comments that it goes to the first page.

What version of NewBB are you using? 1 I suspect, cause in 2 it should work.

6
feer
Re: [Newbb] Redirect to the last page
  • 2005/7/15 18:08

  • feer

  • Just popping in

  • Posts: 20

  • Since: 2002/2/23


Yes you're right bluenova, I'm using the the initial release of XOOPS 1.3.x and don't think to upgrade to the version, my website is too much hacked...btw, this part of the code is really similar between the first and last version of newbb ...

Quote:
Just realised I've been talking cr*p, it does go to the last page?? It with comments that it goes to the first page.


are you sure about this, cause I post a message (for testing) on frxoops.org and I get back to the first topic page

7
phppp
Re: [Newbb] Redirect to the last page
  • 2005/7/15 18:42

  • phppp

  • XOOPS Contributor

  • Posts: 2857

  • Since: 2004/1/25


I guess NewBB 1 will not be officially supported.

ideas for newbb 1:
in your viewtopic.php
step 1, if $_REQUEST["start"] defined, $start = $_REQUEST["start"]
otherwize, step2, if $_REQUEST["post_id"] defined, $start = getStartValue from $_REQUEST["post_id"]

8
feer
Re: [Newbb] Redirect to the last page
  • 2005/7/15 20:57

  • feer

  • Just popping in

  • Posts: 20

  • Since: 2002/2/23


Hi phpp,

I thank you to trying to help me, but I didn't understand.
What's the code should I add or replace ?

Frederic

9
phppp
Re: [Newbb] Redirect to the last page
  • 2005/7/17 2:24

  • phppp

  • XOOPS Contributor

  • Posts: 2857

  • Since: 2004/1/25


Hi feer, I mean you could write scripts following the ideas.

Sorry I do not have time to support newbb 1 at this moment.

10
feer
Re: [Newbb] Redirect to the last page
  • 2005/7/17 19:13

  • feer

  • Just popping in

  • Posts: 20

  • Since: 2002/2/23


Well if i was capable of writing a hack for this problem, I would not have put the question here

BTW, it's not only a problem with newbb1 ... but newbb2 has also the same bug, do a test on a topic with more than one page.

Frederic

Login

Who's Online

280 user(s) are online (144 user(s) are browsing Support Forums)


Members: 0


Guests: 280


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits