• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Pagination last link redirect?

[eluser]Tyler Diaz[/eluser]
Hey there CI community, I'm a bit stumped on this one.

Working on a forum script and I want it so when you post on a topic, it will redirect you to view your post. I've done the anchor part such as #post_id to drag you to where your post is, but how do I redirect to the last pagination link on the topic?

Thanks in advance, Tyler.

Hi Tyler - did you come up with a solution to this one?

The algorithm seems straightforward enough -- at a guess you'd do count() of the posts, divide it by the number of posts-per-page, round down, and away you go -- but I suspect you wanted to reduce the number of calls to the DB.

[eluser]Tyler Diaz[/eluser]
That was my initial solution, kind of a "quick and dirty" feel to it but there seems to be little to none alternative.

Thanks for the helpful reply jedd.

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

Users browsing this thread:
1 Guest(s)

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2019 MyBB Group.