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: Hide breadcrump from guest but show it to logged in users  (Read 1973 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.016 seconds with 21 queries.