Cute File Browser with jQuery and PHP

Hi, I noticed that the discussion on this topic has been closed, but I needed some help as I'm quite new to all this.

The code works as it should and is fine for short file names, I've got long names which I'd like to display somehow. It also displays it as 4 files on 1 line in the grid. If possible I'd like to display as a list rather than a grid and thus allow space for the full file name.

Any Ideas how I would do this? Would it be in the php code or the JQuery?

Thanks in advance,

Comments 3

  • Hello @Harvi007,

    You can attach a link to your code or post the snippet you have so far so users here to be able to help you. Displaying 4 files as a list seems to be pretty easy. You have to loop those 4 files and print an html list passing current file name to the current list item node. What is the problem with the long file names?

  • Hi again,

    If your question were related to the following demo: https://demo.tutorialzine.com/2014/09/cute-file-browser-jquery-ajax-php/#files%2FMusic

    You have to edit the JQuery code.
    You just have to edit "scannedFiles.forEach" part of the code and edit how the html for a given file/folder is appended to the list of scanned items. Keep in mind that currently the html structure is using a list so may be editing the styles could fix your problem for long files.

  • Hi Nikolay,

    Thanks for the reply, editing the css file did the trick.