Edit Redirection

Discussion forum for MOD Writers regarding MOD Development.
Locked
mutank
Registered User
Posts: 158
Joined: Mon Jan 05, 2009 4:47 pm
Location: Toronto, ON
Name: Dominic Struczynski
Contact:

Edit Redirection

Post by mutank »

When a user successfuly posts (or has that comment held for moderation), there are options which appear after the confirmation message, such as "Return to the last forum visited" and so forth. After a few seconds they are redirected.

How can I change the links that are showed to them? (I've checked the language files, but I can only change the text, not the links)

Also to disable the auto-redirect
User avatar
Brf
Support Team Member
Support Team Member
Posts: 52001
Joined: Tue May 10, 2005 7:47 pm
Location: {postrow.POSTER_FROM}
Contact:

Re: Edit Redirection

Post by Brf »

You can change the code here in posting.php:

Code: Select all

			// 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>');
			}

			$message .= '<br /><br />' . sprintf($user->lang['RETURN_FORUM'], '<a href="' . append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $data['forum_id']) . '">', '</a>');
			trigger_error($message);
You can see how the links are built in the message.
To disable the automatic redirect, remove the meta_refresh statement.
Locked

Return to “[3.0.x] MOD Writers Discussion”