Elxis CMS Forum

Support => General => Topic started by: jimmyz on January 10, 2017, 19:05:10

Title: Directory listing in Elxis articles
Post by: jimmyz on January 10, 2017, 19:05:10
Hello to all,
have a nice and creative new year 2017!

I could definately use some of help here, is it possible to list the raw contents of a folder from within an article? Like apache's mod_autoindex?

Thanks in advance.
Title: Re: Directory listing in Elxis articles
Post by: datahell on January 11, 2017, 08:22:47
If you want to list a category's articles you can use the Category map (https://www.elxis.net/edc/content/19.html) module.
If you want to list the files within a folder you can use the "listFiles" method of the Elxis Files library.

eFactory->getFiles()->listFiles('relative/path/to/folder/');

To display them you must create a special plugin or module.
Title: Re: Directory listing in Elxis articles
Post by: jimmyz on January 11, 2017, 17:02:46
Hi,
I want to list the files within a folder.
I really have no idea on how to implement this one.
I made a new mod_content module with the module text «eFactory->getFiles()->listFiles('components/com_content/plugins/download/files/');»,  with/without code brackets, but all I gained is to display this text in all relative menu items.
(http://2.bp.blogspot.com/-c-b1jEdBcTQ/T58j7CELemI/AAAAAAAAACs/ExAuo23P3b0/s1600/bho.jpg)

I'll give a shot to the plugin case.
Title: Re: Directory listing in Elxis articles
Post by: datahell on January 11, 2017, 20:38:27
No, you have to develop a new module or plugin for that. You can't write php code in editor window.
Title: Re: Directory listing in Elxis articles
Post by: jimmyz on January 11, 2017, 20:49:39
I'm afraid I'm not the one.
I don't have the knowledge.
If anybody of the coders ever make the effort, it would be good for the community.

Thank you, datangel.  :)
Title: Re: Directory listing in Elxis articles
Post by: datahell on January 11, 2017, 21:06:22
I can develop this for you when I find some free time. Tell me which one you prefer: a module or a plugin? I believe a plugin is better for that purpose. Also tell me this: you want to be able to browse the file system? For which purpose/usage you want it?

Note: This functionality may contain high risk for your site. I would not suggest you to use something like that. This is why it is important to tell me why you want it.
Title: Re: Directory listing in Elxis articles
Post by: jimmyz on January 11, 2017, 21:35:20
People (co-operatives), need frequently some files, most of the cases firmware files, when they are in customer's place, away from the office/work place. These firmware files get updated before you know it and so, just by logging in the company's site, they should be able to download the newest versions.
That's all.


For now I use www.directorylister.com independently from elxis (by using an ungessable url). Is it possible to wrap it in an article of elxis, so the logged user can see it easily?


-module or a plugin?   -Thant's not a question for me to answer.
-Recursively of course. (Models - Submodels - old versions - new tested - new untested)
-No upload needed for this case. Maybe for use by others, as well as a downloads counter.