Example #1
0
$sitetitle = qa_opt('site_title');
$siteurl = qa_opt('site_url');
$full = qa_opt('feed_full_text');
$count = qa_opt('feed_number_items');
$showurllinks = qa_opt('show_url_links');
$linkrequest = $feedtype . ($countslugs ? '/' . implode('/', $categoryslugs) : '');
$linkparams = null;
switch ($feedtype) {
    case 'questions':
        $questions = qa_feed_load_ifcategory($categoryslugs, 'main/recent_qs_title', 'main/recent_qs_in_x', $title, qa_db_qs_selectspec(null, 'created', 0, $categoryslugs, null, false, $full, $count));
        break;
    case 'hot':
        $questions = qa_feed_load_ifcategory($categoryslugs, 'main/hot_qs_title', 'main/hot_qs_in_x', $title, qa_db_qs_selectspec(null, 'hotness', 0, $categoryslugs, null, false, $full, $count));
        break;
    case 'unanswered':
        $questions = qa_feed_load_ifcategory($categoryslugs, 'main/unanswered_qs_title', 'main/unanswered_qs_in_x', $title, qa_db_unanswered_qs_selectspec(null, null, 0, $categoryslugs, false, $full, $count));
        break;
    case 'answers':
        $questions = qa_feed_load_ifcategory($categoryslugs, 'main/recent_as_title', 'main/recent_as_in_x', $title, qa_db_recent_a_qs_selectspec(null, 0, $categoryslugs, null, false, $full, $count));
        break;
    case 'comments':
        $questions = qa_feed_load_ifcategory($categoryslugs, 'main/recent_cs_title', 'main/recent_cs_in_x', $title, qa_db_recent_c_qs_selectspec(null, 0, $categoryslugs, null, false, $full, $count));
        break;
    case 'qa':
        $questions = qa_feed_load_ifcategory($categoryslugs, 'main/recent_qs_as_title', 'main/recent_qs_as_in_x', $title, qa_db_qs_selectspec(null, 'created', 0, $categoryslugs, null, false, $full, $count), qa_db_recent_a_qs_selectspec(null, 0, $categoryslugs, null, false, $full, $count));
        break;
    case 'activity':
        $questions = qa_feed_load_ifcategory($categoryslugs, 'main/recent_activity_title', 'main/recent_activity_in_x', $title, qa_db_qs_selectspec(null, 'created', 0, $categoryslugs, null, false, $full, $count), qa_db_recent_a_qs_selectspec(null, 0, $categoryslugs, null, false, $full, $count), qa_db_recent_c_qs_selectspec(null, 0, $categoryslugs, null, false, $full, $count), qa_db_recent_edit_qs_selectspec(null, 0, $categoryslugs, null, true, $full, $count));
        break;
    case 'tag':
        $tag = $feedparams[0];
$countslugs = @count($categoryslugs);
$by = qa_get('by');
$start = qa_get_start();
$userid = qa_get_logged_in_userid();
switch ($by) {
    case 'selected':
        $selectby = 'selchildid';
        break;
    case 'upvotes':
        $selectby = 'amaxvote';
        break;
    default:
        $selectby = 'acount';
        break;
}
list($questions, $categories, $categoryid) = qa_db_select_with_pending(qa_db_unanswered_qs_selectspec($userid, $selectby, $start, $categoryslugs, false, false, qa_opt_if_loaded('page_size_una_qs')), QA_ALLOW_UNINDEXED_QUERIES ? qa_db_category_nav_selectspec($categoryslugs, false, false, true) : null, $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']);
}
$feedpathprefix = null;
$linkparams = array('by' => $by);
switch ($by) {
    case 'selected':
        if ($countslugs) {
            $sometitle = qa_lang_html_sub('main/unselected_qs_in_x', $categorytitlehtml);
            $nonetitle = qa_lang_html_sub('main/no_una_questions_in_x', $categorytitlehtml);
        } else {
            $sometitle = qa_lang_html('main/unselected_qs_title');
Example #3
0
$sitetitle = qa_opt('site_title');
$siteurl = qa_opt('site_url');
$full = qa_opt('feed_full_text');
$count = qa_opt('feed_number_items');
$showurllinks = qa_opt('show_url_links');
$linkrequest = $feedtype . ($countslugs ? '/' . implode('/', $categoryslugs) : '');
$linkparams = null;
switch ($feedtype) {
    case 'questions':
        qa_feed_load_ifcategory('main/recent_qs_title', 'main/recent_qs_in_x', qa_db_qs_selectspec(null, 'created', 0, $categoryslugs, null, false, $full, $count));
        break;
    case 'hot':
        qa_feed_load_ifcategory('main/hot_qs_title', 'main/hot_qs_title', qa_db_qs_selectspec(null, 'hotness', 0, null, null, false, $full, $count));
        break;
    case 'unanswered':
        qa_feed_load_ifcategory('main/unanswered_qs_title', 'main/unanswered_qs_in_x', qa_db_unanswered_qs_selectspec(null, 0, null, false, $full, $count));
        break;
    case 'answers':
        qa_feed_load_ifcategory('main/recent_as_title', 'main/recent_as_in_x', qa_db_recent_a_qs_selectspec(null, 0, $categoryslugs, null, false, $full, $count));
        break;
    case 'comments':
        qa_feed_load_ifcategory('main/recent_cs_title', 'main/recent_cs_in_x', qa_db_recent_c_qs_selectspec(null, 0, $categoryslugs, null, false, $full, $count));
        break;
    case 'qa':
        qa_feed_load_ifcategory('main/recent_qs_as_title', 'main/recent_qs_as_in_x', qa_db_qs_selectspec(null, 'created', 0, $categoryslugs, null, false, $full, $count), qa_db_recent_a_qs_selectspec(null, 0, $categoryslugs, null, false, $full, $count));
        break;
    case 'activity':
        qa_feed_load_ifcategory('main/recent_activity_title', 'main/recent_activity_in_x', qa_db_qs_selectspec(null, 'created', 0, $categoryslugs, null, false, $full, $count), qa_db_recent_a_qs_selectspec(null, 0, $categoryslugs, null, false, $full, $count), qa_db_recent_c_qs_selectspec(null, 0, $categoryslugs, null, false, $full, $count), qa_db_recent_edit_qs_selectspec(null, 0, $categoryslugs, null, true, $full, $count));
        break;
    case 'tag':
        $tag = $feedparams[0];