HOW TO limit number of files that shown in DisplayViewer()?

Discuss everything related to File Uploader. All versions. Any questions related to the File Uploader developing or using should be posted to this forum.

Moderators: alexandrleonenko, Milton

administrator
Site Admin
Site Admin
Posts: 6003
Joined: Jan 7th, '09, 23:18
Contact:

HOW TO limit number of files that shown in DisplayViewer()?

Postby administrator » Jan 14th, '13, 20:05

To limit the number of the files that shown in DisplayViewer() you have to do following.

1. Open fileuploader.class.php and find ReadFiles() method.
2. In this method assign to variable $pageSize required value.
Instead of

Code: Select all

if (count($files) % $numColumns === 0) $pageSize = count($files) / $numColumns;
else $pageSize = floor(count($files) / $numColumns) + 1;


use

Code: Select all

$pageSize = 9; /* or any other number */

Return to “ApPHP AJAX File Uploader”