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
You are not logged in. Please login or register.
PunBB Forums → PunBB 1.2 troubleshooting → 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
Anyone ?
obviously it should be in userlist.php
Sure, but where ?
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".
you will also need to change the 50 to 10 in the mysql select query below line 130
you will also need to change the 50 to 10 in the mysql select query below line 130
Ah, that too.
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
PunBB Forums → PunBB 1.2 troubleshooting → Paging in User list ?
Powered by PunBB, supported by Informer Technologies, Inc.