1

Topic: Paging in User list ?

Everywhere in my forum I have 10 posts for each page in the topics, I would like the User list to show 10 members per page, where do I change this ?

Thanks

2

Re: Paging in User list ?

Anyone ?

3

Re: Paging in User list ?

obviously it should be in userlist.php

4

Re: Paging in User list ?

Sure, but where ?

Re: Paging in User list ?

123     // Determine the user offset (based on $_GET['p'])
124     $num_pages = ceil($num_users / 50);
125     
126     $p = (!isset($_GET['p']) || $_GET['p'] <= 1 || $_GET['p'] > $num_pages) ? 1 : $_GET['p'];
127     $start_from = 50 * ($p - 1);
128     
129     // Generate paging links
130     $paging_links = $lang_common['Pages'].': '.paginate($num_pages, $p, 'userlist.php?username='.urlencode($username).'&show_group='.$show_group.'&sort_by='.$sort_by.'&sort_dir='.strtoupper($sort_dir));

Just skimming the code (i.e. not really taking the time to understand it) it would appear that you'd want to change "50" to "10".

Looking for a certain modification for your forum? Please take a look here before posting.

Re: Paging in User list ?

you will also need to change the 50 to 10 in the mysql select query below  line 130

Sorry. Unactive due to personal life.

Re: Paging in User list ?

matt1298 wrote:

you will also need to change the 50 to 10 in the mysql select query below  line 130

Ah, that too. tongue

Looking for a certain modification for your forum? Please take a look here before posting.

8

Re: Paging in User list ?

I found 3 places with the number 50 - can anyone confirm that all 3 needs to be changed ?

Line 124: $num_pages = ceil($num_users / 50);
Line 127: $start_from = 50 * ($p - 1);
Line 157: .$sort_by.' '.$sort_dir.' LIMIT '.$start_from.', 50') or error('Unable to fetch user list', __FILE__, __LINE__, $db->error());

Thanks