Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+6 votes
12.2k views
in Q2A Core by

All right, got curious and wanted to see quickly what to hack to get pagination:

1. Open qa-page-default.php (handles the main page request), and go to $qa_content=qa_q_list_page_content

2. There you change the following parameters:

//    Prepare and return content for theme for Q&A listing page

    $qa_content=qa_q_list_page_content(
        $questions, // questions
        $pagesize, // questions per page
       
qa_get_start(), // start offset
        qa_opt('cache_qcount'), // total count (null to hide page links)

 

Now I have the pagination on the main page.

However, clicking on the numbers in the pagination brings me always to the main page with the latest items. Not the next page ... ?

Anyone any idea how to finish that? =)

Thanks,
Kai

Q2A version: 1.5.4
by
I am looking for the same, I want to remove "To see more, click for the full list of questions or popular tags." and have a pagination.

Anyone ?
by
edited by
I am also interested. If it can do, I hope to realize by AJAX. I saw qa-page-activity.php. I thought that realization was very difficult as well as Gideon. Um...
Relation QA: http://www.question2answer.org/qa/2353
Sorry I mistake with activity page ...
by
"Default" and "Activity" have same difficulty. It is necessary to change lower 0(zero) into qa_get_start(). However, if it changed, the right result is not obtained.
    @list($questions1, $questions2, $categories, $categoryid, $favorite, $custompage)=qa_db_select_with_pending(
        qa_db_qs_selectspec($userid, 'created', 0, $slugs, null, false, false, qa_opt_if_loaded('page_size_activity')),
        qa_db_recent_a_qs_selectspec($userid, 0, $slugs),
...

Please log in or register to answer this question.

...