Osclass forums

Support forums => Themes => Twitter => Topic started by: goodidea on May 02, 2015, 11:58:25 am

Title: No pagination on ad management page in user area [SOLVED]
Post by: goodidea on May 02, 2015, 11:58:25 am
Hi,

I can see pagination code on "user-items.php" of twitter theme but there is no pagination on ad management page. I have 17 test ads in my account but after logging into account when I click on ad management tab in user area it shows last 10 ads without pagination. With this user will not be able to edit/delete his old ads. It is very serious issue for my project. Please help me resolve it. A screen shot is attached

Thanks,
Title: Re: No pagination on ad management page in user area
Post by: teseo on May 03, 2015, 01:36:38 am
Hi,

Are you using Twitter with latest Osclass? ??? This theme is discontinued ("Compatible up to: 3.4.1"). This deprecated function is the responsible for the issue:

Code: [Select]
    // DEPRECATED: This function will be removed in version 4.0
    function osc_list_total_pages() {
        return osc_search_total_pages();
    }

Anyway, to solve this you need to look for these lines on twitter/functions.php:

Code: [Select]
    function twitter_user_item_pagination() {
        $params = array( 'total'              => (int) View::newInstance()->_get('list_total_pages'),
                        'selected'           => (int) View::newInstance()->_get('list_page'),

and replace them with:

Code: [Select]
    function twitter_user_item_pagination() {
        $params = array( 'total'    => osc_search_total_pages(),
                        'selected' => osc_search_page(),

Regards
Title: Re: No pagination on ad management page in user area
Post by: goodidea on May 03, 2015, 09:43:06 am
 Yes teseo I am using twitter theme with latest osclass. But your solution worked very well, thanks  :)
Title: Re: No pagination on ad management page in user area [SOLVED]
Post by: teseo on May 03, 2015, 02:18:10 pm
You're welcome. :) The problem is that you'll likely keep finding more of this kind of incompatibilities... :(

Regards