• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

member_view_tabs_content per page

Mike2020

Well-known member
#1
Hi all

I need some help passing perpage and page to my member_view_tabs_content.

I have it loading all the data into the member_view_tabs_content but it will not pass the perpage and page to this .

My model file has this

PHP:
public function getAllGivenMediaByUser ($userId, array $fetchOptions = array())
    {   
        $limitOptions = $this->prepareLimitFetchOptions($fetchOptions);
        $db = $this->_getDb();
   
        //Query the database with what we wat
           
            return $this->fetchAllKeyed($this->limitQueryResults(
            '
            SELECT
            F.*,
            M.*,
            category.title AS categorytitle,
            category.id AS categoryid
            FROM xf_gallery_files AS F
            INNER JOIN    xf_user M
            ON            F.creator_id = M.user_id
            LEFT JOIN xf_gallery_category AS category
            ON category.id = F.category_id
            WHERE F.creator_id = '.$userId.'
            ORDER BY F.updated DESC
            ', $limitOptions['limit'], $limitOptions['offset']
        ), 'id');
    }
my Listener
PHP:
    public static function templateHook($hookName, &$contents, array $hookParams, XenForo_Template_Abstract $template)
    {
       
        $param = array();
        $options = XenForo_Application::get('options');
        switch($hookName){
            case 'search_form_tabs':
                $contents .= $template->create('gallery_search_tab', $template->getParams());
                break;
            case 'member_view_tabs_heading':
                $contents .= $template->create('gallery_gallery_tab', $template->getParams());
                break;
            case 'member_view_tabs_content':
                $contents .= $template->create('gallery_gallery_tabs_content', $template->getParams());
                break;
        }

    }
as well as the load_controller adds all the info and outputs to the profile page when i click my tab.
but cannot pass the page number and other info to the template that outputs the content.

Any help would be great.