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

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

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