Advanced search  

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Pages: [1]   Go Down

Author Topic: most viewed in keyword album > No image to display  (Read 5300 times)

0 Members and 1 Guest are viewing this topic.

Tranz

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Female
  • Posts: 6149
most viewed in keyword album > No image to display
« on: December 26, 2005, 04:39:48 pm »

Here's a keyword album's most viewed page: http://takethu.com/thumbnails.php?album=topn&cat=-17&page=1

When I click on a thumbnail, it shows an error message: No image to display.

This also happens to a cpg-contrib keyword album: http://cpg-contrib.org/thumbnails.php?album=topn&cat=-6
« Last Edit: December 27, 2005, 09:06:55 pm by TranzNDance »
Logged

donnoman

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1615
  • From donovanbray.com
    • Donovan Bray
Re: most viewed in keyword album > No image to display
« Reply #1 on: December 26, 2005, 10:48:15 pm »

Thumbnails keeps track of the album keyword by setting $CURRENT_ALBUM_KEYWORD before calling get_pic_data.

It can be addressed by doing this.  However this still leaves a secondary complaint that I've seen with keyworded albums, in that when you go to displayimage, your focus is changed to that images NATIVE category rather than maintaining the keyworded category.

find
Code: [Select]
$META_ALBUM_SET = $ALBUM_SET; //displayimage uses $ALBUM_SET but get_pic_data in functions now uses $META_ALBUM_SET

// Retrieve data for the current picture

replace with
Code: [Select]
$META_ALBUM_SET = $ALBUM_SET; //displayimage uses $ALBUM_SET but get_pic_data in functions now uses $META_ALBUM_SET

//attempt to fix topn images for keyworded albums
if ($cat < 0) {
    $result = cpg_db_query("SELECT category, title, aid, keyword, description, alb_password_hint FROM {$CONFIG['TABLE_ALBUMS']} WHERE aid='" . (- $cat) . "'");
    if (mysql_num_rows($result) > 0) {
        $CURRENT_ALBUM_DATA = mysql_fetch_array($result);
        $CURRENT_ALBUM_KEYWORD = $CURRENT_ALBUM_DATA['keyword'];
    }
}

// Retrieve data for the current picture
Logged

Tranz

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Female
  • Posts: 6149
Re: most viewed in keyword album > No image to display
« Reply #2 on: December 26, 2005, 11:51:20 pm »

Great! That fixed it. Thanks.
Logged

Tranz

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Female
  • Posts: 6149
Re: most viewed in keyword album > No image to display
« Reply #3 on: December 27, 2005, 09:06:44 pm »

Fix committed to CVS.
Logged
Pages: [1]   Go Up
 

Page created in 0.018 seconds with 18 queries.