Пример #1
0
/**
 * Prints the breadcrumb navigation for album, gallery and image view.
 *
 * @param string $before Insert here the text to be printed before the links
 * @param string $between Insert here the text to be printed between the links
 * @param string $after Insert here the text to be printed after the links
 * @param mixed $truncate if not empty, the max lenght of the description.
 * @param string $elipsis the text to append to the truncated description
 */
function printParentBreadcrumb($before = NULL, $between = NULL, $after = NULL, $truncate = NULL, $elipsis = NULL)
{
    $crumbs = getParentBreadcrumb();
    if (!empty($crumbs)) {
        if (is_null($between)) {
            $between = ' | ';
        }
        if (is_null($after)) {
            $after = ' | ';
        }
        if (is_null($elipsis)) {
            $elipsis = '...';
        }
        if ($before) {
            $output = '<span class="beforetext">' . html_encode($before) . '</span>';
        } else {
            $output = '';
        }
        if ($between) {
            $between = '<span class="betweentext">' . html_encode($between) . '</span>';
        }
        $i = 0;
        foreach ($crumbs as $crumb) {
            if ($i > 0) {
                $output .= $between;
            }
            //cleanup things in description for use as attribute tag
            $desc = $crumb['title'];
            if (!empty($desc) && $truncate) {
                $desc = truncate_string($desc, $truncate, $elipsis);
            }
            $output .= '<a href="' . html_encode($crumb['link']) . '"' . ' title="' . html_encode(getBare($desc)) . '">' . html_encode($crumb['text']) . '</a>';
            $i++;
        }
        if ($after) {
            $output .= '<span class="aftertext">' . html_encode($after) . '</span>';
        }
        echo $output;
    }
}
Пример #2
0
/images/logo-on.gif')">
<?php 
zp_apply_filter('theme_body_open');
?>
<div id="main">

  <div id="title">
	<h1>
	  <a href="<?php 
echo getGalleryIndexURL();
?>
" title="Gallery Index"><?php 
echo getGalleryTitle();
?>
</a><?php 
if (getParentBreadcrumb()) {
    printParentBreadcrumb(" | ", "", "");
}
?>
 | <?php 
printAlbumTitle(true);
?>
	</h1>
	<a href="<?php 
echo getGalleryIndexURL();
?>
" onmouseout="IB_restore()" onmouseover="IB_swap('logo','','<?php 
echo $_zp_themeroot;
?>
/images/logo-on.gif',1)"  title="Home">
	  <img src="<?php