• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

PHP get_breadcrumb函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: get_breadcrumb

function get_breadcrumb($page_id, $level)
{
    global $ft, $rewrite, $pages_sort, $pages_id;
    $query = sprintf("\r\n        SELECT \r\n            id, \r\n            parent_id, \r\n            title \r\n        FROM \r\n            %1\$s \r\n        WHERE \r\n            id = '%2\$d' \r\n        AND \r\n            published = 'Y' \r\n        ORDER BY \r\n            id \r\n        ASC", TABLE_PAGES, $page_id);
    $db = new DB_SQL();
    $db->query($query);
    while ($db->next_record()) {
        $page_id = $db->f("id");
        $parent_id = $db->f("parent_id");
        $page_name = $db->f("title");
        $page_link = (bool) $rewrite ? '1,' . $page_id . ',5,item.html' : 'index.php?p=5&id=' . $page_id . '';
        $ft->assign(array('PAGE_TITLE' => $page_name, 'PAGE_ID' => $page_id, 'CLASS' => "child", 'PARENT' => str_repeat('  ', $level), 'PAGE_LINK' => $page_link));
        $pages_sort[] = $page_name;
        $pages_id[] = $page_id;
        get_breadcrumb($parent_id, $level + 2);
    }
}
开发者ID:BackupTheBerlios,项目名称:core-svn,代码行数:17,代码来源:main_lib.php


示例2: get_breadcrumb

function get_breadcrumb($cate_id, $breadcrumb_str = "")
{
    $db = init_db();
    $breadcrumb_result = $db->get_results("SELECT cate_id,cate_name,parent_id FROM `plu_product_category` WHERE cate_id = '{$cate_id}' ");
    //print_r($breadcrumb_result);
    if (isset($breadcrumb_result)) {
        foreach ($breadcrumb_result as $row) {
            //echo $row->cate_name;
            if ($breadcrumb_str == "") {
                $breadcrumb_str = " > " . $row->cate_name;
            } else {
                $breadcrumb_str = " > " . "<a href='" . WEBROOT . "/index.php?cmsid=2&cate_id={$row->cate_id}'>{$row->cate_name}</a>" . $breadcrumb_str;
            }
            if ($row->parent_id != -1) {
                $breadcrumb_str = get_breadcrumb($row->parent_id, $breadcrumb_str);
            }
        }
    }
    return $breadcrumb_str;
}
开发者ID:kingwang317,项目名称:it4fun-guam,代码行数:20,代码来源:index_bread.php


示例3: mod_sysblock

/**
 * Обработка тега модуля
 *
 * @param int $sysblock_id идентификатор системного блока
 */
function mod_sysblock($sysblock_id)
{
    global $AVE_DB;
    if (is_numeric($sysblock_id)) {
        $cache_file = BASE_DIR . '/cache/module/sysblock-' . $sysblock_id . '.cache';
        if (!file_exists(dirname($cache_file))) {
            mkdir(dirname($cache_file), 0766, true);
        }
        if (file_exists($cache_file)) {
            $return = file_get_contents($cache_file);
        } else {
            $return = $AVE_DB->Query("\r\n                SELECT sysblock_text\r\n                FROM " . PREFIX . "_modul_sysblock\r\n                WHERE id = '" . $sysblock_id . "'\r\n                LIMIT 1\r\n            ")->GetCell();
            file_put_contents($cache_file, $return);
        }
        // парсим остальные теги основного шаблона
        $search = array('[tag:mediapath]', '[tag:path]', '[tag:home]', '[tag:docid]', '[tag:breadcrumb]');
        $replace = array(ABS_PATH . 'templates/' . THEME_FOLDER . '/', ABS_PATH, get_home_link(), get_current_document_id(), get_breadcrumb());
        $return = str_replace($search, $replace, $return);
        $return = preg_replace_callback('/\\[tag:request:(\\d+)\\]/', 'request_parse', $return);
        // парсим остальные теги основного шаблона
        eval('?>' . $return . '<?');
    }
}
开发者ID:laiello,项目名称:avecms,代码行数:28,代码来源:modul.php


示例4: parse_sysblock

/**
 * Обработка тега системного блока
 *
 * @param int $id идентификатор системного блока
 */
function parse_sysblock($id)
{
    global $AVE_DB, $AVE_Core;
    $gen_time = microtime();
    if (is_array($id)) {
        $id = $id[1];
    }
    if (is_numeric($id)) {
        $eval_sysblock = false;
        if ($id < 0) {
            $id = abs($id);
            $eval_sysblock = true;
        }
        $cache_file = BASE_DIR . '/cache/sql/sysblock-' . $id . '.cache';
        if (!file_exists(dirname($cache_file))) {
            mkdir(dirname($cache_file), 0766, true);
        }
        if (file_exists($cache_file)) {
            $return = file_get_contents($cache_file);
        } else {
            $return = $AVE_DB->Query("\n                SELECT sysblock_text\n                FROM " . PREFIX . "_sysblocks\n                WHERE id = '" . $id . "'\n                LIMIT 1\n            ")->GetCell();
            file_put_contents($cache_file, $return);
        }
        // парсим остальные теги основного шаблона
        $search = array('[tag:mediapath]', '[tag:path]', '[tag:home]', '[tag:docid]', '[tag:breadcrumb]');
        $replace = array(ABS_PATH . 'templates/' . THEME_FOLDER . '/', ABS_PATH, get_home_link(), get_current_document_id(), get_breadcrumb());
        $return = str_replace($search, $replace, $return);
        $return = preg_replace_callback('/\\[tag:request:(\\d+)\\]/', 'request_parse', $return);
        if ($eval_sysblock) {
            $return = eval2var('?' . '>' . $return . '<' . '?');
        }
        $gen_time = microtime() - $gen_time;
        $GLOBALS['block_generate'][] = array('SYSBLOCK_' . $id => $gen_time);
        return $return;
    }
}
开发者ID:RGBvision,项目名称:AVE.cms,代码行数:41,代码来源:func.sysblock.php


示例5: get_breadcrumb

<?php

/*
 *
 * Breadcrumb for author archive
 *
 *
*/
?>

<p><?php 
global $post;
print get_breadcrumb();
?>
&nbsp;&nbsp;&raquo;&nbsp;&nbsp;Posts by: <?php 
echo get_the_author();
?>
</p>
开发者ID:hmcmathcomp,项目名称:wpdev-hmc-edu,代码行数:18,代码来源:nav-breadcrumb-author.php


示例6: while

			<?php 
while (have_posts()) {
    the_post();
    ?>
				
				<!-- Page Title -->
				<div class="page-title-breadcrumbs">
					<h1 class="page-title"><span><?php 
    the_title();
    ?>
</span></h1>
						<?php 
    if (get_custom_field('show_breadcrumbs') == 'Yes') {
        ?>
							<div class="breadcrumbs">| <?php 
        echo get_breadcrumb();
        ?>
</div><?php 
    }
    ?>
					</div>
				<hr class="page-title-hr" />
			
				<!-- Page Caption Section -->
				<?php 
    if (get_custom_field('page_caption') . get_custom_field('page_background_image')) {
        ?>

					<div class="<?php 
        echo $layout_class;
        ?>
开发者ID:estrategasdigitales,项目名称:Golone,代码行数:31,代码来源:page.php


示例7: get_redirect_link

// $content['body_id'] = $content["cat_id"];
$content['body_id'] = '';
// check if current level is a redirect level
if (!empty($content['struct'][$content["cat_id"]]['acat_redirect'])) {
    $redirect = get_redirect_link($content['struct'][$content["cat_id"]]['acat_redirect']);
    headerRedirect($redirect['link'], 301);
}
// Check if curret level is forced for SSL
if (!PHPWCMS_SSL && (!empty($phpwcms['site_ssl_mode']) || !empty($content['struct'][$content["cat_id"]]['acat_ssl']))) {
    headerRedirect($phpwcms['site_ssl_url'] . (count($_getVar) ? rel_url() : ''), 301);
}
//try to find current tree depth
$LEVEL_ID = array();
$LEVEL_KEY = array();
$LEVEL_STRUCT = array();
$level_ID_array = get_breadcrumb($content["cat_id"], $content['struct']);
$level_count = 0;
foreach ($level_ID_array as $key => $value) {
    $LEVEL_ID[$level_count] = $key;
    $LEVEL_KEY[$key] = $level_count;
    $LEVEL_STRUCT[$level_count] = $content['struct'][$key]['acat_name'];
    if ($PERMIT_ACCESS && $content['struct'][$key]['acat_regonly']) {
        $PERMIT_ACCESS = false;
        // only users have been logged in get access
    }
    $level_count++;
}
define('PERMIT_ACCESS', $PERMIT_ACCESS);
// frontend login check
_checkFrontendUserAutoLogin();
// read the template information for page based on structure
开发者ID:EDVLanger,项目名称:phpwcms,代码行数:31,代码来源:content.func.inc.php


示例8: get_header

<?php

/**
 * The template for displaying Search Results for HMC Experts.
 *
 * Modified code to adapt display if we're search for HMC Experts.
 *
 */
get_header();
?>

	<div id="breadcrumb">

		<p><?php 
get_breadcrumb();
?>
<a href="<?php 
bloginfo('url');
?>
/hmc-experts/">Harvey Mudd College Experts</a>&nbsp;&nbsp;&raquo;&nbsp;&nbsp; Experts Search Results</p>
	</div>

</header>

<div id="content-wrapper">
<div>
	<?php 
get_template_part('nav', 'left');
?>
	
		<main role="main">
开发者ID:hmcmathcomp,项目名称:wpdev-hmc-edu,代码行数:31,代码来源:search.php


示例9: coreSiteFetch


//.........这里部分代码省略.........
     }
     // /вывод документа
     //Работа с условиями
     /*
     		$out = preg_replace('/\[tag:if_exp:?(.*)\]/u', '<?php 
     	$my_exp000=true;
     	$my_exp0001=\'$my_exp000=\'. str_replace(\'#var#\',\'$\',<<<BLOCK
     $1;
     BLOCK
     );
     	@eval($my_exp0001);
     	if($my_exp000==true)
     		{
     ?>', $out);
     		$out = str_replace('[tag:if_exp_else]', '<?php }else{ ?>', $out);
     		$out = str_replace('[tag:/if_exp]', '<?php } ?>', $out);
     */
     // Тут мы вводим в хеадер иньекцию скриптов.
     if (defined('RUB_ID')) {
         $rubheader = $AVE_DB->Query("\n\t\t\t\t\t\t\tSELECT rubric_header_template\n\t\t\t\t\t\t\tFROM " . PREFIX . "_rubrics\n\t\t\t\t\t\t\tWHERE Id = '" . RUB_ID . "'\n\t\t\t\t\t\t\tLIMIT 1\n\t\t\t\t\t\t", CACHE_LIFETIME)->GetCell();
         $out = str_replace('[tag:rubheader]', $rubheader . '[tag:rubheader]', $out);
     }
     $out = preg_replace('/\\[tag:rfld:([a-zA-Z0-9-_]+)]\\[(more|esc|img|[0-9-]+)]/e', "request_get_document_field(\"\$1\", {$id}, \"\$2\")", $out);
     // Если в запросе пришел параметр print, т.е. страница для печати, парсим контент, который обрамлен
     // тегами только для печати
     if (isset($_REQUEST['print']) && $_REQUEST['print'] == 1) {
         $out = str_replace(array('[tag:if_print]', '[/tag:if_print]'), '', $out);
         $out = preg_replace('/\\[tag:if_notprint\\](.*?)\\[\\/tag:if_notprint\\]/si', '', $out);
     } else {
         // В противном случае наоборот, парсим только тот контент, который предназначен НЕ для печати
         $out = preg_replace('/\\[tag:if_print\\](.*?)\\[\\/tag:if_print\\]/si', '', $out);
         $out = str_replace(array('[tag:if_notprint]', '[/tag:if_notprint]'), '', $out);
     }
     // получаем из шаблона системный тег, определяющий название темы дизайна
     $match = '';
     preg_match('/\\[tag:theme:(\\w+)]/', $out, $match);
     define('THEME_FOLDER', empty($match[1]) ? DEFAULT_THEME_FOLDER : $match[1]);
     $out = preg_replace('/\\[tag:theme:(.*?)]/', '', $out);
     // парсим теги модулей
     $out = $this->coreModuleTagParse($out);
     if (isset($_REQUEST['module']) && !(isset($this->install_modules[$_REQUEST['module']]) && '1' == $this->install_modules[$_REQUEST['module']]->ModuleStatus)) {
         display_notice($this->_module_error);
     }
     // парсим теги системных блоков
     $out = preg_replace_callback('/\\[tag:sysblock:([0-9-]+)\\]/', 'parse_sysblock', $out);
     // парсим теги системы внутренних запросов
     $out = preg_replace_callback('/\\[tag:request:(\\d+)\\]/', 'request_parse', $out);
     // парсим теги навигации
     $out = preg_replace_callback('/\\[tag:navigation:(\\d+):?([0-9,]*)\\]/', 'parse_navigation', $out);
     // парсим теги скрытого текста
     $out = parse_hide($out);
     // парсим остальные теги основного шаблона
     $search = array('[tag:mediapath]', '[tag:path]', '[tag:sitename]', '[tag:document]', '[tag:alias]', '[tag:home]', '[tag:robots]', '[tag:canonical]', '[tag:docid]', '[tag:breadcrumb]');
     $replace = array(ABS_PATH . 'templates/' . THEME_FOLDER . '/', ABS_PATH, htmlspecialchars(get_settings('site_name'), ENT_QUOTES), get_redirect_link('print'), @$this->curentdoc->document_alias, get_home_link(), isset($this->curentdoc->document_meta_robots) ? $this->curentdoc->document_meta_robots : '', canonical($_SERVER['REQUEST_URI']), isset($this->curentdoc->Id) ? $this->curentdoc->Id : '', get_breadcrumb());
     if (defined('MODULE_CONTENT')) {
         // парсинг тегов при выводе из модуля
         $search[] = '[tag:maincontent]';
         $replace[] = MODULE_CONTENT;
         $search[] = '[tag:title]';
         $replace[] = htmlspecialchars(defined('MODULE_SITE') ? MODULE_SITE : '', ENT_QUOTES);
         $search[] = '[tag:description]';
         $replace[] = htmlspecialchars(defined('MODULE_DESCRIPTION') ? MODULE_DESCRIPTION : '', ENT_QUOTES);
         $search[] = '[tag:keywords]';
         $replace[] = htmlspecialchars(defined('MODULE_KEYWORDS') ? MODULE_KEYWORDS : '', ENT_QUOTES);
     } else {
         $search[] = '[tag:keywords]';
         $replace[] = isset($this->curentdoc->document_meta_keywords) ? htmlspecialchars($this->curentdoc->document_meta_keywords, ENT_QUOTES) : '';
         $search[] = '[tag:description]';
         $replace[] = isset($this->curentdoc->document_meta_description) ? htmlspecialchars($this->curentdoc->document_meta_description, ENT_QUOTES) : '';
         $search[] = '[tag:title]';
         $replace[] = htmlspecialchars(pretty_chars($this->curentdoc->document_title), ENT_QUOTES);
     }
     $search[] = '[tag:maincontent]';
     $replace[] = '';
     $search[] = '[tag:printlink]';
     $replace[] = get_print_link();
     $search[] = '[tag:version]';
     $replace[] = APP_INFO;
     $search[] = '[tag:docviews]';
     $replace[] = isset($this->curentdoc->document_count_view) ? $this->curentdoc->document_count_view : '';
     // парсим тизер документа
     $out = preg_replace('/\\[tag:teaser:(\\d+)\\]/e', "showteaser(\$1)", $out);
     if (defined('RUB_ID')) {
         $out = preg_replace('/\\[tag:docauthoravatar:(\\d+)\\]/e', "getAvatar(" . intval($this->curentdoc->document_author_id) . ",\"\$1\")", $out);
     }
     if (defined('RUB_ID')) {
         $out = preg_replace('/\\[tag:lang:([a-zA-Z0-9-_]+)\\]/', '<?php if($AVE_Core->curentdoc->document_lang=="$1") { ?>', $out);
     } else {
         $out = preg_replace('/\\[tag:lang:([a-zA-Z0-9-_]+)\\]/', '<?php if($_SESSION["user_language"]=="$1") { ?>', $out);
     }
     $out = str_replace('[tag:/lang]', '<?php } ?>', $out);
     // парсим остальные теги основного шаблона
     $out = str_replace($search, $replace, $out);
     unset($search, $replace);
     // парсим теги для combine.php
     $out = preg_replace_callback('/\\[tag:(css|js):([^ :\\/]+):?(\\S+)*\\]/', array($this, '_parse_combine'), $out);
     // ЧПУ
     $out = rewrite_link($out);
     echo $out;
 }
开发者ID:RGBvision,项目名称:AVE.cms,代码行数:101,代码来源:class.core.php


示例10: css_level_list

function css_level_list(&$struct, $struct_path, $level, $parent_level_name = '', $parent_level = 1, $class = '')
{
    // returns list <div><ul><li></li></ul></div> of the current structure level
    // if $parent_level=1 the first list entry will be the parent level
    // $parent_level=0 - only the list of all levels in this structure
    // if $parent_leve_name != "" then it uses the given string
    // predefined class for this menu is "list_level"
    if (!trim($class)) {
        $class = 'list_level';
    }
    $parent_level_name = trim($parent_level_name);
    $level = intval($level);
    $parent_level = intval($parent_level);
    $activated = 0;
    $css_list = '';
    //returns the complete level of NON hidden categories
    $level_struct = return_struct_level($struct, $level);
    $breadcrumb = get_breadcrumb(key($struct_path), $struct);
    foreach ($level_struct as $key => $value) {
        if (!$level_struct[$key]["acat_redirect"]) {
            $link = 'index.php?';
            if ($level_struct[$key]["acat_alias"]) {
                $link .= html_specialchars($level_struct[$key]["acat_alias"]);
            } else {
                $link .= 'id=' . $key;
            }
            $redirect['target'] = '';
        } else {
            $redirect = get_redirect_link($level_struct[$key]["acat_redirect"], ' ', '');
            $link = $redirect['link'];
        }
        $css_list .= '	<li';
        $liclass = trim((empty($breadcrumb[$key]) ? '' : 'active ') . $level_struct[$key]["acat_class"]);
        $css_list .= empty($liclass) ? '' : ' class="' . $liclass . '"';
        $css_list .= '><a href="' . $link . '"' . $redirect['target'] . '>';
        $css_list .= html_specialchars($level_struct[$key]["acat_name"]);
        $css_list .= '</a></li>' . LF;
    }
    if ($parent_level) {
        if (!$struct[$level]["acat_redirect"]) {
            $link = 'index.php?';
            if ($struct[$level]["acat_alias"]) {
                $link .= html_specialchars($struct[$level]["acat_alias"]);
            } else {
                $link .= 'id=' . $level;
            }
            $redirect['target'] = '';
        } else {
            $redirect = get_redirect_link($struct[$level]["acat_redirect"], ' ', '');
            $link = $redirect['link'];
        }
        $css_list_home = '	<li class="' . trim(($GLOBALS['aktion'][0] == $level ? 'active' : 'parent') . ' ' . $struct[$level]["acat_class"]) . '">';
        $css_list_home .= '<a href="' . $link . '"' . $redirect['target'] . '>';
        $css_list_home .= html_specialchars(!$parent_level_name ? $struct[$level]["acat_name"] : $parent_level_name);
        $css_list_home .= '</a></li>' . LF;
        $css_list = $css_list_home . $css_list;
    }
    if ($css_list) {
        $css_list = LF . '<ul class="' . $class . '">' . LF . $css_list . '</ul>' . LF;
    }
    return $css_list;
}
开发者ID:Ideenkarosell,项目名称:phpwcms,代码行数:62,代码来源:deprecated.inc.php


示例11: highlighter

 $id = $db->f("id");
 $parent_id = $db->f("parent_id");
 $image = $db->f("image");
 $assigned_tpl = $db->f("assigned_tpl");
 // dynamiczne definiowanie szablonu, jaki ma byc
 // przydzielony do konkretnej podstrony Core
 $ft->define($assigned_tpl, $assigned_tpl . '_page.tpl');
 $text = highlighter($text, '<code>', '</code>');
 $ft->assign(array('PAGE_TITLE' => $title, 'PAGE_TEXT' => $text, 'PAGE_ID' => $id, 'PAGINATED' => false, 'MOVE_BACK' => false, 'MOVE_FORWARD' => false));
 // Parsowanie nazw stron rodzicielskich::parent
 $ft->define_dynamic("breadcrumb_row", "pages_view");
 // tablice przechowujace tytul i id strony
 $pages_sort[] = $title;
 $pages_id[] = $id;
 // funkcja pobieraj±ca rekurencyjnie strony dziedzicz±ce::child
 get_breadcrumb($parent_id, 2);
 function cmp($pages_sort, $b)
 {
     if ($pages_sort == $b) {
         return 0;
     }
     return $pages_sort > $b ? -1 : 1;
 }
 // sortujemy tablice w porzadku odwrotnym
 uksort($pages_sort, "cmp");
 uksort($pages_id, "cmp");
 // parsujemy menu na podstawie tablicy
 foreach ($pages_sort as $pid => $ptitle) {
     if ((bool) $rewrite) {
         $page_link = sprintf('1,%s,5,item.html', $pages_id[$pid]);
     } else {
开发者ID:BackupTheBerlios,项目名称:core-svn,代码行数:31,代码来源:pages_view.php


示例12: coreSiteFetch


//.........这里部分代码省略.........
                 }
             }
             if (CACHE_DOC_TPL && empty($_POST) && !(isset($_SESSION['user_adminmode']) && $_SESSION['user_adminmode'] == 1)) {
                 // кэширование разрешено
                 // извлекаем скомпилированный шаблон документа из кэша
                 $main_content = $AVE_DB->Query("\r\n\t\t\t\t\t\tSELECT compiled\r\n\t\t\t\t\t\tFROM " . PREFIX . "_rubric_template_cache\r\n\t\t\t\t\t\tWHERE hash  = '" . $this->_get_cache_hash() . "'\r\n\t\t\t\t\t\tLIMIT 1\r\n\t\t\t\t\t")->GetCell();
             } else {
                 // кэширование запрещено
                 $main_content = false;
             }
             if (empty($main_content)) {
                 // кэш пустой или отключен, извлекаем и компилируем шаблон
                 if (!empty($this->curentdoc->rubric_template)) {
                     $rubTmpl = $this->curentdoc->rubric_template;
                 } else {
                     $rubTmpl = $AVE_DB->Query("\r\n\t\t\t\t\t\t\tSELECT rubric_template\r\n\t\t\t\t\t\t\tFROM " . PREFIX . "_rubrics\r\n\t\t\t\t\t\t\tWHERE Id = '" . RUB_ID . "'\r\n\t\t\t\t\t\t\tLIMIT 1\r\n\t\t\t\t\t\t")->GetCell();
                 }
                 $rubTmpl = trim($rubTmpl);
                 if (empty($rubTmpl)) {
                     // не задан шаблон рубрики
                     $main_content = $this->_rubric_template_empty;
                 } else {
                     // парсим теги полей в шаблоне документа
                     $main_content = preg_replace_callback('/\\[tag:fld:(\\d+)\\]/', 'document_get_field', $rubTmpl);
                     // удаляем ошибочные теги полей
                     $main_content = preg_replace('/\\[tag:fld:\\d*\\]/', '', $main_content);
                     if (CACHE_DOC_TPL && empty($_POST) && !(isset($_SESSION['user_adminmode']) && $_SESSION['user_adminmode'] == 1)) {
                         // кэширование разрешено
                         // сохраняем скомпилированный шаблон в кэш
                         $AVE_DB->Query("\r\n\t\t\t\t\t\t\t\tINSERT " . PREFIX . "_rubric_template_cache\r\n\t\t\t\t\t\t\t\tSET\r\n\t\t\t\t\t\t\t\t\thash     = '" . $this->_get_cache_hash() . "',\r\n\t\t\t\t\t\t\t\t\trub_id   = '" . RUB_ID . "',\r\n\t\t\t\t\t\t\t\t\tgrp_id   = '" . UGROUP . "',\r\n\t\t\t\t\t\t\t\t\tdoc_id   = '" . $id . "',\r\n\t\t\t\t\t\t\t\t\tcompiled = '" . addslashes($main_content) . "'\r\n\t\t\t\t\t\t\t");
                     }
                 }
             }
             $main_content = str_replace('[tag:docdate]', pretty_date(strftime(DATE_FORMAT, $this->curentdoc->document_published)), $main_content);
             $main_content = str_replace('[tag:doctime]', pretty_date(strftime(TIME_FORMAT, $this->curentdoc->document_published)), $main_content);
             $main_content = str_replace('[tag:docauthor]', get_username_by_id($this->curentdoc->document_author_id), $main_content);
         }
         $out = str_replace('[tag:maincontent]', $main_content, $this->_coreDocumentTemplateGet(RUB_ID));
     }
     // /вывод документа
     // Если в запросе пришел параметр print, т.е. страница для печати, парсим контент, который обрамлен
     // тегами только для печати
     if (isset($_REQUEST['print']) && $_REQUEST['print'] == 1) {
         $out = str_replace(array('[tag:if_print]', '[/tag:if_print]'), '', $out);
         $out = preg_replace('/\\[tag:if_notprint\\](.*?)\\[\\/tag:if_notprint\\]/si', '', $out);
     } else {
         // В противном случае наоборот, парсим только тот контент, который предназначен НЕ для печати
         $out = preg_replace('/\\[tag:if_print\\](.*?)\\[\\/tag:if_print\\]/si', '', $out);
         $out = str_replace(array('[tag:if_notprint]', '[/tag:if_notprint]'), '', $out);
     }
     // получаем из шаблона системный тег, определяющий название темы дизайна
     $match = '';
     preg_match('/\\[tag:theme:(\\w+)]/', $out, $match);
     define('THEME_FOLDER', empty($match[1]) ? DEFAULT_THEME_FOLDER : $match[1]);
     $out = preg_replace('/\\[tag:theme:(.*?)]/', '', $out);
     // парсим теги модулей
     $out = $this->coreModuleTagParse($out);
     if (isset($_REQUEST['module']) && !(isset($this->install_modules[$_REQUEST['module']]) && '1' == $this->install_modules[$_REQUEST['module']]->Status)) {
         display_notice($this->_module_error);
     }
     // парсим теги системы внутренних запросов
     $out = preg_replace_callback('/\\[tag:request:(\\d+)\\]/', 'request_parse', $out);
     // парсим теги скрытого текста
     $out = parse_hide($out);
     // парсим остальные теги основного шаблона
     $search = array('[tag:mediapath]', '[tag:path]', '[tag:sitename]', '[tag:document]', '[tag:home]', '[tag:robots]', '[tag:docid]', '[tag:breadcrumb]');
     $replace = array(ABS_PATH . 'templates/' . THEME_FOLDER . '/', ABS_PATH, htmlspecialchars(get_settings('site_name'), ENT_QUOTES), get_redirect_link('print'), get_home_link(), isset($this->curentdoc->document_meta_robots) ? $this->curentdoc->document_meta_robots : '', isset($this->curentdoc->Id) ? $this->curentdoc->Id : '', get_breadcrumb());
     if (defined('MODULE_CONTENT')) {
         // парсинг тегов при выводе из модуля
         $search[] = '[tag:maincontent]';
         $replace[] = MODULE_CONTENT;
         $search[] = '[tag:title]';
         $replace[] = htmlspecialchars(defined('MODULE_SITE') ? MODULE_SITE : '', ENT_QUOTES);
         $search[] = '[tag:description]';
         $replace[] = htmlspecialchars(defined('MODULE_DESCRIPTION') ? MODULE_DESCRIPTION : '', ENT_QUOTES);
         $search[] = '[tag:keywords]';
         $replace[] = htmlspecialchars(defined('MODULE_KEYWORDS') ? MODULE_KEYWORDS : '', ENT_QUOTES);
     } else {
         $search[] = '[tag:keywords]';
         $replace[] = isset($this->curentdoc->document_meta_keywords) ? htmlspecialchars($this->curentdoc->document_meta_keywords, ENT_QUOTES) : '';
         $search[] = '[tag:description]';
         $replace[] = isset($this->curentdoc->document_meta_description) ? htmlspecialchars($this->curentdoc->document_meta_description, ENT_QUOTES) : '';
         $search[] = '[tag:title]';
         $replace[] = htmlspecialchars(pretty_chars($this->curentdoc->document_title), ENT_QUOTES);
     }
     $search[] = '[tag:maincontent]';
     $replace[] = '';
     $search[] = '[tag:printlink]';
     $replace[] = get_print_link();
     $search[] = '[tag:version]';
     $replace[] = APP_INFO;
     $search[] = '[tag:docviews]';
     $replace[] = isset($this->curentdoc->document_count_view) ? $this->curentdoc->document_count_view : '';
     $out = str_replace($search, $replace, $out);
     unset($search, $replace);
     // /парсим остальные теги основного шаблона
     // ЧПУ
     $out = rewrite_link($out);
     echo $out;
 }
开发者ID:laiello,项目名称:avecms,代码行数:101,代码来源:class.core.php


示例13: get_breadcrumb

<?php

/*
 *
 * Breadcrumb for Page content type
 *
 *
*/
?>

<p><?php 
get_breadcrumb() . the_title();
?>
</p>
开发者ID:hmcmathcomp,项目名称:wpdev-hmc-edu,代码行数:14,代码来源:nav-breadcrumb-page.php


示例14: ace_breadcrumb

function ace_breadcrumb()
{
    if (get_option('ace_enable_breadcrumb')) {
        echo get_breadcrumb();
    }
}
开发者ID:michellemarin,项目名称:marilyn,代码行数:6,代码来源:ace_functions.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP get_breadcrumbs函数代码示例发布时间:2022-05-15
下一篇:
PHP get_brands函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap