Author Topic: [ADDON] LOGIN & LOGOUT ohne redirect  (Read 8056 times)

0 Members and 1 Guest are viewing this topic.

rinaldos

  • Guest
[ADDON] LOGIN & LOGOUT ohne redirect
« on: October 03, 2008, 02:42:36 PM »
Dieses ADDON ermöglicht es dem User irgendwo in der Galerie einzuloggen, ohne auf die Startseite umgeleitet zu werden. Befindet sich ein Nutzer gerade auf einer der Seiten member.php register.php, lightbox.php und index.php und loggt sich aus, so wird er auf die Startseite umgeleitet (Standard 4images).

Es kann hier getestet http://4images.rinaldos.homeip.net Username test Passwort test
---
This ADDON allows the user anywhere in the gallery log in, without having to be redirected home. If a user is on one of the sides member.php register.php, and lightbox.php index.php and log out, it will be redirected to the home page (default 4images).

You can test it on http://4images.rinaldos.homeip.net Username test Passwort test

login.php
finde 2 mal
search 2 times
Code: [Select]
    redirect($url);
ersetze mit
replace with
Code: [Select]
  $referer = $_SERVER['HTTP_REFERER'];
  redirect($referer);

logout.php
finde
search
Code: [Select]
    redirect($url);
ersetze mit
replace with
Code: [Select]
  $referer = $_SERVER['HTTP_REFERER'];
  redirect($referer);

Gruß
Ingo

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: [ADDON] LOGIN & LOGOUT ohne redirect
« Reply #1 on: October 03, 2008, 03:00:31 PM »
actually I'm not sure if its a bug or a future, but if you replace in global.php:
  $url get_basefile(getenv("HTTP_REFERER"));


with:
  $url get_basename(getenv("HTTP_REFERER"));


it should redirect to the same page, with a few exeptions.

P.S.
I shall find out if its a bug or a "feature"...
« Last Edit: October 03, 2008, 03:11:36 PM by V@no »
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

rinaldos

  • Guest
Re: [ADDON] LOGIN & LOGOUT ohne redirect
« Reply #2 on: October 03, 2008, 03:11:10 PM »
actually I'm not sure if its a bug or a future, but if you replace in global.php:
  $url get_basefile(getenv("HTTP_REFERER"));


with:
  $url get_basename(getenv("HTTP_REFERER"));


it should redirect to the same page, with a few exeptions.

You mean
Code: [Select]
  $url = "index.php";

with this?
Code: [Select]
$url = get_basename(getenv("HTTP_REFERER"));
Ingo

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: [ADDON] LOGIN & LOGOUT ohne redirect
« Reply #3 on: October 03, 2008, 03:14:19 PM »
no, I meant what I meant ;)
instead of using url_basefile() function use url_basename()
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

rinaldos

  • Guest
Re: [ADDON] LOGIN & LOGOUT ohne redirect
« Reply #4 on: October 03, 2008, 03:22:05 PM »
OK, i didn't saw the difference, but basename and basefile is the difference
 :oops:

Offline V@nо

  • Addicted member
  • ******
  • Posts: 1.223
    • View Profile
Re: [ADDON] LOGIN & LOGOUT ohne redirect
« Reply #5 on: October 03, 2008, 06:30:33 PM »
Correct. These are the exeptions I've mentioned.
I'll see if there a better way filter out unwanted URLs
Your first three "must do" before you ask a question:
If I asked you to PM me, I meant PM to my primary account, this account doesn't accept PMs.

Offline V@nо

  • Addicted member
  • ******
  • Posts: 1.223
    • View Profile
Re: [ADDON] LOGIN & LOGOUT ohne redirect
« Reply #6 on: October 03, 2008, 06:33:39 PM »
my reply above was to ivan's first message....
As of the code ivan proposed, there are a few pages visitor should not be redirected, i.e. register.php
Your first three "must do" before you ask a question:
If I asked you to PM me, I meant PM to my primary account, this account doesn't accept PMs.

Offline Sunny C.

  • Addicted member
  • ******
  • Posts: 1.806
  • I ♥ 4I
    • View Profile
Re: [ADDON] LOGIN & LOGOUT ohne redirect
« Reply #7 on: October 03, 2008, 06:34:27 PM »
Dankeschön!

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: [ADDON] LOGIN & LOGOUT ohne redirect
« Reply #8 on: October 04, 2008, 10:54:31 PM »
hey vano....
you have two login names  :oops:

Yes, I'm using non-administrator account if I'm not on my computer.

P.S.
still waiting for a reply from developer(s) regarding this issue.
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)