1
shagreel
Removing the intermediate flash screen
  • 2003/9/30 20:19

  • shagreel

  • Just popping in

  • Posts: 13

  • Since: 2003/1/17


I must say that I dislike having the short little screen tell me that I do not have permission to view a page and then redirect later. I have a suggestion that I have implemented.

Set up a new config variable called show_redirect_flash or something so that people can choose what way to be redirected.

In the xoops_redirect function in the functions.php file add:

if($xoopsConfig['show_redirect_flash']){
//normal xoops_redirect functionality
}else{
$url = preg_replace("/&/i", '&', htmlspecialchars($url, ENT_QUOTES));
setcookie ("XoopsRedirectCookie", $message, 0, "/");
header("Location: $url");
exit();
}

Then in header.php (maybe this should be somewhere else, but I am not sure where else to put it yet) add:

if $_COOKIE['XoopsRedirectCookie']){
$xoopsTpl->assign('xoops_redirect_message', $_COOKIE['XoopsRedirectCookie']);
setcookie ("XoopsRedirectCookie", "", 0, "/");
}

Then in the main template you can display the xoops_redirect_message anywhere/anyway you want to so that people are still alerted to the fact that something went wrong. This allows me to report all kinds of debug information that people may/may not want to see (ie. file not found).

2
ackbarr
Re: Removing the intermediate flash screen

forgive my ignorance - but couldn't you accomplish the same thing by modifying the system_redirect.html template in "System" -> "Templates" ?

3
djsckizo
Re: Removing the intermediate flash screen
  • 2003/10/1 1:24

  • djsckizo

  • Just can't stay away

  • Posts: 401

  • Since: 2003/5/9 8


You mean he just came up with all that for nothing?

4
hsalazar
Re: Removing the intermediate flash screen
  • 2003/10/1 1:32

  • hsalazar

  • Just popping in

  • Posts: 78

  • Since: 2003/2/6 1


I believe this is not about changing the look & feel of the redirect page, but about getting rid of it. That's at least my gross interpretation, and I do think there's much to discuss about better ways of giving the user feedback.

Let's say, for instance, that you get the feedback message in a DIV and make it visible in the target page. This way you'd never lose the XOOPS interface and still would have your informational messages.

Obviously, the idea would be that if what you do succeeds, you go to the target page and see there a success message, while if you fail (for instance, if you don't have the rights to access some part of the site), you never leave the page, but see the failure message.

Is this the idea, or am I wandering lost in another direction?

Cheers.

5
shagreel
Re: Removing the intermediate flash screen
  • 2003/10/1 15:14

  • shagreel

  • Just popping in

  • Posts: 13

  • Since: 2003/1/17


Exactly. I don't want to change the way the redirect page looks at all, I want to remove it completely. The suggestion I made hopefully would keep the information available and at the same time never show the redirect page. It also requires minimal/no code changes through out the system. It could be introduced in an upgrade and all installed modules would still work.

6
Ace_Armstrong
Re: Removing the intermediate flash screen

Quote:

shagreel wrote:
Exactly. I don't want to change the way the redirect page looks at all, I want to remove it completely. The suggestion I made hopefully would keep the information available and at the same time never show the redirect page. It also requires minimal/no code changes through out the system. It could be introduced in an upgrade and all installed modules would still work.


I think it's a great idea.

7
shagreel
Re: Removing the intermediate flash screen
  • 2003/11/25 21:23

  • shagreel

  • Just popping in

  • Posts: 13

  • Since: 2003/1/17


I just wanted to bring this up again. How do I go about getting this into xoops? Who do I ask and converse with to see if it should go in? I hate reaplying the hack each time I update xoops:)


8
skalpa
Re: Removing the intermediate flash screen
  • 2003/11/25 23:21

  • skalpa

  • Quite a regular

  • Posts: 300

  • Since: 2003/4/16


I personally hate those pages...

My opinion about those kind of things is: if you're not supposed to go in there, you shouldn't even know this place exists.
I'm going to talk of this with the mod team, as I think we should ensure these pages aren't needed anymore in the future (if you're not allowed to click on a link, the link won't be displayed anymore).

But I'll think of you "message" idea anyway (I've been working on a similar method to replace the "DB updated" page within the admin).

Skalpa.>

9
shagreel
Re: Removing the intermediate flash screen
  • 2003/11/27 4:40

  • shagreel

  • Just popping in

  • Posts: 13

  • Since: 2003/1/17


Your right, you should never know a page exists if you should not go there. But, It is nice to be able to redirect a page sometimes. For instance after a sending POST data so the user can reload the page without resending the page. So, I like the redirect function, but I hate the intermediate screen.


10
chapi
Re: Removing the intermediate flash screen
  • 2003/11/27 10:16

  • chapi

  • Theme Designer

  • Posts: 611

  • Since: 2002/1/22


But sometimes those redirect pages can be very usefull. If you have many features/modules only for registered users, why not show the anonymous users, that they are available? You can give them the message, that these features only can be accessed after registration.

So both ways should be available to reflect all likes and dislikes of the XOOPS users.

Login

Who's Online

404 user(s) are online (333 user(s) are browsing Support Forums)


Members: 0


Guests: 404


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits