SimpleDir - Directory listing plugin - Printable Version +- GetSimple Support Forum (http://get-simple.info/forums) +-- Forum: GetSimple (http://get-simple.info/forums/forumdisplay.php?fid=3) +--- Forum: Plugins (http://get-simple.info/forums/forumdisplay.php?fid=13) +--- Thread: SimpleDir - Directory listing plugin (/showthread.php?tid=2325) Pages:
1
2
|
SimpleDir - Directory listing plugin - RobA - 2011-11-02 This is the plugin support thread for the SimpleDir plugin. Written as a repose to a post in the general request forum this plugin will generate a CSS style-able directory listing. The plugin includes a bunch of filetype icons and a sample CSS file. Now updated to include a configuration page (see attachment). To Install:
Demo site here: http://testbed.cartocopia.com/simpledir-test-page/ Couple of notes: You need to have the .htaccess file in the simpledir subdirectory - this redirects any file extension that does not match one of the provided icons to unknown.png If you want to change/replace/add to the direcory icons, they are 16x16 png files (hardcoded right now) named <lowercase extension>.png so for example, if you wanted to create a new icon for file type mp4, you would create a new icon file (or copy one of the existing movie icons) to mp4.png as put it in that directory. Any directory must be in the web path as the plugin just serves up links to the files and does not serve the files directly itself. (I'm still working on that one...) There is fairly simple error checking (All periods are stripped from the subdir parameter to prevent directory traversals) so it will NOT work for subdirectories having a period in the dubdirectory name. -Rob A> SimpleDir - Directory listing plugin - jyoz22 - 2011-11-02 Thanks for sharing! From what I saw in the demo, this plugin looks very promising. SimpleDir - Directory listing plugin - mvlcek - 2011-11-02 Looks great! Just one comment: it's not KB, but either kB (= 1000 B theoretically) or KiB (= 1024 B, but this is not widely used yet). SimpleDir - Directory listing plugin - RobA - 2011-11-02 mvlcek Wrote:Looks great! Thanks! Regarding the KiB vs. KB, that is a IEC vs. SI issue. My understanding KB is the accepted comon binary SI abbreviation for 2^10 Bytes (as opposed to kB which would be 10^3 Bytes) and most folks don't know what KiB means. But I appreciate your passion for correctness! -Rob A> SimpleDir - Directory listing plugin - mvlcek - 2011-11-02 RobA Wrote:mvlcek Wrote:Looks great! It's the common IT abbreviation (JEDEC). I was looking at Total Commander and Gnome Commander, but I see that Explorer and Nautilus use K: Nautilus, Windows Explorer: KB Gnome Commander, Total Commander: kB (but it's probably 1024 B) So your use of KB is probably the best way ;-) SI decimal: 1 kB = 1000 B, MB, GB SI binary (IEC): 1 KiB = 1024 B, MiB, GiB JEDEC: 1 KB = 1024 B, MB, GB SimpleDir - Directory listing plugin - dondemaio - 2011-11-03 Rob, the plugin looks great as I see it on your website. I've resolved other issues I have with it but now it's giving me a permissions error. See http://beachsun.org/Lakes/documents/ Any ideas on what's causing this error? Thanks. Don SimpleDir - Directory listing plugin - RobA - 2011-11-03 dondemaio Wrote:Rob, the plugin looks great as I see it on your website. Looks like you have it now under http://beachsun.org/Lakes/docs/ ? You need to add some css to style the table?You directory structures seem odd as the document links don't work... do you want to PM/email me your directories in the setup so I can figure out what isn't working? -Rob A> SimpleDir - Directory listing plugin - RobA - 2011-11-06 Just added a version 0.2 that provides a config page (screen shot attached to the first post) to specify the base directory, its associated URL, and an extension exclusion list. -Rob A> SimpleDir - Directory listing plugin - RobA - 2011-11-06 RobA Wrote:dondemaio Wrote:Rob, the plugin looks great as I see it on your website. The updated version should lets you specify the directory file path and url path separately, so upgrade to 0.2 and it should work on your page. -Rob A> SimpleDir - Directory listing plugin - shawn_a - 2011-12-09 Great Plugin! Suggestions. Support for htaccess style directory headers and descriptions. This would be in a file similar to a .htaccess file. This is the .htaccess syntax for index directories listings, 1 per line Code: AddDescription "DESCRIPTION TEXT" filename.ext And this is to include a header html file Code: HeaderName header.html Then one of these "dir config" files per folder and you have the same functionality as apache dir indexs, but in getsimple. (except sorting) But sorting can be added with jquery datatables or something similar, and isn't a big deal. USER TIP: dont forget the last / in the full path, you will get filesize and filetime errors. ugh. SimpleDir - Directory listing plugin - RobA - 2011-12-09 I wasn't familiar with that, thanks for the reference! mod_autoindex has dozens of options though - it would be a real headache to support all of those...no time right now -Rob A> SimpleDir - Directory listing plugin - shawn_a - 2011-12-10 It sure does, but most aren't very necessary when you have styling, and many are just icon and sorting related. Ill probably be adding descriptions and header support to my install, so I thought I would post it as a suggestion. Its probably all most people would need. SimpleDir - Directory listing plugin - RobA - 2011-12-10 shawn_a Wrote:It sure does, but most aren't very necessary when you have styling, and many are just icon and sorting related. I haven't played with this on Apache, so let me know if I have this right... Code: HeaderName header.html Code: AddDescription "DESCRIPTION TEXT" filename.ext the docs state the match can be "a file extension, partial filename, wild-card expression or full filename" - would that flexability be worthwhile? I'm thinking I could have a set of canned descriptions for just the extensions (like I already can the icons) like this list I found online: Code: AddDescription "MPEG Layer 3 Format" .mp3 and then only do filename matches that would override these canned ones only when there is an AddDescription line that matches the filename... Thoughts? (I'm also doing to add an alt [SND] style of label to the icons, which aren't done right now...) -Rob A> SimpleDir - Directory listing plugin - shawn_a - 2011-12-13 Oh I was just thinking straight full filename.ext match, so you don't have to use any pattern matching. My goal was to just not have to have my files that look like this Thisiswhatthisfileisjustsoyouknow.pdf But your idea sounds pretty good too. SimpleDir - Directory listing plugin - shawn_a - 2012-06-06 I randomly found this also in the php.net docs for str_getcsv Code: xoneca at gmail dot com 26-Nov-2011 09:26 These 2 features would be awesome, header and description support. Also it would be nice if this plugin supported function calls with folder, so it can be used multiple times as a component or a inline shortcode. SimpleDir - Directory listing plugin - maxpop - 2012-08-21 hi. im getting this: Unable to open the folder /home/user/data/uploads/, check the folder privileges. Cant see the files . Solution? SimpleDir - Directory listing plugin - RobA - 2012-08-23 maxpop Wrote:hi. Like the message states, check the privileges of /home/user/data/uploads/ to make sure they are read/writable by the webserver account. -Rob A> SimpleDir - Directory listing plugin - chaos - 2012-09-15 Thanks for this very useful plugin! I however have a couple of questions: 1 - Is it possible for 2 different directory listings to feature on 2 different pages - i.e. on the "Application Forms" page there would be a list of .pdf & .jpg files for download. On the "Education" page there would be .pdf files? 2 - Would it be possible to have an extra column that shows how many times a file has been downloaded? Thanks in advance. SimpleDir - Directory listing plugin - RobA - 2012-09-17 chaos Wrote:Thanks for this very useful plugin! I however have a couple of questions: These features do not exist in the current version. Rob A> RE: SimpleDir - Directory listing plugin - kwc1963 - 2013-01-23 Hello Rob...great Plugin. I believe I have been able to solve the multiple list problem by renaming the simpledir plugin to a name of my choice, works great! But I do have one question, I cannot get subdirectory listings from the plugin when run. I am using getsimple on XAMPP. Could this be an issue? I'm stumped, any suggestions as to why no subdirectory listings? Thanks! kwc RE: SimpleDir - Directory listing plugin - kwc1963 - 2013-01-24 Rob- Another note I failed to mention earlier...I see the demo page works correctly...That's how I would like it to operate, but, no subdirectories! Any suggestions? Ideas? Thanks! kwc RE: SimpleDir - Directory listing plugin - RobA - 2013-01-25 It was pointed out there was a directory traversal vulnerability in this plugin - I have updated the code to deal with this. Please update to version 0.3 @kwc1963 - I have no idea why this does not work on an XAMPP server. What OS? -Rob A> RE: SimpleDir - Directory listing plugin - shawn_a - 2013-01-25 maybe is_dir is not working as expected. Is this on windows ? What version of php ? RE: SimpleDir - Directory listing plugin - kwc1963 - 2013-01-25 Thanks shawn...more food for thought...windows 7...php ver. 5.4.7 RE: SimpleDir - Directory listing plugin - teazmo - 2013-08-02 (2012-08-23, 03:35:45)RobA Wrote:maxpop Wrote:hi. I have checked all the privileges and they are okay, but it still says "Unable to open folder". Could you explain in detail what do I have to type in the field »Full Server Path to Directory« and what exactly in »Base URL for Directory« ? Thanks |