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: No breadcrumb on searched thumbnail page?  (Read 4074 times)

0 Members and 1 Guest are viewing this topic.

jaus

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 84
No breadcrumb on searched thumbnail page?
« on: December 09, 2013, 05:04:32 pm »

Is there a simple way to disable the breadcrumb on the intermediate image display page when the image has been displayed from a set of searched thumbnails?

I have a number of albums that contain a large number of images that are hidden from browsing (via this mod: http://forum.coppermine-gallery.net/index.php/topic,76815.0.html) , but visible via search.  When an image in one of these albums is displayed, the breadcrumb points to the hidden album and is confusing as the album has a cryptic name and the user never sees it when browsing.

Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: No breadcrumb on searched thumbnail page?
« Reply #1 on: December 16, 2013, 12:35:08 pm »

Copy the function theme_display_breadcrumb from themes/sample/theme.php to your theme's theme.php file, if it doesn't exist.

Then, find
Code: [Select]
starttable('100%');and above, add
Code: [Select]
    global $CPG_PHP_SELF;
    $superCage = Inspekt::makeSuperCage();
    if ($CPG_PHP_SELF == 'displayimage.php' && $superCage->get->keyExists('album') && $superCage->get->getAlpha('album') == 'search') {
        return;
    }
Logged

jaus

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 84
Re: No breadcrumb on searched thumbnail page?
« Reply #2 on: December 16, 2013, 11:44:11 pm »

That worked, Thanks!

Actually, perhaps a more useful solution would be to replace the normal breadcrumb with a simple link that would return the user to the search results, just as the 'return to thumbnail page' icon does.  Is that simple to do?   I know that is a little redundant, but the link would be more obvious to users accustomed to using the breadcrumb to navigate.
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: No breadcrumb on searched thumbnail page?
« Reply #3 on: December 17, 2013, 10:11:46 am »

Replace the custom code with
Code: [Select]
    global $CPG_PHP_SELF, $lang_meta_album_names;
    $superCage = Inspekt::makeSuperCage();
    if ($CPG_PHP_SELF == 'displayimage.php' && $superCage->get->keyExists('album') && $superCage->get->getAlpha('album') == 'search') {
        $breadcrumb = '<a href="thumbnails.php?album=search">'.$lang_meta_album_names['search'].'</a>';
    }
Logged

jaus

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 84
Re: No breadcrumb on searched thumbnail page?
« Reply #4 on: December 17, 2013, 12:54:44 pm »

Bingo.  Thanks again.
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: No breadcrumb on searched thumbnail page?
« Reply #5 on: December 17, 2013, 01:26:00 pm »

Please
tag your thread as "solved" by clicking on the "Topic Solved" button on the bar at the left hand side at the bottom of your thread.
Logged
Pages: [1]   Go Up
 

Page created in 0.03 seconds with 20 queries.