Thread Rating:
  • 2 Vote(s) - 3 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Selectively forcing Friendly Redirection Pages
#1
This user has been denied support. This user has been denied support.
"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.


Attached Files
.txt   redirect_option_to_force_displaying_the_friendly_redirect_page.txt (Size: 1.74 KB / Downloads: 281)
#2
This user has been denied support. This user has been denied support.
The attached patch file seems to be incomplete.
#3
This user has been denied support. This user has been denied support.
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?)
#4
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.
MyReactions - All Plugins

Can you still feel the butterflies?

Free never tasted like pudding.
#5
This user has been denied support. This user has been denied support.
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).
#6
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
#7
SleepySleepySleepySleepy
#8
(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!
#9
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.

.txt   newreply.php.diff.txt (Size: 731 bytes / Downloads: 305)

.txt   newthread.php.diff.txt (Size: 368 bytes / Downloads: 188)


Forum Jump:


Users browsing this thread: 1 Guest(s)