How to adjust members block?

I wonder. For 7.0.x, the members block on the homepage - how to edit the query that it does not get and sort all the members fitting the condition (ie., online, last logged in, last registered and so on), but only last 100, for example? I mean, I want to sort members but I want to stop query after finding first n members and still have a chance for some pagination on the block. So it shows, again for example, 10 such members per page but the overall result would be limited to 100 (and the title for block could be 100 recent members or something similar)?

 

This would:

1. make the page load more quickly

2. force members to use search or other means to browse through the members (there is really not much need to have all members ready and sorted on the homepage, especially if it goes into tens of thousands)

 

I have managed to limit the query but I did it obviously not in the right place, because in my instance it loads into the block the given limit, while I want the result to be the above mentioned 100 but shown only first 10 with the pagination enambling the member to browse a bit in the query results... I could possibly hit the right spot by trial and error but have too many other things to attend to that I feel ok with wasting time like this. :)

 

Thanks in advance. :)

 

P.S.: The same could be applied to all those public blocks, for photos, videos and so on, since the cache setting from the admin does not work, after one click on pagination the whole block freezes and does not brose forward or backward, so the caching for blocks is useless for the blocks with more than one page or sorting options on the top of the block...

 

P.S.2: I was editing $sqlLimit in bxbaseindexpageview but looking at it now, maybe I should have edited $sqlCondition in individual cases? But how? Or perhaps no? Maybe instead of SELECT COUNT something like SELECT TOP N? :)

Quote · 19 Jul 2013

 

since the cache setting from the admin does not work, after one click on pagination the whole block freezes and does not brose forward or backward,

 This would indicate an error somewhere, it should not freeze; this is not normal operation.

Geeks, making the world a better place
Quote · 19 Jul 2013

You want to track down the function that handles the output for that block.  This may involved looking at the database to see which function and then tracking down that function.  Others may already know the function you need to edit.

Geeks, making the world a better place
Quote · 19 Jul 2013

Oh, I have no problem spotting the function in bxbaseindexpageview (function getMembers). That much I know. :) It's just I don't know which part of the query to edit, or what form to use, Limit, or Top? Either way, if I knew what to change and how, I could really edit all the blocks with pagination just to grab top 100 results and speed up the whole thing. I wondered also because I haven't even stumbled on something like this on the forums.

 

You want to track down the function that handles the output for that block.  This may involved looking at the database to see which function and then tracking down that function.  Others may already know the function you need to edit.

 

Quote · 19 Jul 2013

You could just remove the pagination part of the block.

Geeks, making the world a better place
Quote · 19 Jul 2013

 I did and changed the limit so it now just presents the last n members with no pagination. But that's only improvisation, because I want to have that link View All at the bottom and to have few pages of results for members to browse through. Actually, if I could find out how to keep View All link on the bottom of the block and pagination switched off, I perhaps could be content with it - but then again, I'd like to do something similar with public groups, photos, videos and so on, blocks. I would really prefer it had View All link for members to find more, as it makes more sense this way - to limit the query to few dozens of results but still having a link to where members could find more, if interested (especially photos, videos, and so on). Not everyone can make a mental leap to find the same target through the top menu, lol.

You could just remove the pagination part of the block.

 

Quote · 19 Jul 2013
 
 
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.