Coder Social home page Coder Social logo

idleberg / bootstrap-listr Goto Github PK

View Code? Open in Web Editor NEW
221.0 23.0 46.0 1.96 MB

Beautiful, responsive directory listings built upon Bootstrap

License: MIT License

PHP 49.96% JavaScript 35.96% Dockerfile 1.02% SCSS 13.06%
viewer file-viewer directoryindex

bootstrap-listr's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

bootstrap-listr's Issues

Gulp error in the command line

I am using the Bootstrap-List to style directory search, but when I use "gulp" comes this error using the same I as an administrator prompt

[22:06:04] Using gulpfile C:\Git\Bootstrap-Listr\gulpfile.js
[22:06:04] Starting 'build_hjs'...
events.js:85
throw er; // Unhandled 'error' event
^
Error: spawn npm ENOENT
at exports._errnoException (util.js:746:11)
at Process.ChildProcess._handle.onexit (child_process.js:1053:32)
at child_process.js:1144:20
at process._tickCallback (node.js:355:11)
at Function.Module.runMain (module.js:503:11)
at startup (node.js:129:16)
at node.js:814:3

Set cutom_title to basename

Hey,

When specifying a page title, overriding the default Index of (URL) can it possible to set it to

basename keyword

I mean the following

Index of example.com/A/B/C --> C keyword
Index of example.com/1/2/3 --> 3 keyword

Thanks!

Possible XSS vulnerability

Hi,

I found a possible xss vulnerability (no significant impact, though).

Try to create a folder with this name:
eoo"onmouseover="alert(1)

Refresh the browser and you should get an alert when you hover your mouse over the folder link.

Best regards,

Q: benefits in explicit server name for local assets?

I was wondering if there are any benefits in generating asset refs containing protocol/host when assets are local. In other words if this:

  <link rel="stylesheet" href="http://localhost/listr/assets/css/font-awesome.min.css" />

...is better than this:

  <link rel="stylesheet" href="/listr/assets/css/font-awesome.min.css" />

The reason I ask is that I'm testing Listr on an appliance which will be accessed via IP. As it is, admins at a deployment site would have to set the appliance's IP in nginx config so that nginx could report it to PHP's SERVER_NAME correctly. If host/protocol were ignored for refs to local assets, no special configuration would be needed.

Sharing Any

Would it be possible to add the sharing drop down to the file list, so large binary files could also be shared?

Add screenshot instead of a demo only

Hi,

The demo is crashed
Fatal error: Call to undefined function is_error() in /kunden/whyeye.org/webseiten/idleberg.com/demo/Bootstrap-Listr-2/listr-template.php on line 8

You should add screenshot instead of relying on demo only that can crash.

Problem with locate

In the last version not work the parameter locate. Thanks
Sorry for my bad English.

.swf Video Support

Currently, the in-built viewer can play the audio from SWF files, but cannot show the video. Are there any plans to add .swf file support for the in-built viewer? Thanks for your time.

Show only a folder/file

Easy to fix that. just ...

  • Find $table_body = null; (line:617)
  • Move it before if($folder_list): (line:615)

Example :

// Set table body
if(($folder_list) || ($file_list) ) {
    $table_body = null;
    if($folder_list):    
        foreach($folder_list as $item) :
            $table_body = $table_body."          " . PHP_EOL;

Additional Info Columns

It would be cool if there will be additional configurable column with displaying length for audio files
and WxH dimensions for pictures

Resuming download is not possible

When I use the default Apache "Index of" functionality to browse file, I can resume file downloaded with wget (using -c). I can't and it seems related to Apache (.htaccess?).
This should also affect streaming of big videos.

Place Search Bar on breadcrumb_style menu

Hey there,

I am very interested in placing search bar on breadcrumb_style menu to save space and make the design more robust. How can I do this painlessly?

screen shot 2015-12-14 at 12 57 14

Thanks a lot!

404 problem

So I have index.php at https://domain.com/dl/

and the uploaded files here

https://domain.com/dl/_public

.htaccess below

Bootstrap Listr

RewriteEngine On
RewriteBase _public/
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule ^(.+)$ index.php?path=$1 [QSA,L,B]

But its still not working. Not great at the apache stuff. The links being made are like this:

https://domain.com/dl/test.png

when it should be

https://domain.com/dl/_public/test.png

best regards

Latest version producing blank pages

Greetings, previous version was great! I noticed that the software was updated recently and updated and am unable to get a directory listing out of the program.

I also removed a few undefined constant errors in your define statements, my server complained about stuff like this:
define(RESPONSIVE_TABLE, true);

I changed them to:
define('RESPONSIVE_TABLE', true);

Warnings went away...

Didn't spend more time to figure out exactly what was failing, but here is my phpinfo() (maybe its old?)

http://noxgeo.noip.me/test/phpinfo.php

Removing a column! 2.3.0 Alpha-4

Greetings! @idleberg

I am using your plugin bootstrap listr v2.3 alpha1.
I wanted to know if I can remove a column from the Listr.
I don't want the Sr no (#) Column. Can I remove it?

Your help will be really appreciated.
Thanks!

invalid html

On your demo server I see this output. Note that the class= part is missing from the first <th>.

      <tr>
        <th "col-lg-8 text-right" data-sort="string"><span class="glyphicon glyphicon-sort"></span>&nbsp;Name</th>
        <th class="col-lg-2 text-right" data-sort="int">Size</th>
        <th class="col-lg-2 text-right" data-sort="int">Modified</th>
      </tr>

Issue With Bootswatch Themes

Any time I choose a theme other than Default during setup, it fails at this point:

Running setup…
[17:40:37] Starting 'clean'...
[17:40:37] Finished 'clean' after 1.76 ms
[17:40:37] Starting 'init'...
[17:40:37] Finished 'init' after 32 ms
[17:40:37] Starting 'setup'...
[17:40:37] Starting 'depends'...
[?] Choose how to load app dependencies: From your server
[17:40:38] Finished 'depends' after 1.02 s
[17:40:38] Starting 'swatch'...
[?] Choose a Bootstrap theme: Cosmo
Compiling Bootswatch theme “Cosmo”…
[17:40:40] Finished 'swatch' after 2.13 s
[17:40:40] Starting 'bootswatch'...
[17:40:40] Finished 'bootswatch' after 6.09 μs
[17:40:40] Starting 'select'...
[?] Which features would you like to use? (Press <space> to select)
‣⬢ Viewer Modal
 ⬢ Search Box
 ⬢ Syntax Highlighter
 ⬢ Font Awesome
 ⬢ H5BP Apache Server Config
 ⬢ robots.txt
 ⬡ DEBUG: Bootlint
 ⬡ DEBUG: jQuery Source Map
/home/user/domains/domain.com/Bootstrap-Listr/node_modules/gulp-less/node_modules/accord/node_modules/when/lib/decorators/unhandledRejection.js:80
        throw e;
              ^
Error: 'mixins/grid.less' wasn't found.

Folders are not listed

Is there some setting to list the directories? In a subfolder on my server I have about 20 folders and about 10 files, the script only displays a folder.

Demo link not working

Hi, the demo link is not working
Fatal error: Call to undefined function is_error() in /kunden/whyeye.org/webseiten/idleberg.com/demo/Bootstrap-Listr-2/listr-template.php on line 8

.txt files

would it be possible to display the content of a textfile in the body?

Issue With max_execution_time

There may be no way around this, and I'm not familiar enough with PHP applications to suggest anything different, but I'm running into an issue where if a download takes more than X seconds, the download is canceled on the user's end. This causes a problem when trying to serve large files, or when someone on a slower internet connection is attempting to download.

The reason for this looks to be due to my server's max_execution_time setting. I have it set to the default PHP configuration of 30 seconds. This has in the past served me well and I haven't ran into any issues with other PHP applications. But basically if someone is downloading a file and it takes longer than 30 seconds, this is produced in the Apache logs:

[Sat Apr 16 12:22:45.663949 2016] [:error] [pid 1957] [client x.x.x.x:x] PHP Fatal error:  Maximum execution time of 30 seconds exceeded in /var/www/listr-functions.php on line 296...

The line 296 seems to refer to a bit of code dealing with the readfile_chunked snippet. Which I do have read_chunks set to true in the config.json. It was the only way I could serve large files.

I could increase my server's PHP execution time, but I'm thinking there must be some other way around this considering the variables that come into play such as the file size and user's connection which you never know how long a download is going to take.

Let me know if I can provide any other information.

Version 1.2.2: Doesn't display all folders

In version 1.2.2 and a couple earlier releases have a bug,
It only displays the last folder and only displays folders whose names are in lower case.
I find this annoying, since i have many folder and many of them have Caps in them.

Wrong path in links.

Hey there,
When I run the app from the app folder, the links are wrong (they are missing the _public/ subfolder part of the url).
What am I doing wrong?
listr
See here at the bottom ^
It should read localhost/~jakob/page/Bootstrap-Listr/app/_public/testing/

My config.json is unchanged and reads

"general": {
    "root_dir": "./_public/",
    [etc]

Usage

How do I use this ? I can't find instructions.

Change the function of "Open" button.

Hi there @idleberg @camilstaps @mohdaminyuddin @sboulema

I don't know if its possible or not but It will be really helpful to me if you guys can tell me just one thing.
I have 2 concerns solving either one of them will work for me.

  1. Can I somehow make this plugin open files in a new tab or window. There won't be any folders in my listings just pdf or doc files will be there. I want that if a person clicks on any file that file should open in a new tab. (I have disabled the viewer already) and I want it to be the default function of click/tap. Right clicking and forcefully opening it in a new tab is not what I want.

  2. When the file viewer opens. It shows 2 buttons at the end. "Open" "Close" can I somehow change the code or modify the code for the "Open" button so that when the person clicks or taps open that file should open in a new tab or window. Maybe I can add something like "target=_blank" or anything.

I really need this work and by far your plugin was the best directory lister I found on the internet.
Please help me. I would be very thankful to all of you.

Thanks.

Bootstrap 2.24 PLEASE HELP.

Hello @idleberg.
Can you please tell me how can I change the background color of this plugin?
Can I change icons? If so how to change .pdf icon?
How can I edit the footer so I can add my website's "Back to Home" link?
And can i display a "parent directory button" inside sub folders?

Please help me anyone!!!

Thanks in advance.

How to open files in another tab.

Hi @idleberg
I wanted to know if there is anyway I can make the PDF files open in another tab.
For example I browse through the lister from folder to folders etc.
Then whenever I open a PDF file or any sort of "File" not folder, It should open that thing in a new tab.

Is it possible?
Please let me know.
Thanks

Breadcrumbs links loop if path contains special chars like ():&

Hello,

Breadcrumbs links seem to be looping if path contains special chars like ():& (and maybe some others)

Steps to reproduce:

  1. Create paths like /1/:2/ /1/(2)/.
  2. Directly access via web browser URI`s:

http://bootstrap-listr.com/1/:2/
http://bootstrap-listr.com/1/(2)/

  1. Click on any breadcrumbs path links, but home. This should loop over and append link to trailing slash, so we get 404 URL`s:

http://bootstrap-listr.com/1/:2/1/
http://bootstrap-listr.com/1/(2)/1/

or

http://bootstrap-listr.com/1/:2/:2/
http://bootstrap-listr.com/1/(2)/(2)/

I'm suspecting URL encoding/decoding issue. If we try to replace special chars with ( - %28 ) - %29 : - %3A, everything working nicely. Also, there are no issues with UTF chars like Ł Ö 정 ᴷ ど 〆 み 無 藤.

Thanks!

Time Ago vs Time Stamp

Is there a way you could implement a toggle in the config file to change the "Modified" column to show the actual date / time it was modified, as opposed to the "time ago"? And if not, would you be able to tell me how I could manually do it myself? Thanks for this!

Parsedown not copied

It seems that the copy:php-parsedown task is missing in the default copy task.

Disallow download certain file types

Hey there!

Thanks for the awesome job you guys done!

I am interested in disallowing certain file types download. But still showing up those files via Listr. Viewer can pop up while clicked on such files, but with configurable information, why this type of file disallowed from previewing / downloading.

For now, I will be fine with graying out all of the files temporary, but still allow directory browsing. It would be awesome if you can give me quick advice on what part of code i should comment out to achieve that Thanks you so much!

Time Zone

After applying the changes mentioned here #225 (time stamp vs time ago), it changed what I needed to change - however the time zone appears to be off. It looks like it may be GMT. I'm looking to set the time zone to EST/EDT, or 'America/New_York'. Where exactly is the time zone handled for this application?

I've checked my php.ini and verified the correct time zone is set, as well as all my other PHP applications report the correct zone:

date/time support => enabled
"Olson" Timezone Database Version => 2015.5
Timezone Database => internal
Default timezone => America/New_York

Directive => Local Value => Master Value
date.default_latitude => 31.7667 => 31.7667
date.default_longitude => 35.2333 => 35.2333
date.sunrise_zenith => 90.583333 => 90.583333
date.sunset_zenith => 90.583333 => 90.583333
date.timezone => America/New_York => America/New_York

My server time is also set to America/New_York

[root@box ~]# date
Fri Apr 15 18:15:42 EDT 2016

A little help with "Preview" of PDFs.

@idleberg

Hey there, I was wondering if there is any method through which I can stop the "Preview" of .pdf or any file.

Whenever I Click on the files it shows a pop-up box showing a small preview of the file and gives options of "Close" or "Open"
I want it to be directly opened in a newtab. i.e:

When i click on the file "SomeDocument.pdf" it opens in a new window/tab.

Can you please help me with this?
Thanks.

compiled files

Should there be a dist folder with the compiled assets for a quick setup?

[Suggestion] Remove file

Hi!

I've just thought that it would be convenient to have a delete file option.
It might have just been an additional optional column with a simple trash-can-like icon 😉

As for future enhancements, how about an option to select & delete multiple files at once?

Great piece of code btw 😉 lightweight, yet really useful and all-purpose.

Thanks and keep it up!

Folders with lots of objects loading significant time

Hi,

When a folder contains lots of objects it takes significant time to load. I've tested with few thousands elements and it loads almost forever. Would it be possible to speed things up somehow or maybe load the big amount of elements in batches?

Thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.