当前位置: 首页>>代码示例>>PHP>>正文


PHP qa_q_list_page_content函数代码示例

本文整理汇总了PHP中qa_q_list_page_content函数的典型用法代码示例。如果您正苦于以下问题:PHP qa_q_list_page_content函数的具体用法?PHP qa_q_list_page_content怎么用?PHP qa_q_list_page_content使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了qa_q_list_page_content函数的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: output_widget

 function output_widget($region, $place, $themeobject, $template, $request, $qa_content)
 {
     $widget_opt = @$themeobject->current_widget['param']['options'];
     require_once QA_INCLUDE_DIR . 'qa-db-selects.php';
     require_once QA_INCLUDE_DIR . 'qa-app-format.php';
     require_once QA_INCLUDE_DIR . 'qa-app-q-list.php';
     $categoryslugs = '';
     $userid = qa_get_logged_in_userid();
     //	Get lists of recent activity in all its forms, plus category information
     list($questions1, $questions2, $questions3, $questions4) = qa_db_select_with_pending(qa_db_qs_selectspec($userid, 'created', 0, $categoryslugs, null, false, false, $qcount), qa_db_recent_a_qs_selectspec($userid, 0, $categoryslugs), qa_db_recent_c_qs_selectspec($userid, 0, $categoryslugs), qa_db_recent_edit_qs_selectspec($userid, 0, $categoryslugs));
     //	Prepare and return content for theme
     $content = qa_q_list_page_content(qa_any_sort_and_dedupe(array_merge($questions1, $questions2, $questions3, $questions4)), $qcount, 0, null, null, null, null, null, true, 'activity/', null, null, null, null);
     $content = $content['q_list']['qs'];
     if (@$themeobject->current_widget['param']['locations']['show_title']) {
         $themeobject->output('<h3 class="widget-title">' . qa_lang('cleanstrap/recent_activities') . ' <a href="' . qa_path_html('activity') . '">' . qa_lang('cleanstrap/view_all') . '</a></h3>');
     }
     $themeobject->output('<div class="ra-question-activity-widget">');
     $q_list = $content;
     $themeobject->output('<ul class="activity-list">');
     foreach ($q_list as $list) {
         $themeobject->output('<li class="clearfix ' . (is_featured($list['raw']['postid']) ? ' featured' : '') . '"><span class="fav-star icon-heart' . (@$list['raw']['userfavoriteq'] ? ' active' : '') . '"></span><span class="post-status-c">' . cs_post_status($list) . '</span><a href="' . $list['url'] . '">' . $list['title'] . '<span class="time">' . implode(' ', $list['when']) . '</span><span class="ans-count total-' . $list['raw']['acount'] . '">' . $list['raw']['acount'] . '</span></a></li>');
     }
     $themeobject->output('</ul>');
     $themeobject->output('</div>');
 }
开发者ID:microbye,项目名称:CleanStrap,代码行数:25,代码来源:widget_question_activity.php

示例2: process_request

 function process_request($request)
 {
     //	Get list of unanswered open questions
     $userid = qa_get_logged_in_userid();
     $start = qa_get_start();
     $questions_selectspec = $this->qa_db_open_qs_selectspec($userid, $start);
     $questions = qa_db_select_with_pending($questions_selectspec);
     //	Prepare and return the content for the theme
     $questions_found_title = qa_lang_html('open_questions/questions_found_title');
     $no_questions_title = qa_lang_html('open_questions/no_questions_title');
     $count = qa_opt('cache_unaqcount');
     $qa_content = qa_q_list_page_content($questions, qa_opt('page_size_una_qs'), $start, @$count, $questions_found_title, $no_questions_title, null, null, false, null, null, qa_html_suggest_qs_tags(qa_using_tags()), null, null);
     return $qa_content;
 }
开发者ID:nakov,项目名称:q2a-plugin-open-questions,代码行数:14,代码来源:qa-open-questions.php

示例3: process_request

 function process_request($request)
 {
     require_once QA_INCLUDE_DIR . 'qa-db-selects.php';
     require_once QA_INCLUDE_DIR . 'qa-app-format.php';
     require_once QA_INCLUDE_DIR . 'qa-app-q-list.php';
     //	Get list of questions, plus category information
     $nonetitle = qa_lang_html('main/no_questions_found');
     $categorypathprefix = null;
     // only show category list and feed when sorting by date
     $feedpathprefix = null;
     $selectspec = array('columns' => array('^posts.postid', '^posts.categoryid', '^posts.type', 'basetype' => 'LEFT(^posts.type,1)', 'hidden' => "INSTR(^posts.type, '_HIDDEN')>0", '^posts.acount', '^posts.selchildid', '^posts.upvotes', '^posts.downvotes', '^posts.netvotes', '^posts.views', '^posts.hotness', '^posts.flagcount', 'title' => 'BINARY ^posts.title', 'tags' => 'BINARY ^posts.tags', 'created' => 'UNIX_TIMESTAMP(^posts.created)', 'categoryname' => 'BINARY ^categories.title', 'categorybackpath' => "BINARY ^categories.backpath"), 'arraykey' => 'postid', 'source' => '^posts LEFT JOIN ^categories ON ^categories.categoryid=^posts.categoryid JOIN ^postmeta ON ^posts.postid=^postmeta.post_id AND ^postmeta.meta_key=$ AND ^postmeta.meta_value>0 AND ^posts.type=$', 'arguments' => array('is_poll', 'Q'));
     $selectspec['columns']['content'] = '^posts.content';
     $selectspec['columns']['notify'] = '^posts.notify';
     $selectspec['columns']['updated'] = 'UNIX_TIMESTAMP(^posts.updated)';
     $selectspec['columns']['updatetype'] = '^posts.updatetype';
     $selectspec['columns'][] = '^posts.format';
     $selectspec['columns'][] = '^posts.lastuserid';
     $selectspec['columns']['lastip'] = 'INET_NTOA(^posts.lastip)';
     $selectspec['columns'][] = '^posts.parentid';
     $selectspec['columns']['lastviewip'] = 'INET_NTOA(^posts.lastviewip)';
     $selectspec['columns'][] = '^posts.userid';
     $selectspec['columns'][] = '^posts.cookieid';
     $selectspec['columns']['createip'] = 'INET_NTOA(^posts.createip)';
     $selectspec['columns'][] = '^userpoints.points';
     if (!QA_FINAL_EXTERNAL_USERS) {
         $selectspec['columns'][] = '^users.flags';
         $selectspec['columns'][] = '^users.level';
         $selectspec['columns']['email'] = 'BINARY ^users.email';
         $selectspec['columns']['handle'] = 'CONVERT(^users.handle USING BINARY)';
         // because of MySQL bug #29205
         $selectspec['columns'][] = '^users.avatarblobid';
         $selectspec['columns'][] = '^users.avatarwidth';
         $selectspec['columns'][] = '^users.avatarheight';
         $selectspec['source'] .= ' LEFT JOIN ^users ON ^posts.userid=^users.userid';
         $selectspec['columns']['lasthandle'] = 'CONVERT(lastusers.handle USING BINARY)';
         // because of MySQL bug #29205
         $selectspec['source'] .= ' LEFT JOIN ^users AS lastusers ON ^posts.lastuserid=lastusers.userid';
     }
     $selectspec['source'] .= ' LEFT JOIN ^userpoints ON ^posts.userid=^userpoints.userid';
     $selectspec['source'] .= ' ORDER BY ^posts.created DESC';
     $questions = qa_db_select_with_pending($selectspec);
     global $qa_start;
     //	Prepare and return content for theme
     $qa_content = qa_q_list_page_content($questions, qa_opt('page_size_qs'), $qa_start, count($questions), qa_lang('polls/page_title'), $nonetitle, null, null, false, null, null, null, null);
     return $qa_content;
 }
开发者ID:NoahY,项目名称:q2a-poll,代码行数:46,代码来源:qa-poll-page.php

示例4: process_request

 public function process_request($request)
 {
     $requestparts = explode('/', qa_request());
     $slugs = array_slice($requestparts, 1);
     $countslugs = count($slugs);
     $userid = qa_get_logged_in_userid();
     $start = qa_get_start();
     $count = qa_opt_if_loaded('page_size_activity');
     $totalcount = qa_opt('cache_qcount');
     $qspec = qa_db_posts_basic_selectspec($userid, false);
     qa_db_add_selectspec_opost($qspec, 'ra', false, false);
     qa_db_add_selectspec_ousers($qspec, 'rau', 'raup');
     $qspec['source'] .= " JOIN (SELECT questionid, childid FROM ^homepage ORDER BY ^homepage.updated DESC) AS rcaq ON ^posts.postid=rcaq.questionid" . " LEFT JOIN ^posts AS ra ON childid=ra.postid" . (QA_FINAL_EXTERNAL_USERS ? "" : " LEFT JOIN ^users AS rau ON ra.userid=rau.userid") . " LEFT JOIN ^userpoints AS raup ON ra.userid=raup.userid LIMIT #,#";
     array_push($qspec['columns'], 'childid');
     array_push($qspec['arguments'], $start, $count);
     $qspec['sortdesc'] = 'otime';
     $query = 'SELECT ';
     foreach ($qspec['columns'] as $columnas => $columnfrom) {
         $query .= $columnfrom . (is_int($columnas) ? '' : ' AS ' . $columnas) . ', ';
     }
     $query = qa_db_apply_sub(substr($query, 0, -2) . (strlen(@$qspec['source']) ? ' FROM ' . $qspec['source'] : ''), @$qspec['arguments']);
     $results = qa_db_read_all_assoc(qa_db_query_raw($query));
     qa_db_post_select($results, $qspec);
     list($categories, $categoryid) = qa_db_select_with_pending(qa_db_category_nav_selectspec($slugs, false, false, true), $countslugs ? qa_db_slugs_to_category_id_selectspec($slugs) : null);
     $questions = qa_any_sort_and_dedupe($results);
     // $questions=qa_any_sort_and_dedupe(array_merge($recentquestions,$recentanswers));
     $pagesize = qa_opt('page_size_home');
     if ($countslugs) {
         if (!isset($categoryid)) {
             return include QA_INCLUDE_DIR . 'qa-page-not-found.php';
         }
         $categorytitlehtml = qa_html($categories[$categoryid]['title']);
         $sometitle = qa_lang_html_sub('main/recent_qs_as_in_x', $categorytitlehtml);
         $nonetitle = qa_lang_html_sub('main/no_questions_in_x', $categorytitlehtml);
     } else {
         $sometitle = qa_lang_html('main/recent_qs_as_title');
         $nonetitle = qa_lang_html('main/no_questions_found');
     }
     require_once QA_INCLUDE_DIR . 'qa-app-q-list.php';
     $qa_content = qa_q_list_page_content($questions, $pagesize, $start, $totalcount, $sometitle, $nonetitle, $categories, $categoryid, true, qa_opt('eql_homepage_url'), qa_opt('feed_for_qa') ? qa_opt('eql_homepage_url') : null, count($questions) < $pagesize ? qa_html_suggest_ask($categoryid) : qa_html_suggest_qs_tags(qa_using_tags(), qa_category_path_request($categories, $categoryid)), null, null);
     return $qa_content;
 }
开发者ID:BrunoVandekerkhove,项目名称:q2a-expandable-question-lists,代码行数:42,代码来源:qa-eql-homepage.php

示例5: process_request

 function process_request($request)
 {
     require_once QA_INCLUDE_DIR . 'qa-db-selects.php';
     require_once QA_INCLUDE_DIR . 'qa-app-format.php';
     require_once QA_INCLUDE_DIR . 'qa-app-q-list.php';
     $start = qa_get_start();
     $userid = qa_get_logged_in_userid();
     $categoryslugs = qa_request_parts(1);
     //$selectspec = qa_db_qs_selectspec($userid, 'created', $start, $categoryslugs, null, false, false, qa_opt_if_loaded('page_size_qs'));
     $selectspec = qa_db_posts_basic_selectspec($userid, false);
     $selectspec['source'] .= ' JOIN ^postmeta ON ^posts.postid=^postmeta.post_id AND ^postmeta.meta_key=$ AND ^postmeta.meta_value>0' . (is_array($this->expert_user) ? ' AND ^posts.categoryid IN (#)' : ' AND $');
     //$selectspec['source'].=' JOIN (SELECT postid FROM ^posts WHERE type=$ ORDER BY ^posts.created DESC LIMIT #,#) y ON ^posts.postid=y.postid';
     $selectspec['arguments'] = array_merge($selectspec['arguments'], array('is_expert_question', $this->expert_user));
     $questions = qa_db_select_with_pending($selectspec);
     $nonetitle = qa_lang_html('main/no_questions_found');
     global $qa_start;
     //	Prepare and return content for theme
     $qa_content = qa_q_list_page_content($questions, qa_opt('page_size_qs'), $qa_start, count($questions), qa_opt('expert_question_page_title'), $nonetitle, null, null, false, null, null, null, null);
     return $qa_content;
 }
开发者ID:rkarimabadi,项目名称:q2a-expert-questions,代码行数:20,代码来源:qa-expert-page.php

示例6: qa_html

    if (qa_opt('show_home_description')) {
        $qa_content['description'] = qa_html(qa_opt('home_description'));
    }
    $qa_content['custom'] = qa_opt('custom_home_content');
    return $qa_content;
}
//	If we got this far, it's a good old-fashioned Q&A listing page
require_once QA_INCLUDE_DIR . 'app/q-list.php';
qa_set_template('qa');
$questions = qa_any_sort_and_dedupe(array_merge($questions1, $questions2));
$pagesize = qa_opt('page_size_home');
if ($countslugs) {
    if (!isset($categoryid)) {
        return include QA_INCLUDE_DIR . 'qa-page-not-found.php';
    }
    $categorytitlehtml = qa_html($categories[$categoryid]['title']);
    $sometitle = qa_lang_html_sub('main/recent_qs_as_in_x', $categorytitlehtml);
    $nonetitle = qa_lang_html_sub('main/no_questions_in_x', $categorytitlehtml);
} else {
    $sometitle = qa_lang_html('main/recent_qs_as_title');
    $nonetitle = qa_lang_html('main/no_questions_found');
}
//	Prepare and return content for theme for Q&A listing page
$qa_content = qa_q_list_page_content($questions, $pagesize, 0, null, $sometitle, $nonetitle, $categories, $categoryid, true, $explicitqa ? 'qa/' : '', qa_opt('feed_for_qa') ? 'qa' : null, count($questions) < $pagesize ? qa_html_suggest_ask($categoryid) : qa_html_suggest_qs_tags(qa_using_tags(), qa_category_path_request($categories, $categoryid)), null, null);
if (!$explicitqa && !$countslugs && qa_opt('show_home_description')) {
    $qa_content['description'] = qa_html(qa_opt('home_description'));
}
return $qa_content;
/*
	Omit PHP closing tag to help avoid accidental output
*/
开发者ID:ronkeizer,项目名称:question2answer,代码行数:31,代码来源:default.php

示例7: qa_lang_html_sub

        break;
    case 'upvotes':
        if ($countslugs) {
            $sometitle = qa_lang_html_sub('main/unupvoteda_qs_in_x', $categorytitlehtml);
            $nonetitle = qa_lang_html_sub('main/no_una_questions_in_x', $categorytitlehtml);
        } else {
            $sometitle = qa_lang_html('main/unupvoteda_qs_title');
            $nonetitle = qa_lang_html('main/no_unupvoteda_qs_found');
            $count = qa_opt('cache_unupaqcount');
        }
        break;
    default:
        $feedpathprefix = qa_opt('feed_for_unanswered') ? 'unanswered' : null;
        $linkparams = array();
        if ($countslugs) {
            $sometitle = qa_lang_html_sub('main/unanswered_qs_in_x', $categorytitlehtml);
            $nonetitle = qa_lang_html_sub('main/no_una_questions_in_x', $categorytitlehtml);
        } else {
            $sometitle = qa_lang_html('main/unanswered_qs_title');
            $nonetitle = qa_lang_html('main/no_una_questions_found');
            $count = qa_opt('cache_unaqcount');
        }
        break;
}
//	Prepare and return content for theme
$qa_content = qa_q_list_page_content($questions, qa_opt('page_size_una_qs'), $start, @$count, $sometitle, $nonetitle, QA_ALLOW_UNINDEXED_QUERIES ? $categories : null, QA_ALLOW_UNINDEXED_QUERIES ? $categoryid : null, false, 'unanswered/', $feedpathprefix, qa_html_suggest_qs_tags(qa_using_tags()), $linkparams, $linkparams);
$qa_content['navigation']['sub'] = qa_unanswered_sub_navigation($by, $categoryslugs);
return $qa_content;
/*
	Omit PHP closing tag to help avoid accidental output
*/
开发者ID:mostafiz93,项目名称:PrintfScanf,代码行数:31,代码来源:qa-page-unanswered.php

示例8: header

	More about this license: http://www.question2answer.org/license.php
*/
if (!defined('QA_VERSION')) {
    // don't allow this page to be requested directly from browser
    header('Location: ../');
    exit;
}
require_once QA_INCLUDE_DIR . 'qa-db-selects.php';
require_once QA_INCLUDE_DIR . 'qa-app-format.php';
require_once QA_INCLUDE_DIR . 'qa-app-q-list.php';
$categoryslugs = qa_request_parts(1);
$countslugs = count($categoryslugs);
$userid = qa_get_logged_in_userid();
//	Get list of comments with related questions, plus category information
list($questions, $categories, $categoryid) = qa_db_select_with_pending(qa_db_recent_c_qs_selectspec($userid, 0, $categoryslugs), qa_db_category_nav_selectspec($categoryslugs, false, false, true), $countslugs ? qa_db_slugs_to_category_id_selectspec($categoryslugs) : null);
if ($countslugs) {
    if (!isset($categoryid)) {
        return include QA_INCLUDE_DIR . 'qa-page-not-found.php';
    }
    $categorytitlehtml = qa_html($categories[$categoryid]['title']);
    $sometitle = qa_lang_html_sub('main/recent_cs_in_x', $categorytitlehtml);
    $nonetitle = qa_lang_html_sub('main/no_comments_in_x', $categorytitlehtml);
} else {
    $sometitle = qa_lang_html('main/recent_cs_title');
    $nonetitle = qa_lang_html('main/no_comments_found');
}
//	Prepare and return content for theme
return qa_q_list_page_content(qa_any_sort_and_dedupe($questions), qa_opt('page_size_activity'), 0, null, $sometitle, $nonetitle, $categories, $categoryid, false, 'comments/', qa_opt('feed_for_activity') ? 'comments' : null, qa_html_suggest_qs_tags(qa_using_tags(), qa_category_path_request($categories, $categoryid)));
/*
	Omit PHP closing tag to help avoid accidental output
*/
开发者ID:mostafiz93,项目名称:PrintfScanf,代码行数:31,代码来源:qa-page-comments.php

示例9: qa_get_logged_in_userid

require_once QA_INCLUDE_DIR . 'qa-app-format.php';
require_once QA_INCLUDE_DIR . 'qa-app-q-list.php';
//	Check that we're logged in
$userid = qa_get_logged_in_userid();
if (!isset($userid)) {
    qa_redirect('login');
}
//	Find out which updates to show
$forfavorites = qa_get('show') != 'content';
$forcontent = qa_get('show') != 'favorites';
//	Get lists of recent updates for this user
$questions = qa_db_select_with_pending(qa_db_user_updates_selectspec($userid, $forfavorites, $forcontent));
if ($forfavorites) {
    if ($forcontent) {
        $sometitle = qa_lang_html('misc/recent_updates_title');
        $nonetitle = qa_lang_html('misc/no_recent_updates');
    } else {
        $sometitle = qa_lang_html('misc/recent_updates_favorites');
        $nonetitle = qa_lang_html('misc/no_updates_favorites');
    }
} else {
    $sometitle = qa_lang_html('misc/recent_updates_content');
    $nonetitle = qa_lang_html('misc/no_updates_content');
}
//	Prepare and return content for theme
$qa_content = qa_q_list_page_content(qa_any_sort_and_dedupe($questions), null, 0, null, $sometitle, $nonetitle, null, null, null, null, null, $forfavorites ? strtr(qa_lang_html('misc/suggest_update_favorites'), array('^1' => '<a href="' . qa_path_html('favorites') . '">', '^2' => '</a>')) : null);
$qa_content['navigation']['sub'] = array('all' => array('label' => qa_lang_html('misc/nav_all_my_updates'), 'url' => qa_path_html('updates'), 'selected' => $forfavorites && $forcontent), 'favorites' => array('label' => qa_lang_html('misc/nav_my_favorites'), 'url' => qa_path_html('updates', array('show' => 'favorites')), 'selected' => $forfavorites && !$forcontent), 'myposts' => array('label' => qa_lang_html('misc/nav_my_content'), 'url' => qa_path_html('updates', array('show' => 'content')), 'selected' => $forcontent && !$forfavorites));
return $qa_content;
/*
	Omit PHP closing tag to help avoid accidental output
*/
开发者ID:gogupe,项目名称:question2answer-releases,代码行数:31,代码来源:qa-page-updates.php

示例10: or



	This program is free software; you can redistribute it and/or
	modify it under the terms of the GNU General Public License
	as published by the Free Software Foundation; either version 2
	of the License, or (at your option) any later version.
	
	This program is distributed in the hope that it will be useful,
	but WITHOUT ANY WARRANTY; without even the implied warranty of
	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
	GNU General Public License for more details.

	More about this license: http://www.question2answer.org/license.php
*/
if (!defined('QA_VERSION')) {
    // don't allow this page to be requested directly from browser
    header('Location: ../');
    exit;
}
// report that we entered this page
qa_report_event('page_enter', qa_get_logged_in_userid(), qa_get_logged_in_handle(), qa_cookie_get(), array('params' => $_SERVER['QUERY_STRING'], 'path' => $_SERVER['SCRIPT_NAME']));
require_once QA_INCLUDE_DIR . 'qa-db-selects.php';
require_once QA_INCLUDE_DIR . 'qa-app-q-list.php';
//	Get list of questions
$questions = qa_db_select_with_pending(qa_db_qs_selectspec($qa_login_userid, 'hotness', $qa_start));
//	Prepare and return content for theme
$qa_content = qa_q_list_page_content($questions, qa_opt('page_size_hot_qs'), $qa_start, qa_opt('cache_qcount'), qa_lang_html('main/hot_qs_title'), qa_lang_html('main/no_questions_found'), null, null, null, null, qa_opt('feed_for_hot') ? 'hot' : null, qa_html_suggest_ask());
return $qa_content;
/*
	Omit PHP closing tag to help avoid accidental output
*/
开发者ID:TheProjecter,项目名称:microprobe,代码行数:29,代码来源:qa-page-hot.php

示例11: array

$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
*/
开发者ID:kosmoluna,项目名称:question2answer,代码行数:31,代码来源:questions.php

示例12: header

	More about this license: http://www.question2answer.org/license.php
*/
if (!defined('QA_VERSION')) {
    // don't allow this page to be requested directly from browser
    header('Location: ../');
    exit;
}
require_once QA_INCLUDE_DIR . 'db/selects.php';
require_once QA_INCLUDE_DIR . 'app/q-list.php';
//	Get list of hottest questions, allow per-category if QA_ALLOW_UNINDEXED_QUERIES set in qa-config.php
$categoryslugs = QA_ALLOW_UNINDEXED_QUERIES ? qa_request_parts(1) : null;
$countslugs = @count($categoryslugs);
$start = qa_get_start();
$userid = qa_get_logged_in_userid();
list($questions, $categories, $categoryid) = qa_db_select_with_pending(qa_db_qs_selectspec($userid, 'hotness', $start, $categoryslugs, null, false, false, qa_opt_if_loaded('page_size_hot_qs')), qa_db_category_nav_selectspec($categoryslugs, false, false, true), $countslugs ? qa_db_slugs_to_category_id_selectspec($categoryslugs) : null);
if ($countslugs) {
    if (!isset($categoryid)) {
        return include QA_INCLUDE_DIR . 'qa-page-not-found.php';
    }
    $categorytitlehtml = qa_html($categories[$categoryid]['title']);
    $sometitle = qa_lang_html_sub('main/hot_qs_in_x', $categorytitlehtml);
    $nonetitle = qa_lang_html_sub('main/no_questions_in_x', $categorytitlehtml);
} else {
    $sometitle = qa_lang_html('main/hot_qs_title');
    $nonetitle = qa_lang_html('main/no_questions_found');
}
//	Prepare and return content for theme
return qa_q_list_page_content($questions, qa_opt('page_size_hot_qs'), $start, $countslugs ? $categories[$categoryid]['qcount'] : qa_opt('cache_qcount'), $sometitle, $nonetitle, QA_ALLOW_UNINDEXED_QUERIES ? $categories : null, $categoryid, true, QA_ALLOW_UNINDEXED_QUERIES ? 'hot/' : null, qa_opt('feed_for_hot') ? 'hot' : null, qa_html_suggest_ask());
/*
	Omit PHP closing tag to help avoid accidental output
*/
开发者ID:kosmoluna,项目名称:question2answer,代码行数:31,代码来源:hot.php

示例13: header

	More about this license: http://www.question2answer.org/license.php
*/
if (!defined('QA_VERSION')) {
    // don't allow this page to be requested directly from browser
    header('Location: ../');
    exit;
}
require_once QA_INCLUDE_DIR . 'db/selects.php';
require_once QA_INCLUDE_DIR . 'app/format.php';
require_once QA_INCLUDE_DIR . 'app/q-list.php';
$categoryslugs = qa_request_parts(1);
$countslugs = count($categoryslugs);
$userid = qa_get_logged_in_userid();
//	Get lists of recent activity in all its forms, plus category information
list($questions1, $questions2, $questions3, $questions4, $categories, $categoryid) = qa_db_select_with_pending(qa_db_qs_selectspec($userid, 'created', 0, $categoryslugs, null, false, false, qa_opt_if_loaded('page_size_activity')), qa_db_recent_a_qs_selectspec($userid, 0, $categoryslugs), qa_db_recent_c_qs_selectspec($userid, 0, $categoryslugs), qa_db_recent_edit_qs_selectspec($userid, 0, $categoryslugs), qa_db_category_nav_selectspec($categoryslugs, false, false, true), $countslugs ? qa_db_slugs_to_category_id_selectspec($categoryslugs) : null);
if ($countslugs) {
    if (!isset($categoryid)) {
        return include QA_INCLUDE_DIR . 'qa-page-not-found.php';
    }
    $categorytitlehtml = qa_html($categories[$categoryid]['title']);
    $sometitle = qa_lang_html_sub('main/recent_activity_in_x', $categorytitlehtml);
    $nonetitle = qa_lang_html_sub('main/no_questions_in_x', $categorytitlehtml);
} else {
    $sometitle = qa_lang_html('main/recent_activity_title');
    $nonetitle = qa_lang_html('main/no_questions_found');
}
//	Prepare and return content for theme
return qa_q_list_page_content(qa_any_sort_and_dedupe(array_merge($questions1, $questions2, $questions3, $questions4)), qa_opt('page_size_activity'), 0, null, $sometitle, $nonetitle, $categories, $categoryid, true, 'activity/', qa_opt('feed_for_activity') ? 'activity' : null, qa_html_suggest_qs_tags(qa_using_tags(), qa_category_path_request($categories, $categoryid)), null, null);
/*
	Omit PHP closing tag to help avoid accidental output
*/
开发者ID:kosmoluna,项目名称:question2answer,代码行数:31,代码来源:activity.php

示例14: qa_html

    if (qa_opt('show_home_description')) {
        $qa_content['description'] = qa_html(qa_opt('home_description'));
    }
    $qa_content['custom'] = qa_opt('custom_home_content');
    return $qa_content;
}
//	If we got this far, it's a good old-fashioned Q&A listing page
require_once QA_INCLUDE_DIR . 'qa-app-q-list.php';
qa_set_template('qa');
$questions = qa_any_sort_and_dedupe(array_merge($questions1, $questions2));
$pagesize = qa_opt('page_size_home');
if ($countslugs) {
    if (!isset($categoryid)) {
        return include QA_INCLUDE_DIR . 'qa-page-not-found.php';
    }
    $categorytitlehtml = qa_html($categories[$categoryid]['title']);
    $sometitle = qa_lang_html_sub('main/recent_qs_as_in_x', $categorytitlehtml);
    $nonetitle = qa_lang_html_sub('main/no_questions_in_x', $categorytitlehtml);
} else {
    $sometitle = qa_lang_html('main/recent_qs_as_title');
    $nonetitle = qa_lang_html('main/no_questions_found');
}
//	Prepare and return content for theme for Q&A listing page
$qa_content = qa_q_list_page_content($questions, $pagesize, 0, null, $sometitle, $nonetitle, $categories, $categoryid, true, $explicitqa ? 'qa/' : '', qa_opt('feed_for_qa') ? 'qa' : null, '', null, null, $favorite);
if (!$explicitqa && !$countslugs && qa_opt('show_home_description')) {
    $qa_content['description'] = qa_html(qa_opt('home_description'));
}
return $qa_content;
/*
	Omit PHP closing tag to help avoid accidental output
*/
开发者ID:ruuttt,项目名称:question2answer,代码行数:31,代码来源:qa-page-default.php


注:本文中的qa_q_list_page_content函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。