Author Topic: redirect detals.php page  (Read 11947 times)

0 Members and 1 Guest are viewing this topic.

Offline masterred

  • Sr. Member
  • ****
  • Posts: 494
    • View Profile
redirect detals.php page
« on: January 14, 2008, 08:36:02 AM »
Hello
As I do, that since details.php is redirected to the same page when you login

That is, if I am looking at a picture and I want to comment that when you login to send me the same page as I am watching.

thanks
Apache/2.2.21 (Win32)
PHP/5.3.5
Mysql Version: 5.5.19
4images Version: 1.7.?



Offline thunderstrike

  • 4images Guru
  • *******
  • Posts: 2.327
    • View Profile
Re: redirect detals.php page
« Reply #1 on: January 14, 2008, 01:21:13 PM »
In includes/sessions.php file,

find:

Code: [Select]
function login($user_name = "", $user_password = "", $auto_login = 0, $set_auto_login = 1) {
    global $site_db, $user_table_fields;

replace:

Code: [Select]
function login($user_name = "", $user_password = "", $auto_login = 0, $set_auto_login = 1) {
    global $site_db, $user_table_fields, $url, $image_id;

find:

Code: [Select]
$this->start_session($user_id, 1);
        return true;

add after:

Code: [Select]
if (preg_match("/details\.php/", $url) && isset($image_id) && !empty($image_id)) {
   redirect("details.php?" . URL_IMAGE_ID . "=" . $image_id);
}
« Last Edit: August 27, 2011, 02:04:06 PM by thunderstrike »
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 masterred

  • Sr. Member
  • ****
  • Posts: 494
    • View Profile
Re: redirect detals.php page
« Reply #2 on: January 15, 2008, 07:29:49 AM »

Hello

I get redirected to index.php


i see
« Last Edit: January 15, 2008, 07:39:50 AM by masterred »
Apache/2.2.21 (Win32)
PHP/5.3.5
Mysql Version: 5.5.19
4images Version: 1.7.?



Offline thunderstrike

  • 4images Guru
  • *******
  • Posts: 2.327
    • View Profile
Re: redirect detals.php page
« Reply #3 on: January 15, 2008, 02:10:59 PM »
Ok, I edit topic.
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 masterred

  • Sr. Member
  • ****
  • Posts: 494
    • View Profile
Re: redirect detals.php page
« Reply #4 on: January 16, 2008, 08:23:11 AM »
hi

no working  redirected to index.php again
Apache/2.2.21 (Win32)
PHP/5.3.5
Mysql Version: 5.5.19
4images Version: 1.7.?



Offline thunderstrike

  • 4images Guru
  • *******
  • Posts: 2.327
    • View Profile
Re: redirect detals.php page
« Reply #5 on: January 16, 2008, 01:05:00 PM »
Sorry. I no can remake this error. 4images version ?
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 masterred

  • Sr. Member
  • ****
  • Posts: 494
    • View Profile
Re: redirect detals.php page
« Reply #6 on: January 17, 2008, 07:08:14 AM »
hi

last version 1.7.4

thanks
Apache/2.2.21 (Win32)
PHP/5.3.5
Mysql Version: 5.5.19
4images Version: 1.7.?



Offline thunderstrike

  • 4images Guru
  • *******
  • Posts: 2.327
    • View Profile
Re: redirect detals.php page
« Reply #7 on: January 17, 2008, 11:54:23 PM »
I edit post.
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 masterred

  • Sr. Member
  • ****
  • Posts: 494
    • View Profile
Re: redirect detals.php page
« Reply #8 on: January 18, 2008, 07:40:04 AM »
hi

Does not work either, perhaps because of the type of url that is not equal to the others, proves in a clean installation, I am working on locahost not know if this has anything to do.

thanks

Hello again

Perform the modification installation in a new and still redirect details.php, I sent to index.php, will have to be modified somewhat in the user_loginform.html?
« Last Edit: January 18, 2008, 08:05:36 AM by masterred »
Apache/2.2.21 (Win32)
PHP/5.3.5
Mysql Version: 5.5.19
4images Version: 1.7.?



Offline thunderstrike

  • 4images Guru
  • *******
  • Posts: 2.327
    • View Profile
Re: redirect detals.php page
« Reply #9 on: January 18, 2008, 02:33:06 PM »
Ok, I try different in post. Redo step (restore fresh login.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 ?