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: [cpg1.4.x]: URLs to images of "Last viewed" & etc. are not permanent  (Read 5756 times)

0 Members and 1 Guest are viewing this topic.

Makc666

  • Translator
  • Coppermine addict
  • **
  • Offline Offline
  • Gender: Male
  • Posts: 1614
  • Русский (ISO-8859-1) - Russian - Русский (Windows)
    • Makc's home page

One of the users in Russian sub-forum pointed out to the fact that for example in "Last viewed" section
(The content of the main page -> lasthits)
it happens so that on big galleries the last viewed images changes very often.

1. User opens the main gallery page and in "Last viewed" sees some thumbnails of some images.

2. Then user clicks the URL of say the first thumbnail like:
http://coppermine-gallery.net/demo/cpg14x/displayimage.php?album=lasthits&cat=0&pos=0

3. And after that he is been get not to the image thumbnail of which he just saw but to another one image.

This happened because while he was scrolling (looking) on the homepage some one looked other images.
And they became "Last viewed".


That it.

The fix for this one is follow.

1. Open file:
./include/themes.inc.php

2. Fined the code:
Code: [Select]
            if ($aid == 'lastalb') {
                $params = array('{CELL_WIDTH}' => $cell_width,
                    '{LINK_TGT}' => "thumbnails.php?album={$thumb['aid']}",
                    '{THUMB}' => $thumb['image'],
                    '{CAPTION}' => $thumb['caption'],
                    '{ADMIN_MENU}' => $thumb['admin_menu']
                    );

3. After add the code:
Code: [Select]
            } elseif ($aid == 'lasthits') {
                $params = array('{CELL_WIDTH}' => $cell_width,
                    '{LINK_TGT}' => "displayimage.php?pos=-{$thumb['pid']}",
                    '{THUMB}' => $thumb['image'],
                    '{CAPTION}' => $thumb['caption'],
                    '{ADMIN_MENU}' => $thumb['admin_menu']
                    );

That it...
Logged

Makc666

  • Translator
  • Coppermine addict
  • **
  • Offline Offline
  • Gender: Male
  • Posts: 1614
  • Русский (ISO-8859-1) - Russian - Русский (Windows)
    • Makc's home page
Re: [cpg1.4.x]: URLs to images of "Last viewed" & etc. are not permanent
« Reply #1 on: September 15, 2008, 11:48:12 pm »

Also I think that all links on the main page must be permanent...

This one can be "fixed" very easy in this code:
Code: [Select]
            } else {
                $params = array('{CELL_WIDTH}' => $cell_width,
                    '{LINK_TGT}' => "displayimage.php?album=$aid$cat_link&pos={$thumb['pos']}$uid_link",
                    '{THUMB}' => $thumb['image'],
                    '{CAPTION}' => $thumb['caption'],
                    '{ADMIN_MENU}' => $thumb['admin_menu']
                    );
            }

Really I was trying to understand why you use links like:
http://coppermine-gallery.net/demo/cpg14x/displayimage.php?album=lasthits&cat=0&pos=0
on the main page...

But I couldn't :)

Just for bookmarks...
  • 'random': random files (leaving random files "on" for huge galleries with more than 10,000 pics might result in performance problems; switch random "off" in this case)
  • 'lastup': last uploads
  • 'topn': most viewed
  • 'toprated': top rated
  • 'lastcom': last comments
  • 'lasthits': last viewed
  • 'anycontent': inserts php-generated content that has to reside within the file 'anycontent.php' into the index page. Can be used to include banner-rotation scripts or similar.
  • 'lastalb': last created albums
Logged

mahdi1234

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 60
Re: [cpg1.4.x]: URLs to images of "Last viewed" & etc. are not permanent
« Reply #2 on: September 16, 2008, 07:40:03 pm »

thanks a lot! I was missing this, especially for last comments :)
Logged

Stramm

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 6006
    • Bettis Wollwelt
Re: [cpg1.4.x]: URLs to images of "Last viewed" & etc. are not permanent
« Reply #3 on: September 16, 2008, 10:37:56 pm »

a mod for that has been posted a long time ago... still missing are eg. the prev/ next links, filmstrip

Makc666

  • Translator
  • Coppermine addict
  • **
  • Offline Offline
  • Gender: Male
  • Posts: 1614
  • Русский (ISO-8859-1) - Russian - Русский (Windows)
    • Makc's home page
Re: [cpg1.4.x]: URLs to images of "Last viewed" & etc. are not permanent
« Reply #4 on: September 21, 2008, 08:36:07 pm »

a mod for that has been posted a long time ago... still missing are eg. the prev/ next links, filmstrip
May be the mod was posted, but... the current way how "Last viewed" & etc. are working with the URL waking them not permanent is not right.
Logged
Pages: [1]   Go Up
 

Page created in 0.019 seconds with 19 queries.