Author Topic: MOD Request: LOGIN / LOGOUT  (Read 6126 times)

0 Members and 1 Guest are viewing this topic.

rinaldos

  • Guest
MOD Request: LOGIN / LOGOUT
« on: November 04, 2007, 04:57:29 PM »
Hallo zusammen,
ich habe folgendes Problem. Wenn ich mich als User auf irgendeiner Seite meiner Homepage befinde und mich dann einlogge, komme ich immer automatisch zu Startseite. Dies passiert auch, wenn ich mich auslogge.
Schöner wäre es, wenn der User sich auch dorthin geleitet wird wo er sich einloggt. Also wenn er am Bild XYZ ist, das er dann auch dort bleibt, und nicht direkt wieder zur Startseite gelangt.
Wo kann ich dieses ändern?

Ich nutze die Version 1.7.4 mit PHP5

Aufgefallen ist es dadurch, als ich den MOD http://www.4homepages.de/forum/index.php?topic=10632.0 eingebaut habe, denn dort passiert es nicht.

Gruß
Ingo
« Last Edit: November 04, 2007, 08:08:20 PM by Nicky »

Offline thunderstrike

  • 4images Guru
  • *******
  • Posts: 2.327
    • View Profile
Re: LOGIN / LOGOUT
« Reply #1 on: November 04, 2007, 05:00:27 PM »
Look for:

Quote
redirect($url);

in login.php and logout.php file.
8 steps need when ask question -

- PHP version (ACP - > phpinfo())
- mySQL version (ACP - > phpinfo())
- 4images version
- Post screenshot / URL
- Post code in BB Code (no need full file for code) or post attach file
- It doesn't work. What is say - what is do for no work
- Install MOD ? If so - please say (troubleshooting)
- Read FAQ ? Install Bug fixes ?

rinaldos

  • Guest
Re: LOGIN / LOGOUT
« Reply #2 on: November 04, 2007, 05:09:40 PM »
Wie müsste ich das denn ändern?
Quote
$main_template = 0;

$nozip = 1;
define('ROOT_PATH', './');
include(ROOT_PATH.'global.php');
require(ROOT_PATH.'includes/sessions.php');
$site_sess->logout($user_info['user_id']);
if (!ereg("index.php", $url) && !ereg("lightbox.php", $url) && !ereg("login.php", $url) && !ereg("register.php", $url) && !ereg("member.php", $url)) {
redirect($url);
}
else {
  redirect("index.php");
}
?>
Das ist die logout.php

Offline thunderstrike

  • 4images Guru
  • *******
  • Posts: 2.327
    • View Profile
Re: LOGIN / LOGOUT
« Reply #3 on: November 04, 2007, 05:14:05 PM »
If click logout, if user in index.php, lightbox.php, login.php, register.php or member.php file - is redirect to index page. If action fail - is redirect to index page. Other - is redirect to last page. ;)
8 steps need when ask question -

- PHP version (ACP - > phpinfo())
- mySQL version (ACP - > phpinfo())
- 4images version
- Post screenshot / URL
- Post code in BB Code (no need full file for code) or post attach file
- It doesn't work. What is say - what is do for no work
- Install MOD ? If so - please say (troubleshooting)
- Read FAQ ? Install Bug fixes ?

rinaldos

  • Guest
Re: LOGIN / LOGOUT
« Reply #4 on: November 04, 2007, 07:13:47 PM »
I think i am tooo stupid :-(

I can change the value in logout.php
Code: [Select]
$main_template = 0;
$nozip = 1;
define('ROOT_PATH', './');
include(ROOT_PATH.'global.php');
require(ROOT_PATH.'includes/sessions.php');
$site_sess->logout($user_info['user_id']);
if (!ereg("index.php", $url) && !ereg("lightbox.php", $url) && !ereg("login.php", $url) && !ereg("register.php", $url) && !ereg("member.php", $url)) {
  redirect($url);
}
else {
  redirect("$url");
}
?>

to $url or index.php, but when i press logout button, i goes direkt to the starting place and didn't stay rinaldos.homeip.net/cat134.htm or so ......

wenn the url ist .../comments_all.php and i press logout the browser stay at this url. what is the different between logout from categorie or logout from comments.php?

Ingo

Offline thunderstrike

  • 4images Guru
  • *******
  • Posts: 2.327
    • View Profile
Re: LOGIN / LOGOUT
« Reply #5 on: November 04, 2007, 07:26:31 PM »
Quote
what is the different between logout from categorie or logout from comments.php?

If log out from categories, session is destroy and cat id is reset from URL so user is redirect to index page.
If log out from comments_all (MOD ?) , session is destroy and comment id is reset from URL so user is redirect to index page.

See diff ? ;)
8 steps need when ask question -

- PHP version (ACP - > phpinfo())
- mySQL version (ACP - > phpinfo())
- 4images version
- Post screenshot / URL
- Post code in BB Code (no need full file for code) or post attach file
- It doesn't work. What is say - what is do for no work
- Install MOD ? If so - please say (troubleshooting)
- Read FAQ ? Install Bug fixes ?

rinaldos

  • Guest
Re: LOGIN / LOGOUT
« Reply #6 on: November 04, 2007, 07:32:05 PM »
comments_all is a MOD from Mawenzi. But i saw, when i logout from any php guestbook.php (MOD), keyword_cloud.php (MOD) i stay at these url :-)

Everytime, when the ending is htm or html, i will be redirect . But the user should not be redirect to any other urls.


Offline thunderstrike

  • 4images Guru
  • *******
  • Posts: 2.327
    • View Profile
Re: LOGIN / LOGOUT
« Reply #7 on: November 04, 2007, 08:03:04 PM »
Quote
But i saw, when i logout from any php guestbook.php (MOD), keyword_cloud.php (MOD) i stay at these url

If so, please post in request & discussions (or Nicky - please move this topic to request).
8 steps need when ask question -

- PHP version (ACP - > phpinfo())
- mySQL version (ACP - > phpinfo())
- 4images version
- Post screenshot / URL
- Post code in BB Code (no need full file for code) or post attach file
- It doesn't work. What is say - what is do for no work
- Install MOD ? If so - please say (troubleshooting)
- Read FAQ ? Install Bug fixes ?

Offline Nicky

  • Administrator
  • 4images Guru
  • *****
  • Posts: 3.195
    • View Profile
Re: MOD Request: LOGIN / LOGOUT
« Reply #8 on: November 04, 2007, 08:08:46 PM »
done
cheers
Nicky
Your first three "must do" before you ask a question ! (© by V@no)
- please read the Forum Rules ...
- please study the FAQ ...
- please try to Search for your answer ...

nicky.net 4 4images
Signature stolen from mawenzi