Hide breadcrump from guest but show it to logged in users Hide breadcrump from guest but show it to logged in users
 

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]

Main Menu

Hide breadcrump from guest but show it to logged in users

Started by questions, July 10, 2009, 12:10:04 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

questions

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

Nibbler

Add this code to your custom theme.php


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();
}

questions