本文整理汇总了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();
}
示例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();
}