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


PHP qa_html_theme_base::page_title_error方法代碼示例

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


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

示例1: page_title_error

 function page_title_error()
 {
     if ($this->template == 'question' or $this->template == 'ask') {
         $this->output('<h1>');
         $this->title();
         $this->output('</h1>');
         if (isset($this->content['error'])) {
             $this->error(@$this->content['error']);
         }
     } elseif ($this->template == 'tag' or $this->template == 'questions') {
         // fill array with breadcrumb fields and show them
         $bc = array();
         // breadcrumb
         $bc[0]['title'] = qa_opt('site_title');
         $bc[0]['content'] = '<i class="fa fa-home"></i>';
         $bc[0]['url'] = qa_opt('site_url');
         if ($this->template == 'tag') {
             $bc[1]['title'] = 'Tags';
             $bc[1]['content'] = 'Tags';
             $bc[1]['url'] = qa_path_html('tags');
             $req = explode('/', $this->request);
             $tag = $req[count($req) - 1];
             $bc[2]['title'] = $tag;
             $bc[2]['content'] = 'Tag "' . $tag . '"';
             $bc[2]['url'] = qa_path_html($this->request, null, null, null, null);
         } elseif ($this->template == 'questions') {
             $req = explode('/', $this->request);
             $cat = $req[count($req) - 1];
             if (count($req) > 1) {
                 $category_name = $this->content["q_list"]["qs"][0]["raw"]["categoryname"];
                 $bc[1]['title'] = 'Categories';
                 $bc[1]['content'] = 'Categories';
                 $bc[1]['url'] = qa_path_html('categories');
                 $bc[2]['title'] = $category_name;
                 $bc[2]['content'] = $category_name;
                 $bc[2]['url'] = qa_path_html($this->request, null, null, null, null);
             } else {
                 unset($bc);
             }
         }
         if (isset($bc)) {
             $this->output('<div class="header-buttons btn-group btn-breadcrumb pull-left">');
             foreach ($bc as $item) {
                 $this->output(' <a href="' . $item['url'] . '" title="' . $item['title'] . '" class="btn btn-default">' . $item['content'] . '</a>');
             }
             $this->output('</div>');
         }
     } else {
         qa_html_theme_base::page_title_error();
     }
     if ($this->template == 'admin' or $this->template == 'users' or $this->template == 'user' or qa_opt('it_nav_type') == 'standard') {
         $this->show_nav('sub', 'nav navbar-nav sub-navbar pull-right');
     }
     qa_html_theme_base::q_view_clear();
 }
開發者ID:swuit,項目名稱:swuit-q2a,代碼行數:55,代碼來源:qa-layer-base.php

示例2: page_title_error

 function page_title_error()
 {
     if (!$this->is_print_view && qa_opt('print_view') && $this->template == 'question') {
         $this->printer();
     }
     qa_html_theme_base::page_title_error();
 }
開發者ID:NoahY,項目名稱:q2a-print,代碼行數:7,代碼來源:qa-print-layer.php


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