Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
SimpleDir - Directory listing plugin
#42
(2016-04-17, 21:40:15)lokothodida Wrote:
(2016-04-16, 18:45:42)DesruX Wrote:
(2016-04-16, 05:52:57)lokothodida Wrote: The current beta addresses a) and b). c) seems like it should be implemented with Javascript, but have the option controlled server-side.

datiswous is also right about Client Files.

Thanks this is really usefull!! I have implemented the beta and it have not found any issues. I think you are right regarding c) . The setting could be controlled like a) and b) e.g.
(% simpledir key="subdir1" dirpath="somepath" urlpath="somepath" columns="name" order="-name" showinitial="5" %)
I will take a look at some jquery, must be something similar exsiting already that could be used.

Current beta now implements this with pagination from DataTables. There are now options for client-side filtering of results (and how many results to show per page), and sorting by clicking on the column.

I think the added features are sufficient for a v0.4 draft. If it is stable, I will publish it as a release.


Thanks for the update! I got some strange "-->" just before my head tag with the new update, but If I uncomment "queue_script('jquery', GSFRONT);" line 37 in simpledir.php then it goes away. Does not seem to break anything leaving it out.

Code:
queue_style('jquery-datatables', GSFRONT);
//queue_script('jquery', GSFRONT);
queue_script('jquery-datatables', GSFRONT);


I have been thinking a bit about the functionality. Let me describe my usecase, example:

Lets say I have 4 folders with different files, something like in each folder: 
001_somefile
002_someotherfile
...files 003 to 079
080_alsoafile
081_latestfile

For each folder I have a page that displays the content of the folder, saying something like:
"Here are the relevant file, newest on top:"
081_latestfile
080_alsoafile
...files 003 to 079
002_someotherfile
001_somefile


For this I use the new features to sort and only have the name column, which works very also on phones:
(% simpledir key="subdir1" dirpath="somedir/folder1/" urlpath="somedir/folder1/" columns="name" order="-name" %)

What I would now like to have is an overview page that just shows me the 3 newest files from each folder and a link to page with the full file list, so something like:
"Here are the most recent files from folder1"
081_latestfile
080_alsoafile
079_thirdnewestfile

"See all files here" (link to my other page, just put manually in the page)

Regarding implementation I am thinking of a "showonly="3" parameter that only shows the 3 first files based on a given sort e.g:
(% simpledir key="subdir1" dirpath="somedir/folder1/" urlpath="somedir/folder1/" columns="name" order="-name" showonly="3" %)


Let me know what you think Blush
Reply


Messages In This Thread
SimpleDir - Directory listing plugin - by RobA - 2011-11-02, 01:37:02
RE: SimpleDir - Directory listing plugin - by DesruX - 2016-05-23, 06:50:34
SimpleDir - Directory listing plugin - by jyoz22 - 2011-11-02, 03:42:34
SimpleDir - Directory listing plugin - by mvlcek - 2011-11-02, 04:06:50
SimpleDir - Directory listing plugin - by RobA - 2011-11-02, 05:04:27
SimpleDir - Directory listing plugin - by mvlcek - 2011-11-02, 05:47:53
SimpleDir - Directory listing plugin - by RobA - 2011-11-03, 03:55:45
SimpleDir - Directory listing plugin - by RobA - 2011-11-06, 07:35:47
SimpleDir - Directory listing plugin - by RobA - 2011-11-06, 07:37:52
SimpleDir - Directory listing plugin - by shawn_a - 2011-12-09, 07:44:51
SimpleDir - Directory listing plugin - by RobA - 2011-12-09, 09:22:33
SimpleDir - Directory listing plugin - by shawn_a - 2011-12-10, 01:01:54
SimpleDir - Directory listing plugin - by RobA - 2011-12-10, 04:49:42
SimpleDir - Directory listing plugin - by shawn_a - 2011-12-13, 03:54:57
SimpleDir - Directory listing plugin - by shawn_a - 2012-06-06, 04:17:01
SimpleDir - Directory listing plugin - by maxpop - 2012-08-21, 04:24:56
SimpleDir - Directory listing plugin - by RobA - 2012-08-23, 03:35:45
SimpleDir - Directory listing plugin - by chaos - 2012-09-15, 17:12:46
SimpleDir - Directory listing plugin - by RobA - 2012-09-17, 01:19:26



Users browsing this thread: 2 Guest(s)