MyBB Community Forums

Full Version: Changing page after quick reply
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
You set a limit to display 10 posts per page in threads.
If i thread has 10 posts and you quick-reply the 11th posts, the page gets reloaded to the second page.

IMO, it wasn't necessary to reload the page. We could have allowed it just to append on the same page.

Just My Opinion.

Please vote in the poll.
This is done on purpose, otherwise if you refresh, your post will appear to have vanished as it would now be showing on page 2 and you'd still be on page 1. It's only added via AJAX if it's going to be on the same page and no posts have been added/deleted, otherwise it reloads.
(2010-07-20, 12:02 PM)MattRogowski Wrote: [ -> ]This is done on purpose, otherwise if you refresh, your post will appear to have vanished as it would now be showing on page 2 and you'd still be on page 1.
I know it is very minor issue. I guess people are intelligent enough to press the next page. They won't cry to mummy saying their post is lost. Anyways, Forget about it.

BTW, if anyone wants to disable it, here's the code in newreply.php responsible for it
// Lets see if this post is on the same page as the one we're viewing or not
				// if it isn't, redirect us
				if($perpage > 0 && (($postcounter) % $perpage) == 0)
				{
					$post_page = ($postcounter) / $mybb->settings['postsperpage'];
				}
				else
				{
					$post_page = intval(($postcounter) / $mybb->settings['postsperpage']) + 1;
				}

				if($mybb->input['from_page'] && $post_page > $mybb->input['from_page'])
				{
					redirect(get_thread_link($tid, 0, "lastpost"));
					exit;
				}
I can absolutely guarantee we'd have support threads if this was changed. If people see the post added to the bottom and then they refresh and it's gone, not everybody is going to realise it's now showing on a new page even though it wasn't before.
Please don't use the code change. You're essentially causing a bug.