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(); }
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(); }