01-07-2007, 04:32 PM
I have a pre-release of the File Browser which you can get here*:
Someone really wanted it so I packaged and tested it so that anyone can use it.
Example usage & download; http://h-master.net/svn/fb/filebrowser.php
Direct Download; -> here <-
Current To Do List:
- Hidden Files and Folders
Lets you 'hide' folders or files you don't want users to see.
- Control Panel
Makes it easy for people with no PHP/JS/CSS skills
- Group Showing
Lets you choose which groups to show (name, type etc).
Developers:
PHP
filebrowser.php - editing the filename should still make everything work.
In the bottom of the main file are the functions used to show and format the files and folders.
The main function is _foldersort() and that creates an array for the current folder in use. It returns either the file or the array and ascending/descending what group.
The ones prefixed format_xxx() just sort out the raw text produced from _foldersort().
Javascript
functions.js - If you rename the file change the script tag in the header of the main php file (filebrowser.php by default).
The preview() function is the main one which shows the onmouseover box of image files.
Two functions [ makeRequest() and loading() ] are not used in the non-ajax version.
CSS
style.css - If you rename the file change the link tag in the header of the main php file (filebrowser.php by default).
Very basic and easy to edit =).
Icons
The current icons are in the images/ folder and are from famfamfam.
You can add you own by putting the icons in the images/ directory and updating the format_filetype() function in main php file (filebrowser.php by default).
Any ideas, options, code improvements welcome =). Have fun!
* Only the non-ajax version for the time being.
Someone really wanted it so I packaged and tested it so that anyone can use it.
Example usage & download; http://h-master.net/svn/fb/filebrowser.php
Direct Download; -> here <-
Current To Do List:
- Hidden Files and Folders
Lets you 'hide' folders or files you don't want users to see.
- Control Panel
Makes it easy for people with no PHP/JS/CSS skills
- Group Showing
Lets you choose which groups to show (name, type etc).
Developers:
PHP
filebrowser.php - editing the filename should still make everything work.
In the bottom of the main file are the functions used to show and format the files and folders.
The main function is _foldersort() and that creates an array for the current folder in use. It returns either the file or the array and ascending/descending what group.
The ones prefixed format_xxx() just sort out the raw text produced from _foldersort().
Javascript
functions.js - If you rename the file change the script tag in the header of the main php file (filebrowser.php by default).
The preview() function is the main one which shows the onmouseover box of image files.
Two functions [ makeRequest() and loading() ] are not used in the non-ajax version.
CSS
style.css - If you rename the file change the link tag in the header of the main php file (filebrowser.php by default).
Very basic and easy to edit =).
Icons
The current icons are in the images/ folder and are from famfamfam.
You can add you own by putting the icons in the images/ directory and updating the format_filetype() function in main php file (filebrowser.php by default).
Any ideas, options, code improvements welcome =). Have fun!
* Only the non-ajax version for the time being.
, and great that you have made it open source 

Maybe if I added a variable to add the name of a root folder and so if someone tries to go higher than that then it shows an error or goes to the root.