예제 #1
0
$linkparams = array('sort' => $sort);
switch ($sort) {
    case 'hot':
        $sometitle = $countslugs ? qa_lang_html_sub('main/hot_qs_in_x', $categorytitlehtml) : qa_lang_html('main/hot_qs_title');
        $feedpathprefix = qa_opt('feed_for_hot') ? 'hot' : null;
        break;
    case 'votes':
        $sometitle = $countslugs ? qa_lang_html_sub('main/voted_qs_in_x', $categorytitlehtml) : qa_lang_html('main/voted_qs_title');
        break;
    case 'answers':
        $sometitle = $countslugs ? qa_lang_html_sub('main/answered_qs_in_x', $categorytitlehtml) : qa_lang_html('main/answered_qs_title');
        break;
    case 'views':
        $sometitle = $countslugs ? qa_lang_html_sub('main/viewed_qs_in_x', $categorytitlehtml) : qa_lang_html('main/viewed_qs_title');
        break;
    default:
        $linkparams = array();
        $sometitle = $countslugs ? qa_lang_html_sub('main/recent_qs_in_x', $categorytitlehtml) : qa_lang_html('main/recent_qs_title');
        $categorypathprefix = 'questions/';
        $feedpathprefix = qa_opt('feed_for_questions') ? 'questions' : null;
        break;
}
//	Prepare and return content for theme
$qa_content = qa_q_list_page_content($questions, qa_opt('page_size_qs'), $start, $countslugs ? $categories[$categoryid]['qcount'] : qa_opt('cache_qcount'), $sometitle, $nonetitle, $categories, $categoryid, true, $categorypathprefix, $feedpathprefix, $countslugs ? qa_html_suggest_qs_tags(qa_using_tags()) : qa_html_suggest_ask($categoryid), $linkparams, $linkparams);
if (QA_ALLOW_UNINDEXED_QUERIES || !$countslugs) {
    $qa_content['navigation']['sub'] = qa_qs_sub_navigation($sort, $categoryslugs);
}
return $qa_content;
/*
	Omit PHP closing tag to help avoid accidental output
*/
예제 #2
0
 function nav_list($navigation, $class, $level = null)
 {
     if ($class == 'nav-sub' && in_array($this->template, array('plugin', 'questions')) && qa_opt('poll_enable') && qa_opt('poll_enable_subnav')) {
         $navigation['polls'] = array('label' => qa_lang('polls/page_title'), 'url' => qa_path_html('polls'));
         if ($this->request == 'polls') {
             unset($navigation['special']);
             $newnav = qa_qs_sub_navigation(null, null);
             $navigation = array_merge($newnav, $navigation);
             unset($navigation['recent']['selected']);
             $navigation['polls']['selected'] = true;
         }
     }
     if (count($navigation) > 1 || $class != 'nav-sub') {
         qa_html_theme_base::nav_list($navigation, $class, $level = null);
     }
 }
예제 #3
0
$pagelinkparams = array('sort' => $sort);
switch ($sort) {
    case 'hot':
        $sometitle = qa_lang_html('main/hot_qs_title');
        $feedpathprefix = qa_opt('feed_for_hot') ? 'hot' : null;
        break;
    case 'votes':
        $sometitle = qa_lang_html('main/voted_qs_title');
        break;
    case 'answers':
        $sometitle = qa_lang_html('main/answered_qs_title');
        break;
    case 'views':
        $sometitle = qa_lang_html('main/viewed_qs_title');
        break;
    default:
        $pagelinkparams = array();
        $sometitle = $countslugs ? qa_lang_html_sub('main/recent_qs_in_x', $categorytitlehtml) : qa_lang_html('main/recent_qs_title');
        $categorypathprefix = 'questions/';
        $feedpathprefix = qa_opt('feed_for_questions') ? 'questions' : null;
        break;
}
//	Prepare and return content for theme
$qa_content = qa_q_list_page_content($questions, qa_opt('page_size_qs'), $qa_start, $countslugs ? $categories[$categoryid]['qcount'] : qa_opt('cache_qcount'), $sometitle, $nonetitle, $categories, $categoryid, true, $categorypathprefix, $feedpathprefix, $countslugs ? qa_html_suggest_qs_tags(qa_using_tags()) : qa_html_suggest_ask($categoryid), $pagelinkparams);
if (!$countslugs) {
    $qa_content['navigation']['sub'] = qa_qs_sub_navigation($sort);
}
return $qa_content;
/*
	Omit PHP closing tag to help avoid accidental output
*/
 function nav_list($navigation, $class, $level = null)
 {
     if ($class == 'nav-sub' && in_array($this->template, array('plugin', 'questions')) && qa_opt('expert_question_enable') && $this->is_expert_user()) {
         $navigation[qa_opt('expert_question_page_url')] = array('label' => qa_opt('expert_question_page_title'), 'url' => qa_path_html(qa_opt('expert_question_page_url')));
         if ($this->request == qa_opt('expert_question_page_url')) {
             unset($navigation['special']);
             $newnav = qa_qs_sub_navigation(null, null);
             $navigation = array_merge($newnav, $navigation);
             unset($navigation['recent']['selected']);
             $navigation[qa_opt('expert_question_page_url')]['selected'] = true;
         }
         if (@$this->expertcount) {
             $navigation[qa_opt('expert_question_page_url')]['label'] .= ' (' . $this->expertcount . ')';
         }
     }
     if (count($navigation) > 1 || $class != 'nav-sub') {
         qa_html_theme_base::nav_list($navigation, $class, $level = null);
     }
 }