/** * Implements theme_breadcrumb() */ function okcdesign_breadcrumb($variables) { $result = theme_plugins_invoke(__FUNCTION__, $variables); if ($result) { return $result; } return theme_breadcrumb($variables); }
/** * breadcrumb() * * Build the breadcrumb navigation * * @param integer $cat * @param string $breadcrumb * @param string $BREADCRUMB_TEXT * @return **/ function breadcrumb($cat, &$breadcrumb, &$BREADCRUMB_TEXT) { global $album, $lang_errors, $lang_list_categories; global $CONFIG, $CURRENT_ALBUM_DATA, $CURRENT_CAT_NAME; $category_array = array(); // first we build the category path: names and id if ($cat != 0) { //Categories other than 0 need to be selected if ($cat >= FIRST_USER_CAT) { $user_name = get_username($cat - FIRST_USER_CAT); if (!$user_name) { $user_name = 'Mr. X'; } $category_array[] = array($cat, $user_name); $CURRENT_CAT_NAME = sprintf($lang_list_categories['xx_s_gallery'], $user_name); $row['parent'] = 1; } else { $result = cpg_db_query("SELECT name, parent FROM {$CONFIG['TABLE_CATEGORIES']} WHERE cid = '{$cat}'"); if (mysql_num_rows($result) == 0) { cpg_die(CRITICAL_ERROR, $lang_errors['non_exist_cat'], __FILE__, __LINE__); } $row = mysql_fetch_array($result); $category_array[] = array($cat, $row['name']); $CURRENT_CAT_NAME = $row['name']; mysql_free_result($result); } while ($row['parent'] != 0) { $result = cpg_db_query("SELECT cid, name, parent FROM {$CONFIG['TABLE_CATEGORIES']} WHERE cid = '{$row['parent']}'"); if (mysql_num_rows($result) == 0) { cpg_die(CRITICAL_ERROR, $lang_errors['orphan_cat'], __FILE__, __LINE__); } $row = mysql_fetch_array($result); $category_array[] = array($row['cid'], $row['name']); mysql_free_result($result); } // while $category_array = array_reverse($category_array); } $breadcrumb_links = array(); $BREADCRUMB_TEXTS = array(); // Add the Home link to breadcrumb $breadcrumb_links[0] = '<a href="index.php">' . $lang_list_categories['home'] . '</a>'; $BREADCRUMB_TEXTS[0] = $lang_list_categories['home']; $cat_order = 1; foreach ($category_array as $category) { $breadcrumb_links[$cat_order] = "<a href=\"index.php?cat={$category[0]}\">{$category[1]}</a>"; $BREADCRUMB_TEXTS[$cat_order] = $category[1]; $cat_order += 1; } //Add Link for album if aid is set if (isset($CURRENT_ALBUM_DATA['aid'])) { $breadcrumb_links[$cat_order] = "<a href=\"thumbnails.php?album=" . $CURRENT_ALBUM_DATA['aid'] . "\">" . $CURRENT_ALBUM_DATA['title'] . "</a>"; $BREADCRUMB_TEXTS[$cat_order] = $CURRENT_ALBUM_DATA['title']; } // we check if the theme_breadcrumb exists... if (function_exists('theme_breadcrumb')) { theme_breadcrumb($breadcrumb_links, $BREADCRUMB_TEXTS, $breadcrumb, $BREADCRUMB_TEXT); return; } // otherwise we have a default breadcrumb builder: $breadcrumb = ''; $BREADCRUMB_TEXT = ''; foreach ($breadcrumb_links as $breadcrumb_link) { $breadcrumb .= ' > ' . $breadcrumb_link; } foreach ($BREADCRUMB_TEXTS as $BREADCRUMB_TEXT_elt) { $BREADCRUMB_TEXT .= ' > ' . $BREADCRUMB_TEXT_elt; } // We remove the first ' > ' $breadcrumb = substr_replace($breadcrumb, '', 0, 3); $BREADCRUMB_TEXT = substr_replace($BREADCRUMB_TEXT, '', 0, 3); //echo $breadcrumb; }
/** * breadcrumb() * * Build the breadcrumb navigation * * @param integer $cat * @param string $breadcrumb * @param string $BREADCRUMB_TEXT * @return **/ function breadcrumb($cat, &$breadcrumb, &$BREADCRUMB_TEXT) { global $lang_list_categories, $lang_common; global $CONFIG, $CURRENT_ALBUM_DATA, $CURRENT_CAT_NAME; $category_array = array(); // first we build the category path: names and id if ($cat != 0) { //Categories other than 0 need to be selected if ($cat >= FIRST_USER_CAT) { $result = cpg_db_query("SELECT name FROM {$CONFIG['TABLE_CATEGORIES']} WHERE cid = " . USER_GAL_CAT); $row = mysql_fetch_assoc($result); $category_array[] = array(USER_GAL_CAT, $row['name']); $user_name = get_username($cat - FIRST_USER_CAT); if (!$user_name) { $user_name = $lang_common['username_if_blank']; } $category_array[] = array($cat, $user_name); $CURRENT_CAT_NAME = sprintf($lang_list_categories['xx_s_gallery'], $user_name); $row['parent'] = 1; } else { $result = cpg_db_query("SELECT p.cid, p.name FROM {$CONFIG['TABLE_CATEGORIES']} AS c,\n {$CONFIG['TABLE_CATEGORIES']} AS p\n WHERE c.lft BETWEEN p.lft AND p.rgt\n AND c.cid = {$cat}\n ORDER BY p.lft"); while ($row = mysql_fetch_assoc($result)) { $category_array[] = array($row['cid'], $row['name']); $CURRENT_CAT_NAME = $row['name']; } mysql_free_result($result); } } $breadcrumb_links = array(); $BREADCRUMB_TEXTS = array(); // Add the Home link to breadcrumb $breadcrumb_links[0] = '<a href="index.php">' . $lang_list_categories['home'] . '</a>'; $BREADCRUMB_TEXTS[0] = $lang_list_categories['home']; $cat_order = 1; foreach ($category_array as $category) { $breadcrumb_links[$cat_order] = "<a href=\"index.php?cat={$category[0]}\">{$category[1]}</a>"; $BREADCRUMB_TEXTS[$cat_order] = $category[1]; $cat_order += 1; } //Add Link for album if aid is set if (isset($CURRENT_ALBUM_DATA['aid'])) { $breadcrumb_links[$cat_order] = "<a href=\"thumbnails.php?album=" . $CURRENT_ALBUM_DATA['aid'] . "\">" . $CURRENT_ALBUM_DATA['title'] . "</a>"; $BREADCRUMB_TEXTS[$cat_order] = $CURRENT_ALBUM_DATA['title']; } // Build $breadcrumb,$BREADCRUMB_TEXT from _links and _TEXTS theme_breadcrumb($breadcrumb_links, $BREADCRUMB_TEXTS, $breadcrumb, $BREADCRUMB_TEXT); }
/** * Return a themed breadcrumb trail. * * @param $vars * - title: An optional string to be used as a navigational heading to give * context for breadcrumb links to screen-reader users. * - title_attributes_array: Array of HTML attributes for the title. It is * flattened into a string within the theme function. * - breadcrumb: An array containing the breadcrumb links. * @return * A string containing the breadcrumb output. * * Lifted from accessible_theme, because John is the man. */ function accessible_theme_breadcrumb(&$vars) { return theme_breadcrumb($vars); }
/** * Return a themed breadcrumb trail. * * @param $vars * - title: An optional string to be used as a navigational heading to give * context for breadcrumb links to screen-reader users. * - title_attributes_array: Array of HTML attributes for the title. It is * flattened into a string within the theme function. * - breadcrumb: An array containing the breadcrumb links. * @return * A string containing the breadcrumb output. * * Lifted from Zen, because John is the man. */ function aurora_breadcrumb(&$vars) { return theme_breadcrumb($vars); }
/** * Mess with the breadcrumb **/ function layoutstudio_preprocess_breadcrumb(&$vars) { $layoutstudio_enable_breadcrumb = theme_get_setting('layoutstudio_enable_breadcrumb'); $layoutstudio_breadcrumb_region = theme_get_setting('layoutstudio_breadcrumb_region'); $layoutstudio_breadcrumb_region_placement = theme_get_setting('layoutstudio_breadcrumb_region_placement'); if (!$layoutstudio_enable_breadcrumb) { $vars['breadcrumb'] = array(); return; } // This doesnt work. need new idea. drupal_add_region_content($layoutstudio_breadcrumb_region, theme_breadcrumb($vars['breadcrumb'])); // kill default breadcrumb }
get_header(); ?> <div id="content"> <?php if (isset($_GET['author_name'])) { $curauth = get_userdatabylogin($author_name); } else { $curauth = get_userdata(intval($author)); } ?> <?php if (function_exists('theme_breadcrumb') && $zen_options['breadcrumb'] != 1) { echo theme_breadcrumb($curauth->display_name); } ?> <div <?php post_class(); ?> > <h2 class="post-title">About <?php echo $curauth->display_name; ?> </h2> <dl class="author-details"> <?php if ($curauth->user_description != '') {