Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

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.

share|improve this question

2 Answers 2

up vote 3 down vote accepted

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.

share|improve this answer
    
+1, I didn't know where in the code this was to be found. Glad you posted this. –  John Conde Aug 18 '10 at 14:11

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.