forum.coppermine-gallery.net

Support => cpg1.5.x Support => cpg1.5 themes (visuals) => Topic started by: jaus on December 09, 2013, 05:04:32 pm

Title: No breadcrumb on searched thumbnail page?
Post by: jaus 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.

Title: Re: No breadcrumb on searched thumbnail page?
Post by: Αndré 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;
    }
Title: Re: No breadcrumb on searched thumbnail page?
Post by: jaus 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.
Title: Re: No breadcrumb on searched thumbnail page?
Post by: Αndré 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>';
    }
Title: Re: No breadcrumb on searched thumbnail page?
Post by: jaus on December 17, 2013, 12:54:44 pm
Bingo.  Thanks again.
Title: Re: No breadcrumb on searched thumbnail page?
Post by: Αndré 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.