Simply Advanced Directory Listing Script

 
Post new topic   Reply to topic    Aprelium Forum Index -> Tutorials
View previous topic :: View next topic  
Author Message
Phaux
-


Joined: 14 Jul 2006
Posts: 11
Location: Arizona, w00t

PostPosted: Tue Jul 25, 2006 8:10 am    Post subject: Simply Advanced Directory Listing Script Reply with quote

I made this script because I couldn't seem to find any good automated directory listing scripts that worked seamlessly with AWS, or they didn't fit my likings. This script is slightly based off the sample script that's provided with AWS, located in the server's documentation. There are a few little things that this script will automatically do that most directory listing scripts will automatically:

    O This script automatically replaces the "../" Link with "Go Back", for visual friendliness.
    O If the file does not have a $size, or $size is 0, then $size is set to nothing.
    O If the file does not have a $mimetype, then $mimetype is set to "Directory", because 99% of the time, thats what it would be.
    O This script automatically determines what unit of measurement to use with $size, Byte(s), KB, MB, or GB. Anything greater than 1024GB is left with the GB measurement.
    O This script automatically URL Encodes the link to the file/folder (" " -> "%20"), and URL Decodes the link name (What is shown on the page).


On the earlier versions of this script, I had wanted to have it automatically replace the mimetype with the name of the mimetype. For instance, replace "video/quicktime" with "Quicktime Video", replace "application/octet-stream" with "Application", and so on. This proved difficult to do at the time, so I dropped it. It's fine without it at the time anyways. If anyone wants to try making up this part, go for it, I'd like to see how you write the code, maybe I'll add it to mine!

Download here: http://dyslexia.zapto.org/projects/dirlisting.php.gz (GZIP Archive, 662 Bytes)
_________________
http://phaux.bounceme.net:82/
Back to top View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Aprelium Forum Index -> Tutorials All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB phpBB Group