MyBB Community Forums

Full Version: Selectively forcing Friendly Redirection Pages
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
"Friendly Redirection Pages" can optionally by turned off, and that's fine for most situations.

Except one: if a user forgets their password, after they enter their e-mail, the browser redirects straight to the index page. In this case the user has no feedback about whether their password recovery procedure worked (or how it's supposed to work).

Of course, sooner or later they'll notice the password recovery e-mail in their inbox, but the user experience could be better here.

My proposal is to add a parameter to the redirect() function, called "force", which would be set to true when the function is called from actions such as do_lostpw:
redirect('index.php', $lang->redirect_lostpwsent, '', true);

There may be other use cases for this feature. Patch attached.
The attached patch file seems to be incomplete.
Good catch frostschutz. I've just updated the attachment.

Which made me realize that MyBB didn't update the "last modified" timestamp of my first post, but that's a separate issue. (Indeed, I did not update the post text, only the post attachment, but since the attachment is part of the post, the post itself should be considered updated?)
I'm sure either I suggested this a while ago or somebody else did, there's various places where a message needs to be shown regardless of what the setting is set to, i.e. where it's actual information or instructions being given. Another example is when a new reply/thread needs to be moderated, with no redirect, you have no idea why your post/thread doesn't show up.
Agree with Matt. For my board, I cloned the error() function from functions.php into a function named message() which does the same as error() but without returning a 404 response.

This is useful for operations that simply want to display a message that's not an error. Right now, the code uses error() in a few places where it just means to show an informative message, but the problem is plugins like Google SEO hook into that and display error-related stuff.

An example is the "View new messages" action, which could return that there are no messages, without that being an error as it is now (issue 1622).
Which file do I need to edit? I am having issues with people forgetting the passwords and complaining that their new passwords aren't working. This may help.

Kicked for reference
SleepySleepySleepySleepy
(2011-07-19, 12:02 PM)Matt. Wrote: [ -> ]I'm sure either I suggested this a while ago or somebody else did, there's various places where a message needs to be shown regardless of what the setting is set to, i.e. where it's actual information or instructions being given. Another example is when a new reply/thread needs to be moderated, with no redirect, you have no idea why your post/thread doesn't show up.

This is a very important function to me as well. Has there been any forward progress on this or is there some information so that I could implement such a thing myself?

Thanks!
We added the following patches (as well as the one suggested to add to inc/functions.php in the original post) to force Friendly Redirection Pages for moderation to show also when Friendly Redirection Pages is turned off in ACP.
[attachment=31100]
[attachment=31101]