File Genie PHP Support Product Page
This topic was archived
Sort order
Shared 18 Feb 2007 21:47:53
1
likes this idea
18 Feb 2007 21:47:53 David Wyatt posted:
I want the files listed in some kind of order, but at present it seems totally random - not by date or by file name. Vey confusing for users looking for a particular file in the folder. Replies
Replied 26 Feb 2007 18:07:44
26 Feb 2007 18:07:44 Georgi Kralev replied:
Hi David Wyatt,
I have send you an email. In case you haven't received try the following solution:
You can sort Folder list through manually editing the Folder List 1.03 code.
When you place File Genie Folder List it at your page it generate the following code:
<?php
// *** Folder List 1.03
$Upload = new fileGenie();
$Upload->path = "Upload";
$Upload->allowedExtensions = "";
$Upload->includeFolders = false;
$Upload->showThumbnailsOnly = false;
$Upload->thumbnailsSuffix = "_small";
$Upload->naming = "suffix";
$Upload->thumbPath = "";
$Upload->processFolder();
?>
You could sort the Folder List in to ways: ASC, DESC.
You just have to modify the following line: Upload->processFolder();
To sort in ascending order the modified line should look like this:
$Upload->processFolder("fileName", "ASC"
;
Respectively for descending it should look like:
$Upload->processFolder("fileName", "DESC"
;
Note: When you modify the Folder List manually DW will stop recognize that the extension is applied on the page. Therefore, make the changes when you have finished working with the page.
I hope this helps you.
Regards,
Georgi Kralev
----------------------------------
Support - www.DMXzone.com
I have send you an email. In case you haven't received try the following solution:
You can sort Folder list through manually editing the Folder List 1.03 code.
When you place File Genie Folder List it at your page it generate the following code:
<?php
// *** Folder List 1.03
$Upload = new fileGenie();
$Upload->path = "Upload";
$Upload->allowedExtensions = "";
$Upload->includeFolders = false;
$Upload->showThumbnailsOnly = false;
$Upload->thumbnailsSuffix = "_small";
$Upload->naming = "suffix";
$Upload->thumbPath = "";
$Upload->processFolder();
?>
You could sort the Folder List in to ways: ASC, DESC.
You just have to modify the following line: Upload->processFolder();
To sort in ascending order the modified line should look like this:
$Upload->processFolder("fileName", "ASC"

Respectively for descending it should look like:
$Upload->processFolder("fileName", "DESC"

Note: When you modify the Folder List manually DW will stop recognize that the extension is applied on the page. Therefore, make the changes when you have finished working with the page.
I hope this helps you.
Regards,
Georgi Kralev
----------------------------------
Support - www.DMXzone.com
Replied 30 Apr 2007 02:47:37
30 Apr 2007 02:47:37 M R replied:
what exactly is it sorting it by? Its definitely not date or name. I added this in and it was changing the order but I can not cipher how its ordering it.
Replied 02 May 2007 11:53:08
02 May 2007 11:53:08 Georgi Kralev replied:
Hi M R,
<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>
what exactly is it sorting it by? Its definitely not date or name. I added this in and it was changing the order but I can not cipher how its ordering it.
<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>
You can sort by following values:
* fileName
* extension
* type
* size
* dateLastModified
To sort by any of the above values pass the value as string for first parameter of processFolder; For second parameter use the order ("ASC" / "DESC"
.
For example. To sort by file name:
$Upload->processFolder("fileName", "ASC"
; // For sort by name in ascending order
$Upload->processFolder("fileName", "DESC"
; // For sort by name in descending order
I hope this will help you.
Regards,
Georgi Kralev
----------------------------------
Support - www.DMXzone.com
<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>
what exactly is it sorting it by? Its definitely not date or name. I added this in and it was changing the order but I can not cipher how its ordering it.
<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>
You can sort by following values:
* fileName
* extension
* type
* size
* dateLastModified
To sort by any of the above values pass the value as string for first parameter of processFolder; For second parameter use the order ("ASC" / "DESC"

For example. To sort by file name:
$Upload->processFolder("fileName", "ASC"

$Upload->processFolder("fileName", "DESC"

I hope this will help you.
Regards,
Georgi Kralev
----------------------------------
Support - www.DMXzone.com