Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: Automatic redirection to first album page within a category  (Read 4952 times)

0 Members and 1 Guest are viewing this topic.

peterlustig

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 50
Automatic redirection to first album page within a category
« on: October 26, 2010, 03:41:20 pm »

Dear all,

having migrated from 1.4.27 to 1.5.8 (also only with your help...) and having had a realm look on the features and built of the new coppermine, I have to say: THANK YOU! Looks and feels really good!

However, I still have some bugs/minor problems which I'd like to report (I am using Firefox 3.5), here's the second one:

2. Automatic redirection to first album page within a category
When having chosen an album on e.g. the third page of a category (e.g. album France in category Regions > Europe > France) and then clicking on the category again (i.e. "Europe") in order to view other albums, the album list start again on the first page of all albums of this category. As far as I can remember this was different in cpg 1.4.27, i.e. clicking on the category lead to the previously activated third page of the category "Europe". Is there any way to change the currently implemented behaviour?

Thanks a lot in advance for any help!

Best, Peter
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Automatic redirection to first album page within a category
« Reply #1 on: October 29, 2010, 12:03:03 pm »

Please post a link to your gallery so we can reproduce what you're talking about.
Logged

peterlustig

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 50
Re: Automatic redirection to first album page within a category
« Reply #2 on: October 29, 2010, 02:00:32 pm »

Ich schicke Dir eine PN
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Automatic redirection to first album page within a category
« Reply #3 on: October 29, 2010, 02:15:09 pm »

Sending PMs has been disabled for regular users. Please post it here.
Logged

peterlustig

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 50
Re: Automatic redirection to first album page within a category
« Reply #4 on: October 29, 2010, 03:02:13 pm »

Sorry for switching to German -- didn't pay attention.

My website is strictly private, I don't want to share a link to it on the www. I sent a private message to you before I read this, you once provided me with your email (you already helped me some time ago). In case this is not welcome, pls just ignore it. Don't want to hassle you.
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Automatic redirection to first album page within a category
« Reply #5 on: October 29, 2010, 03:57:01 pm »

As far as I can remember this was different in cpg 1.4.27, i.e. clicking on the category lead to the previously activated third page of the category "Europe".
For the record: it has been stored in the data cookie (value 'lap') in cpg1.4.x. I don't know why it has been removed or if it was intended at all.
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Automatic redirection to first album page within a category
« Reply #6 on: October 29, 2010, 04:14:09 pm »

It has been removed in r4578.

Please try the following. Open index.php, find
Code: [Select]
    /**
    * See if $page has been passed in GET
    */
    if (isset($page)) {
        $PAGE = max($page, 1);
    } else {
        $PAGE = 1;
    }
and replace with
Code: [Select]
    /**
    * See if $page has been passed in GET
    */
    if (isset($page)) {
        $PAGE = max($page, 1);
        $USER['lap'] = $PAGE;
    } elseif (isset($USER['lap'])) {
        $PAGE = max((int)$USER['lap'], 1);
    } else {
        $PAGE = 1;
    }

Not tested. Please report if it works or if any unexpected behavior occurs.
Logged

peterlustig

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 50
Re: Automatic redirection to first album page within a category
« Reply #7 on: November 01, 2010, 01:05:27 pm »

Great, thanks a lot, this has done the job.

Thanks! Peter
Logged
Pages: [1]   Go Up
 

Page created in 0.017 seconds with 19 queries.