當前位置: 首頁>>代碼示例>>PHP>>正文


PHP common_node::getFullPathDetail方法代碼示例

本文整理匯總了PHP中common_node::getFullPathDetail方法的典型用法代碼示例。如果您正苦於以下問題:PHP common_node::getFullPathDetail方法的具體用法?PHP common_node::getFullPathDetail怎麽用?PHP common_node::getFullPathDetail使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在common_node的用法示例。


在下文中一共展示了common_node::getFullPathDetail方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: generateSingleURIFullPath

 /** 
  * generate single
  */
 function generateSingleURIFullPath($node_data)
 {
     require_once 'models/common/common_node.php';
     $Node = new common_node();
     $fp = $Node->getFullPathDetail($node_data['id']);
     $fullpath = "";
     foreach ($fp as $f) {
         if ($f['node_group'] == 'page') {
             if ($f['uri_title'] != '') {
                 $title = $this->cleanTitle($f['uri_title']);
             } else {
                 $title = $this->cleanTitle($f['title']);
             }
             // for blog/news pages prepend date
             if ($f['node_controller'] == 'news') {
                 $title = preg_replace("/-/", "/", substr($f['created'], 0, 10)) . "/{$title}";
             }
             if ($fullpath == '') {
                 $fullpath = $title . $fullpath;
             } else {
                 $fullpath = $title . str_replace('/', $this->conf['delimiter'], $fullpath);
             }
             if ($this->conf['hash'] == true) {
                 $fullpath = '/' . sprintf('%08X', crc32($fullpath));
             } else {
                 $fullpath = '/' . $fullpath;
             }
         }
         if (!preg_match("/" . $this->conf['append'] . "\$/", $fullpath)) {
             $fullpath = $fullpath . $this->conf['append'];
         }
     }
     return $fullpath;
 }
開發者ID:AppChecker,項目名稱:onxshop,代碼行數:37,代碼來源:common_uri_mapping.php


注:本文中的common_node::getFullPathDetail方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。