当前位置: 首页>>代码示例>>PHP>>正文


PHP build_breadcrumb函数代码示例

本文整理汇总了PHP中build_breadcrumb函数的典型用法代码示例。如果您正苦于以下问题:PHP build_breadcrumb函数的具体用法?PHP build_breadcrumb怎么用?PHP build_breadcrumb使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了build_breadcrumb函数的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: array_merge

<body onload="map_init()" id="top"  class="bcsr-cal no-hero" itemscope itemtype="http://schema.org/WebPage">
	<?php 
include 'head.php';
?>
	<a name="top"></a>
	<div id="fb-root"></div>
	<script>(function(d, s, id) {
	  var js, fjs = d.getElementsByTagName(s)[0];
	  if (d.getElementById(id)) return;
	  js = d.createElement(s); js.id = id;
	  js.src = "//connect.facebook.net/en_US/all.js#xfbml=1";
	  fjs.parentNode.insertBefore(js, fjs);
	}(document, 'script', 'facebook-jssdk'));</script>
<?php 
$crumbs = array_merge(array(cal_url() . '/index.php?com=digest' => 'Home', cal_url() => 'Calendar'), $crmbAdd);
build_breadcrumb($crumbs);
?>
	
	<section>	
		<article itemscope itemtype="http://schema.org/Place">
			<header>
				<div class="social">
					<div id="cmnt_cnt"><span class="arrow"><span>&nbsp;</span></span><?php 
get_comments_link($myLoc['CommentsID'], $myLoc['CommentsURL'], 1);
?>
</div>
					<div class="socialT">
						<a href="http://twitter.com/share" class="twitter-share-button" data-url="<?php 
echo $myLoc['Link_This'];
?>
" data-text="<?php 
开发者ID:pvidali,项目名称:BCSR-1,代码行数:31,代码来源:location.php

示例2: parse_page

/**
 * Parses the contents of a page before outputting it.
 *
 * @param string The contents of the page.
 * @return string The parsed page.
 */
function parse_page($contents)
{
    global $lang, $theme, $mybb, $htmldoctype, $archive_url, $error_handler;
    $contents = str_replace('<navigation>', build_breadcrumb(1), $contents);
    $contents = str_replace('<archive_url>', $archive_url, $contents);
    if ($htmldoctype) {
        $contents = $htmldoctype . $contents;
    } else {
        $contents = "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n" . $contents;
    }
    $contents = str_replace("<html", "<html xmlns=\"http://www.w3.org/1999/xhtml\"", $contents);
    if ($lang->settings['rtl'] == 1) {
        $contents = str_replace("<html", "<html dir=\"rtl\"", $contents);
    }
    if ($lang->settings['htmllang']) {
        $contents = str_replace("<html", "<html xml:lang=\"" . $lang->settings['htmllang'] . "\" lang=\"" . $lang->settings['htmllang'] . "\"", $contents);
    }
    if ($error_handler->warnings) {
        $contents = str_replace("<body>", "<body>\n" . $error_handler->show_warnings(), $contents);
    }
    return $contents;
}
开发者ID:khanfusiion,项目名称:mybb,代码行数:28,代码来源:functions.php

示例3: build_breadcrumb

 /**
  * Build breadcrumb
  *
  * Creates breadcrumb based on group (id or slug) and current item id
  *
  * @param mixed $group        Group id or slug
  * @param int   $item_id      Current item id
  * @param array $attributes   Any attributes
  * @param array &$tree        Tree array
  * @param array &$output_tree Output tree array
  *
  * @return string
  */
 function build_breadcrumb($group, $item_id, $attributes = array(), &$tree = array(), &$output_tree = array())
 {
     if (empty($tree)) {
         $CI =& get_instance();
         $CI->load->library('adjacency_list');
         $tree = $CI->adjacency_list->get_all($group);
     }
     if (!empty($tree)) {
         foreach ($tree as &$leaf) {
             if ($item_id === (int) $leaf['id']) {
                 array_push($output_tree, $leaf);
                 build_breadcrumb($group, (int) $leaf['parent_id'], $attributes, $tree, $output_tree);
             }
         }
         return format_breadcrumb(array_reverse($output_tree), $item_id, $attributes);
     }
     return '';
 }
开发者ID:eboominathan,项目名称:CodeIgniter-Adjacency-List,代码行数:31,代码来源:adjacency_list_helper.php

示例4: array

	<?php 
include 'head.php';
?>
	<a name="top"></a>
	<div id="fb-root"></div>
	<script>(function(d, s, id) {
	  var js, fjs = d.getElementsByTagName(s)[0];
	  if (d.getElementById(id)) return;
	  js = d.createElement(s); js.id = id;
	  js.src = "//connect.facebook.net/en_US/all.js#xfbml=1";
	  fjs.parentNode.insertBefore(js, fjs);
	}(document, 'script', 'facebook-jssdk'));</script>
<?php 
//$crumbs = array(cal_url().'/index.php?com=digest' => 'Events', cal_url() => 'Calendar',$myLnks['This'] => $myEvnt['Title']);
$crumbs = array(cal_url() => 'Events', $myLnks['This'] => $myEvnt['Title']);
build_breadcrumb($crumbs, 50);
?>
	<div class="container-fluid">
        <div class="row-fluid">
        <div class="col-md-8">
	<section>
		<article itemscope itemtype="http://schema.org/Event">
			<header>
				<h1 itemprop="name"><?php 
echo $myEvnt['Title'];
?>
</h1>
			</header>
			<div id="evernote">
				<div id="location" itemscope itemprop="location" itemtype="http://schema.org/Place">
开发者ID:pvidali,项目名称:BCSR-1,代码行数:30,代码来源:event.php

示例5: build_tree_item

        </div>

        <div class="span8">
            <pre><code>
&lt;ol&gt;
    &lt;?php echo build_tree_item('languages', 4, array('sub_start_tag' =&gt; '&lt;ol&gt;', 'sub_end_tag' =&gt; '&lt;/ol&gt;')); ?&gt;
&lt;/ol&gt;
            </code></pre>
            <ol>
                <?php 
echo build_tree_item('languages', 4, array('sub_start_tag' => '<ol>', 'sub_end_tag' => '</ol>'));
?>
            </ol>
        </div>
    </div>
    <div class="row">
        <div class="span4">
            <pre><code>
&lt;ul class="breadcrumb"&gt;
    &lt;?php echo build_breadcrumb('languages', 4); ?&gt;
&lt;/ul&gt;
            </code></pre>
            <ul class="breadcrumb">
                <?php 
echo build_breadcrumb('languages', 4);
?>
            </ul>
        </div>
    </div>
<?php 
$this->load->view('partials/footer');
开发者ID:eboominathan,项目名称:CodeIgniter-Adjacency-List,代码行数:31,代码来源:index.php


注:本文中的build_breadcrumb函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。