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: Hide breadcrump from guest but show it to logged in users  (Read 2441 times)

0 Members and 1 Guest are viewing this topic.

questions

  • Coppermine newbie
  • Offline Offline
  • Posts: 4
Hide breadcrump from guest but show it to logged in users
« on: July 10, 2009, 12:10:04 pm »

Hi,

is there a way to hide the breadcrump from guests but still show it to logged in users? I deleted the "breadcrump" part under Config/Album list view for the breadcrump to disappear but if there's a way I'd like my users to still see it. I just do not want the guests to go back to "Home" to find out I have many categories but do not allow them to view anything in them (all albums except for one are only visible to registered users). I am planning to give a direct link to the album's page for the guests so they do not have to navigate through my gallery. It works fine the way I organized it now but I'd still like to have the comfort of a breadcrump for me as an admin and my registered users.

Best wishes,
Jenni
Logged

Nibbler

  • Guest
Re: Hide breadcrump from guest but show it to logged in users
« Reply #1 on: July 10, 2009, 12:21:38 pm »

Add this code to your custom theme.php

Code: [Select]
function theme_display_breadcrumb($breadcrumb, &$cat_data)
{
    /**
     * ** added breadcrumb as a seperate element
     */
    global $template_breadcrumb, $lang_breadcrumb;

    if (!USER_ID) {
        return false;
    }

    starttable('100%');
    if ($breadcrumb) {
        $template = template_extract_block($template_breadcrumb, 'breadcrumb');
        $params = array('{BREADCRUMB}' => $breadcrumb
            );
        echo template_eval($template, $params);
    }
        endtable();
}
Logged

questions

  • Coppermine newbie
  • Offline Offline
  • Posts: 4
Re: Hide breadcrump from guest but show it to logged in users
« Reply #2 on: July 10, 2009, 12:28:56 pm »

Thank your very much. The support is terrific.
Logged
Pages: [1]   Go Up
 

Page created in 0.017 seconds with 20 queries.