copy the function setPaginate () from BxDolSearch?

please help,

 

need to modify per page limit in search results, number of members displayed per page in search results, not sure about best way to copy/add functions to my template?

 

how to copy the function setPaginate () from inc/classes/BxDolSearch to \templates\base\scripts\BxBaseSearchResults or \templates\tmpl_evo\scripts\BxTempSearchResults?

 

where to add the function, BxBaseSearchResult or BxTempSearchResults? and is this the best way to limit per page search result, if not what function(s) must be added to BxBaseSearchResult or BxTempSearchResults? and where in the code do I add the function(s)? 

 

don't know if this is the right way to limit per page search results, and if not please advice me about how to limit per page in search results?

Quote · 1 Jan 2017

To override default number of users displayed on search result page you need to change constructor of BxTemplBrowse class in your custom template the following way:

        function BxTemplBrowse( &$aFilteredSettings, &$aDisplaySettings, $sPageName )
        {
            // call the parent constructor ;
            parent::BxBaseBrowse( $aFilteredSettings, $aDisplaySettings, $sPageName );

            if (!isset($_GET['per_page'])) $this->aDisplaySettings['per_page'] = (bx_get('mode') == 'extended' ? 2 : 3);
        }
Rules → http://www.boonex.com/terms
Quote · 7 Jan 2017

Thanks Alex, I appreciate your support, after following your instructions it's all working =) 

 

To override default number of users displayed on search result page you need to change constructor of BxTemplBrowse class in your custom template the following way:

        function BxTemplBrowse( &$aFilteredSettings, &$aDisplaySettings, $sPageName )
        {
            // call the parent constructor ;
            parent::BxBaseBrowse( $aFilteredSettings, $aDisplaySettings, $sPageName );

            if (!isset($_GET['per_page'])) $this->aDisplaySettings['per_page'] = (bx_get('mode') == 'extended' ? 2 : 3);
        }

 

Quote · 16 Jan 2017
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.