News:

Wondering if this will always be free?  See why free is better.

Main Menu

Remember Position After Login/Logout

Started by vbgamer45, August 30, 2010, 06:37:52 PM

Previous topic - Next topic

vbgamer45

Link to the mod

Link al Archivo

[glow=black,2,300]Remember Position After Login/Logout | Recordar tu posición al entrar/salir[/glow]
Developed by distante for SMFSimple.com
SMF 1.1.x - 2 RCx - 2.0



[glow=black,2,300]El soporte oficial de los desarrolladores de nuestros mods lo encontraras en www.SMFSimple.com
Official Support in www.SMFSimple.com
[/glow]



[glow=black,2,300]Description:[/glow]
This simple Mod allows your forum users to stay in the same page where they login or logout. If they login in the login page like yourforum.com/index.php?action=login or yourforum.com/login/ (if you use Pretty Urls) then they will be redirected to your forum's main page.



[glow=black,2,300]Descripcion:[/glow]
Este simple mod le permite a los usuarios de tu foro mantenerse en la misma pagina donde se loguean o desloguean. Si ellos entran desde la pagina de logueo como yourforum.com/index.php?action=login o yourforum.com/login/ (si usas Pretty Urls) entonces serán redireccionados a la pagina principal de tu foro.





[glow=black,2,300]Features:[/glow]
  • Compatible with PrettyUrls /login/ url

[glow=black,2,300]Caracteristicas:[/glow]
  • Compatible con Urls de Pretty Url




[glow=black,2,300][/color][/size]Remember Position After Login/Logout | Recordar tu posición al entrar/salir[size=78%][/glow]
[glow=black,2,300]
[/size]Copyright 2011-2012 | SMFSimple.com[size=78%][/glow]
[/size]
If you Find This Mod helpful, please think about give a little donation to the additional author.
[size=78%]
Remember to do a backup before install ANY mod
Recuerde hacer un backup antes de instalar CUALQUIER mod
(¿backups?)

[/size]
[size=78%]This mod modifies :
- Sources/LogInOut.php
[/size][/center]
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Tokzu

Gracias por el mod, es justo lo que andaba buscando.  ;D
"I don't need a knight in a shinny armor, I need a angel in a trench coat"

My mods:

Sum41

Amigo encontre una falla, no es falla en si pero me gustaria que si se pudiera implementar se implementara...

Se trata de que por ejemplo estas viendo un tema como invitado y te quieres logear, lo haces pero te equivocas en tu contraseña o algo, te marca error y te manda a la pagina de login, entonces, pones tu cuenta y password bien y te redireciona al index, me gustaria que en vez de esto te redireccionara al tema que estas viendo, no se si me explique bien pero bueno, cualquier detalle me dices :D.

Saludos

distante

Apuntado! Sum41! lo tendré en cuenta para la revisión, tengo que ver como mantener la pagina en memoria.

Gracias por el detalle ;)

distante


Stigmartyr

Broken for me, but I am also using enotify.  In your package the 3rd edit wants me to replace the code below with your php:

if (empty($_SESSION['login_url']))
redirectexit();



But when I look for it mine looks like this:

if (strpos($_SESSION['login_url'], 'enotify') || empty($_SESSION['login_url']))
redirectexit();


I hope they are compatible, otherwise I am wondering if it has something to do with Pretty URL's mod which I am also using. 

distante

No, this mod works fine with Pretty URL.

This problem with Enotify was already notified to me. But I don't Know how Enotify works.

Stigmartyr

Quote from: distante on January 11, 2011, 12:17:30 AM
No, this mod works fine with Pretty URL.

This problem with Enotify was already notified to me. But I don't Know how Enotify works.

I'm not sure either but perhaps the two mods may be able to coexist?

The issue comes up in the final (3rd) edit only and as I noted above there are only slight differences, but I don't know how to code around it.


distante

Have you try just replace the if (empty($_SESSION['login_url'])) ?? like this?


      if (strpos($_SESSION['login_url'], 'enotify') || empty($_SESSION['login_url']))
      {
      //Let's see if the REFERER is empty if it's no, take the next step
         if (!empty($_SERVER['HTTP_REFERER']))
         {
            //verify if we are in the login page or some other place.
            if ($_SERVER['HTTP_REFERER']==$boardurl.'/index.php?action=login' or $_SERVER['HTTP_REFERER']==$boardurl.'/login/')
            {
            redirectexit(); //Let's go to the main page!
            }
            else
            {
            redirectexit($_SERVER['HTTP_REFERER']); //Go back to the page where we login
            }
         }
         else
         {
            redirectexit(); //There's no HTTP_REFERER, go to the main page.
         }
      }

[Lucien]

I'm using SMF 2.0.2 and SimplePortal 2.3.4

distante


Stigmartyr

Quote from: distante on January 26, 2011, 10:18:02 AM
glad to be helpful ;)

Hey hey!  Thanks a ton dude!  Seems to work.




Except one tiny thing..  When I connect with facebook, it redirects to the home page still... looking into it as thats not ur mod but I'll let you know what I find

distante



distante

Well the login from facebook use other instance that the login file of smf I think :-\

DoctorMalboro

If you're using facebook connect, i'm pretty sure it has a standalone redirection... which SMF version are you using?

Stigmartyr

Quote from: DoctorMalboro on February 03, 2011, 11:58:59 PM
If you're using facebook connect, i'm pretty sure it has a standalone redirection... which SMF version are you using?

SMF 2.0 RC2

I hadn't seen anything about redirection, sorry.

Stigmartyr

Quote from: DoctorMalboro on February 03, 2011, 11:58:59 PM
If you're using facebook connect, i'm pretty sure it has a standalone redirection... which SMF version are you using?

Is there something else I can do?  I will try to ask the SMF dev too

Jeet Chowdhury

test failed here,

   Find   
      if (empty($_SESSION['login_url']))
         redirectexit();
    Replace   
      if (empty($_SESSION['login_url']))
      {
      //Let's see if the REFERER is empty if it's no, take the next step
         if (!empty($_SERVER['HTTP_REFERER']))
         {
            //verify if we are in the login page or some other place.
            if ($_SERVER['HTTP_REFERER']==$boardurl.'/index.php?action=login' or $_SERVER['HTTP_REFERER']==$boardurl.'/login/')
            {
            redirectexit(); //Let's go to the main page!
            }
            else
            {
            redirectexit($_SERVER['HTTP_REFERER']); //Go back to the page where we login
            }
         }
         else
         {
            redirectexit(); //There's no HTTP_REFERER, go to the main page.
         }
      }
 

distante

If you are using a mod that changes the file, you need to look up for the changed code, like this:
Quote from: Stigmartyr on January 13, 2011, 06:08:14 PM
Quote from: distante on January 11, 2011, 12:17:30 AM
No, this mod works fine with Pretty URL.

This problem with Enotify was already notified to me. But I don't Know how Enotify works.

I'm not sure either but perhaps the two mods may be able to coexist?

The issue comes up in the final (3rd) edit only and as I noted above there are only slight differences, but I don't know how to code around it.


Quote from: distante on January 14, 2011, 12:49:47 AM
Have you try just replace the if (empty($_SESSION['login_url'])) ?? like this?


      if (strpos($_SESSION['login_url'], 'enotify') || empty($_SESSION['login_url']))
      {
      //Let's see if the REFERER is empty if it's no, take the next step
         if (!empty($_SERVER['HTTP_REFERER']))
         {
            //verify if we are in the login page or some other place.
            if ($_SERVER['HTTP_REFERER']==$boardurl.'/index.php?action=login' or $_SERVER['HTTP_REFERER']==$boardurl.'/login/')
            {
            redirectexit(); //Let's go to the main page!
            }
            else
            {
            redirectexit($_SERVER['HTTP_REFERER']); //Go back to the page where we login
            }
         }
         else
         {
            redirectexit(); //There's no HTTP_REFERER, go to the main page.
         }
      }


Advertisement: