1
patagon
More helpful redirection
  • 2007/7/13 7:06

  • patagon

  • Quite a regular

  • Posts: 235

  • Since: 2002/1/8 0


Hi,

Whenever someone tries to post an article on my site, if they are not registered/loged in, they see a message 'you dont have persmission..' and get redirected back to where they were. To test this please go tohttp://www.descontrol.org/modules/denuncia/ and click on the 3rd item on left main menu (my site is in spanish, but its easy to find your way, third item on the menu is called 'enviar denuncia'). This is basically a 'submit article'. I think it would be more helpful if an unregistered/not loged user gets redirected to login/register instead of this...some registered users had problems understanding that the issue is that they have to log in before sending. Anyone else has this problem, can suggest a solution?

thanks

2
patagon
Re: More helpful redirection
  • 2007/7/14 14:26

  • patagon

  • Quite a regular

  • Posts: 235

  • Since: 2002/1/8 0


up!

3
kurak_bu
Re: More helpful redirection
  • 2007/7/14 14:54

  • kurak_bu

  • Quite a regular

  • Posts: 342

  • Since: 2005/9/5 1


1.You can look at language files for "No tiene permiso de acceso" and change it to your text

4
BlueStocking
Re: More helpful redirection

http://www.descontrol.org/modules/denuncia/edit.article.php
The link you pointed us to leads to the above link.

Looking at edit.article.php the code is as follows:
meaning...

The refresh link should be changed tohttp://www.descontrol.org/register.php
to accomplish what you asked for.
Both links in this code may need to be replaced with the above link to your register page.

<html>
<
head>
<
meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<
meta http-equiv="Refresh" content="2; url=[color=990000]http://www.descontrol.org/modules/denuncia/index.php[/color]" />
<
title>Descontrol.org</title>

</
head>
<
body bgcolor="#809dbc"><br><br>
<
div style="text-align: center; color #AAAAAA; font-weight: normal; font-family: Arial, Helvetica, sans-serif;">
  <
h3 style="color: Silver;"><font color="#FFFFFF">No tiene permiso de acceso</font></h3>
  <
p style="color: Silver;">Si la página no carga automáticamente, <br />por favorhaga clic <a href=[color=990000]'http://www.descontrol.org/modules/denuncia/index.php'[/color]>aquí</a></p>
</
div>
</
body>
</
html>
https://xoops.org/modules/repository .. It is time to get involved - XOOPS.ORG

5
patagon
Re: More helpful redirection
  • 2007/7/15 0:13

  • patagon

  • Quite a regular

  • Posts: 235

  • Since: 2002/1/8 0


thanks kurak_bu and bluestocking. I think it should be changed to user.php instead of register, so a user can login if if he is already registered. I am still trying to find how to change that, but I doubt that after the login the user gets redirected to what they were trying to do...

say you are click on submit article, you are not loged in, so you get redirected to login. you login, and after that you should automatically return to what you were trying to do, that is submit article. same if you have to register...AFAIk it doesnt work like that, but I think this is the intuitive way it should work..

6
BlueStocking
Re: More helpful redirection

How about log in and then told to hit back button or wait to be referred to homepage... make wait time longer

Just a thought...
https://xoops.org/modules/repository .. It is time to get involved - XOOPS.ORG

7
patagon
Re: More helpful redirection
  • 2007/7/15 0:40

  • patagon

  • Quite a regular

  • Posts: 235

  • Since: 2002/1/8 0


I managed to fix the first problem by changing this in edit.article.php (line 57):

redirect_header(XOOPS_URL."/modules/".$GLOBALS["artdirname"]."/index.php", 2, art_constant("MD_NOACCESS"));

to:

redirect_header(XOOPS_URL."/user.php", 2, art_constant("MD_NOACCESS"));

this works like this: if you are not loged in, sends you to the login page, once you login there you go back to submit as expected.

I havent managed to make it go back if you click register from there (say you are not registered instead of not loged in) but I think this is an improvment..both should be better though.

Login

Who's Online

185 user(s) are online (129 user(s) are browsing Support Forums)


Members: 0


Guests: 185


more...

Donat-O-Meter

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

Latest GitHub Commits