Mobile app version of vmapp.org
Login or Join
Rambettina238

: How to reduce delay between forum posts in phpbb In my phpbb forum, just after I post a reply to a thread, a page is shown and I've to wait around 5 secs to return back to the thread.

@Rambettina238

Posted in: #Forum #Php

In my phpbb forum, just after I post a reply to a thread, a page is shown and I've to wait around 5 secs to return back to the thread. How do I reduced the time to 0. (I tried setting the "Flood Interval" to 0 but it dint work.

10.02% popularity Vote Up Vote Down


Login to follow query

More posts by @Rambettina238

2 Comments

Sorted by latest first Latest Oldest Best

 

@Sarah324

If you're using phpBB 3, then you can reduce the refresh time by editing the posting.php file in the root directory of the script.

Inside you'll find (around line 1118 for 3.0.7PL1) an if statement similar to the following, depending on your version:

// Check the permissions for post approval. Moderators are not affected.
if ((!$auth->acl_get('f_noapprove', $data['forum_id']) && !$auth->acl_get('m_approve', $data['forum_id']) && empty($data['force_approved_state'])) || (isset($data['force_approved_state']) && !$data['force_approved_state']))
{
meta_refresh(10, $redirect_url);
$message = ($mode == 'edit') ? $user->lang['POST_EDITED_MOD'] : $user->lang['POST_STORED_MOD'];
$message .= (($user->data['user_id'] == ANONYMOUS) ? '' : ' '. $user->lang['POST_APPROVAL_NOTIFY']);
}
else
{
meta_refresh(3, $redirect_url);

$message = ($mode == 'edit') ? 'POST_EDITED' : 'POST_STORED';
$message = $user->lang[$message] . '<br /><br />' . sprintf($user->lang['VIEW_MESSAGE'], '<a href="' . $redirect_url . '">', '</a>');
}


You'll notice there are two calls to meta_refresh() in there; the first one - waiting 10 seconds based on the first argument - is used when a forum is moderated, and a post needs to be approved first. It was changed to this length to give users enough time to see the actual message before the page refreshed.

The second one - 3 seconds in the current phpBB version - is the one you'll probably want to change. You can reduce this down to 0 to have users redirected immediately, after which you'll just have the normal 1-2 second lag while the page is served, and the browser renders it.

One thing to note - you may need to modify this every time you upgrade phpBB, as this is a core file.

10% popularity Vote Up Vote Down


 

@Pope3001725

Sounds like a meta refresh tag to me. Find that tag and change it to have a value of "0" and you should be all set.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme