ewiget
Admin
 Admin
| Posts: 171 |  | Karma: 2
|
Re:feedback needed - 2005/10/25 14:42
drew wrote: drew wrote:
I recently installed this component and everything seems to work except the "Display #" select box. Under my Global Configuration I have my list lengths set to 30. Therefore when viewing my components in the Admin. it sshould list up to 30 items. Lets say I have 40 banners. When I Components>Banners>Manager Banners, it should only list the most recent 30 of the 40 in the database.
When I do Components>Race Stats>Points the Display# select box always defaults to 10. I have 20 points places entered so it only will display 10.
The "display #" works fine in all my other components. I am assuming that this component is using an old function, or the code is not correct.
UPDATE: I found out how to make this work. For instance in function listSeason where you have
| Code: |
# Prepare pagelimit choices
$limit = intval( mosGetParam( $_POST, 'limit', 10 ) );
$limitstart = intval( mosGetParam( $_POST, 'limitstart', 0 ) );
|
Replace with..
| Code: |
$limit = $mainframe->getUserStateFromRequest( "viewlistlimit", 'limit', $mosConfig_list_limit );
$limitstart = $mainframe->getUserStateFromRequest( "viewban{$option}limitstart", 'limitstart', 0 );
|
And where you have..
| Code: |
# Set up page navigation
include_once( "includes/pageNavigation.php" );
$pageNav = new mosPageNav( $total, $limitstart, $limit );
|
Replace with ....
| Code: |
require_once( $GLOBALS['mosConfig_absolute_path'] . '/administrator/includes/pageNavigation.php' );
$pageNav = new mosPageNav( $total, $limitstart, $limit );
|
This code will have to be inserted where ever those lines appear in admin.racestats.php to get it to work on the other admin screens.<br><br>Post edited by: drew, at: 2005/10/25 14:40
I will add your changes to the code and give proper credit
Ed Wiget Technical Support http://www.xtremewebhosts.com |