Search…

X3 Photo Gallery Support Forums

Search…
 
User avatar
mjau-mjau
X3 Wizard
Topic Author
Posts: 12195
Joined: 30 Sep 2006, 03:37

Files App 0.1.0 :green_apple:

17 Apr 2020, 09:48

Files App 0.1.0 :green_apple:
First Files App update since initial release one month ago!
  • External config  _files/config/config.php
    With new updates coming frequently, I have added support for external config so that you can update Files app without overwriting your custom settings. Now, when you run Files app for the first time, it will automatically generate an empty config file _files/config/config.php. Simply open the file and edit options. Your custom configuration will now remain persistent after updating. READ MORE:
    Files app configuration
  • Config viewer
    With external configs merged with default config, I have added a config viewer to allow debugging of config [screenshot]. Simply add ?config parameter to your Files app URL. See example:
    files.photo.gallery/demo/index.php?config
  • Improved browser compatibility
    Improved backwards browser compatibility with Intersection observer polyfill. Especially older iOS devices.
  • Support for custom JS and CSS stylesheets
    Simply drop any custom CSS file into storage_path _files/css/*, and the file will be included as a stylesheet. Can be used to customize colors and style of the Files app. You can also drop custom Javascript files into _files/js/*, but that has no function as of yet.
  • Tasks plugin * Undocumented
    This plugin allows pre-creating all cache (menu, folders and images), clearing all cache and more. There is a new config option allow_tasks, which decides if tasks can be executed. This plugin will be integrated better into Files app at a later date.
  • Bugs squashed
    • Fixed incorrect menu sort order when directory names are numbers [forum]
    • Fixed bug with cut off HTML tags when loading PHP and Html code into the code editor.
    • Fixed so that storage_path (default "_files") is always excluded.
    • Fixed so that URL #deeplinks also work when index.php is exported to index.html.
    • ++ Many code improvements
How to update?
Simply update directly from the "bell" icon top right of Files app or download latest index.php here. PS! I am curious if any of you have managed to update directly from within the application?


--

Website
files.photo.gallery

Demo
files.photo.gallery/demo/
 
tyee
Posts: 4
Joined: 29 Dec 2014, 20:32

Re: Files App 0.1.0 :green_apple:

24 Apr 2020, 01:12

I have X3 but just ran across this via google searching for a one file app, very nice! I just installed to test it locally and I get "Error: Invalid directory /Dec 18 - Fleming - Millstream" on my test galleries. GD2 and mbstring are enabled. I'm using Laragon server locally. Also I have no green bell in the top right corner!

I just looked at the page source and this is what I get -
"Dec 18 - Fleming - Millstream": {
                   "basename": "Dec 18 - Fleming - Millstream",
                   "fileperms": "0777",
                   "filetype": "dir",
                   "filesize": false,
                   "is_writeable": true,
                   "mime": "directory",
                   "mtime": 1576715743,
                   "path": "\/Dec 18 - Fleming - Millstream"

Could that path be the problem? Backslash then forward slash?? I am on Windows7.

Update - I uploaded the script to my webspace and it works fine but I'm noticing locally my url's are like this -

http://localhost/?/Dec 18 - Fleming - Millstream

but I think it should be this -

http://localhost/?Dec 18 - Fleming - Millstream
 
User avatar
mjau-mjau
X3 Wizard
Topic Author
Posts: 12195
Joined: 30 Sep 2006, 03:37

Re: Files App 0.1.0 :green_apple:

24 Apr 2020, 03:00

tyee wrote:I just installed to test it locally and I get "Error: Invalid directory /Dec 18 - Fleming - Millstream" on my test galleries. GD2 and mbstring are enabled. I'm using Laragon server locally.
I guess you don't have a public link to share, since it is local server? I need some more info:

Are you using latest Files app version 0.1.0?
Is it Windows IIS? Or Apache on Windows? Or are you using WAMP?
tyee wrote:Also I have no green bell in the top right corner!
Not important. It just means your server is now allowed to request external url's.
tyee wrote:I just looked at the page source and this is what I get -
"Dec 18 - Fleming - Millstream": {
                   "basename": "Dec 18 - Fleming - Millstream",
                   "fileperms": "0777",
                   "filetype": "dir",
                   "filesize": false,
                   "is_writeable": true,
                   "mime": "directory",
                   "mtime": 1576715743,
                   "path": "\/Dec 18 - Fleming - Millstream"
Backwards slash in JSON format just means it's escaping characters. It could be slash-related though, as Windows IIS servers use \ backwards slash.
tyee wrote:Update - I uploaded the script to my webspace and it works fine but I'm noticing locally my url's are like this -
http://localhost/?/Dec 18 - Fleming - Millstream
Yes it should probably be ?Dec and not ?/Dec. This is not the root cause though, but a side-effect.

So it works fine on your webspace, but not in your local Windows? Files app has not been tried and tested on non-Apache Windows servers yet ... I would need to diagnose it properly.
 
tyee
Posts: 4
Joined: 29 Dec 2014, 20:32

Re: Files App 0.1.0 :green_apple:

24 Apr 2020, 11:25

Yes I'm using the latest download, Laragon is Apache on Windows server. Anything more I can help with?
 
User avatar
mjau-mjau
X3 Wizard
Topic Author
Posts: 12195
Joined: 30 Sep 2006, 03:37

Re: Files App 0.1.0 :green_apple:

24 Apr 2020, 20:54

tyee wrote:Yes I'm using the latest download,  Laragon is Apache on Windows server. Anything more I can help with?
If this is a local server, I can't diagnose further right now. In a few weeks time, I will test Files app properly on a Windows server, and likely have it fixed  :thumbsup:
 
tyee
Posts: 4
Joined: 29 Dec 2014, 20:32

Re: Files App 0.1.0 :green_apple:

24 Apr 2020, 22:42

Sorry, I guess I mis-stated - Laragon is an Apache Server which I'm running in Windows7.
 
User avatar
mjau-mjau
X3 Wizard
Topic Author
Posts: 12195
Joined: 30 Sep 2006, 03:37

Re: Files App 0.1.0 :green_apple:

25 Apr 2020, 08:10

tyee wrote: Sorry, I guess I mis-stated - Laragon is an Apache Server which I'm running in Windows7.
Yep, I got that. I checked the Laragon link, and might install it in a couple of weeks (when I have time) and try Files app on it.
 
trpgforum
Experienced
Posts: 33
Joined: 05 Jul 2019, 03:40

Re: Files App 0.1.0 :green_apple:

29 Apr 2020, 05:07

Hello Karl

With great enthusiasm I tested the ingenious Files App 0.1.0. The only thing that's missing is a simple upload function. As soon as this is available, one could
  • Exchange photos with customers in an ingeniously simple way
  • a team of photographers work together and upload and download easily all pictures with the browser alone
  • etc
  • etc.
Of course it would be perfect if it could be easily controlled whether
  1.  the download function
  2. the upload function
  3. none
is available in the directory tree in which the index.php is located above. Indeed that would be absolutely fantastic and is really so much easier than FTP! Is there any idea when a simple upload function could be available? My enthusiasm does not allow me not to ask that, even though I think it is unfriendly to push too hard ;-)

Finally, a second important question: How secure is a directory if I secure it in the index.php file with a login and password?

So that's it for now. I am waiting with great interest and congratulations on this great idea and work!

Best regards
THOMAS RUF PHOTOGRAPHY
Landscape - Nature - Macro
4132 Muttenz
Switzerland
www.thomas-ruf.ch
 
User avatar
mjau-mjau
X3 Wizard
Topic Author
Posts: 12195
Joined: 30 Sep 2006, 03:37

Re: Files App 0.1.0 :green_apple:

29 Apr 2020, 05:53

Your enthusiasm is appreciated! I plan to extend Files app with loads of functionality.
trpgforum wrote:With great enthusiasm I tested the ingenious Files App 0.1.0. The only thing that's missing is a simple upload function.
Certainly. This is next step, as I want Files app to have full file-manager capabilities. It needs to be implemented with emphasis on security, and I can't enable it by default. Also might need a user-system in place first, as you may want upload permissions only for logged in users (or some logged in users), and you might want to restrict upload directory for some users.
trpgforum wrote:[*]Exchange photos with customers in an ingeniously simple way
[*]a team of photographers work together and upload and download easily all pictures with the browser alone
Indeed!
trpgforum wrote:Of course it would be perfect if it could be easily controlled whether
[*] the download function
[*]the upload function
is available in the directory tree in which the index.php is located above.
Agreed.
trpgforum wrote:Is there any idea when a simple upload function could be available?
Right now I'm working on an X3 update. In a few weeks, I will start another Files app update, and might add basic file-manager behavior already then. The idea is to eventually extend Files app into new X3 panel 2.0, although it will still exist as a separate app.
trpgforum wrote:Finally, a second important question: How secure is a directory if I secure it in the index.php file with a login and password?
It's very secure. Can't say much more about that. Keep in mind, Files app only protects itself (which means access to view the files in dir and soon upload/manage files). Files app can't secure the contents of your dir accessed outside of the app. For example if you have a file /dir/somefile.jpg, Files app can't protect that file. Of course, if nobody knows the URL, they can't load it either, but Files app doesn't explicitly secure your files. If you are paranoid about file-access, you can set ROOT dir to a folder on server that is not within your public www path, and Files app can act as a proxy, on login.

Security through obscurity
Personally, I like to use "security through obscurity", which is a very effective layer of security. For example, you can rename Files app "index.php" to "something-only-you-know.php". Who will know it exists? Optionally, you can create a secret subdirectory /myfilesapp-xy/, place index.php inside and set ROOT to "../". Only those who know the URL will have access.
 
trpgforum
Experienced
Posts: 33
Joined: 05 Jul 2019, 03:40

Re: Files App 0.1.0 :green_apple:

29 Apr 2020, 06:04

Hello Karl!

You answered everything! I'm excited! Good luck!

Best regards from Switzerland
THOMAS RUF PHOTOGRAPHY
Landscape - Nature - Macro
4132 Muttenz
Switzerland
www.thomas-ruf.ch
 
etienne
Posts: 3
Joined: 20 Apr 2020, 18:20

Re: Files App 0.1.0 :green_apple:

02 May 2020, 10:12

hey karl,

files app is something that answers a need i have for years and never found an appropriate solution for. files app does exactly what i need and it does it very elegantly! thanks a lot for this great piece of work – keep it going! i am very curious where it will take you (and us).

there is one use case i am wondering if files app could be used for it: showing images from a folder with files app WITHIN a webpage. sort of "headless files app". see my attached screenshot to get an idea. would be perfect to get all the functionality of files app while maintaining the branding and navigation of my site. as if it would run in an iframe ;-)

CleanShot-2020-05-02-at-14.53.45@2x.jpg
[email protected] (320.07 KiB) Viewed 2644 times

what do you think?

best from berlin, etienne
 
User avatar
mjau-mjau
X3 Wizard
Topic Author
Posts: 12195
Joined: 30 Sep 2006, 03:37

Re: Files App 0.1.0 :green_apple:

03 May 2020, 00:02

Hi Etienne. Thanks for your kind words about our new Files app!
etienne wrote:there is one use case i am wondering if files app could be used for it: showing images from a folder with files app WITHIN a webpage. sort of "headless files app". see my attached screenshot to get an idea. would be perfect to get all the functionality of files app while maintaining the branding and navigation of my site. as if it would run in an iframe ;-)
That's a very interesting question. It seems you want to include or "embed" a simple gallery system into an existing website, correct? Using Files app (for instance), without the menu and interface elements? And possibly even allowing clicking into subfolders?

Iframe
It's technically possible, but the thing I don't like about it, is that it would have to use <iframe>. The main problem with iframe, is that you have to set a fixed HEIGHT, and that means the gallery content will either overflow (creating an inner scrollbar), or there will be empty spaces at the bottom when content does not fill the iframe area. It might be possible to dynamically set the height of the iframe to match the content, but at best, that is a "hack". It is not logical to create a "pagination" system, just to fit the iframe area, which would vary across different screen sizes.

Inject
I do already have vague ideas about an "inject" method for Files app. Basically you would prepare a placeholder <div id="my-gallery"></div> in your page, and then Files app would inject itself into the existing DOM element. Since you are not using iframe, the content would then be part of the page and expand vertically as required, just like any other content on page. There are a few challenges with this, especially with styles (CSS), since your page CSS could affect the gallery and vice versa. Also, I would have to add that this is not the main purpose of Files app ... Optimally, it would have to be a "branch" of Files app.

Embed app
Which leads me to an idea I have had for a while, technically related to Files app. I believe the ultimate solution for you, would be to have an "embeddable" gallery app, specifically created to be embedded into an existing website. Am I right? It would work similarly to the "inject" method above, but the app would have only one goal: Create a gallery on page, from parameters.

Interestingly, half the "job" for this is already done in Files app, because it already produces the necessary folder data output and resizes images for such an app. Definitely on my TODO list, but I gotta see how I can juggle projects ...
 
etienne
Posts: 3
Joined: 20 Apr 2020, 18:20

Re: Files App 0.1.0 :green_apple:

03 May 2020, 11:11

hi karl, 

thanks for your reply and thoughts about this. you got me exactly right: an injection of code or an embeddable app would fit my needs (and those of many others i guess - because there are not many got solutions out there) perfectly. 

i did some tests with iframes and didnt like it either. besides using an somewhat "deprecated" technique wich feels odd you named the other limitations well.

an embeddable app would indeed be perfect as a broader solution, but for my limited purposes an injection of code would also do. CSS problems could easily be solved on my side.

would you be open to do a paid job to branch files app to make it fit for an injection? it would be nice if it could somehow still be updatable with new versions of files app. maybe doing all the dirty work in an extra php-file?

thanks, etienne 
 
User avatar
mjau-mjau
X3 Wizard
Topic Author
Posts: 12195
Joined: 30 Sep 2006, 03:37

Re: Files App 0.1.0 :green_apple:

03 May 2020, 21:41

etienne wrote:an embeddable app would indeed be perfect as a broader solution, but for my limited purposes an injection of code would also do. CSS problems could easily be solved on my side.
Just FYI, when I mentioned "embed" and "inject", I was generally speaking of the same thing ... a NON-iframe solution, which adds the gallery directly in your page html. This can be achieved in a couple of ways, but with "inject" I mean it would be done by Javascript "injecting" the gallery into an empty DOM element on the page. Which in turn would lead to the gallery being "embedded" in the page (as opposed to loaded as iframe).

My specific emphasis on "Embed app" is just because this was/is the initial idea for the name of such an app. Anyway, just a clutter of words really, in lack of anything else to meaningfully describe such an application that "embeds" a gallery into an existing website :wink:
etienne wrote:CSS problems could easily be solved on my side.
Shouldn't normally be a problem. When adding a gallery directly to page, I just need to prepare classes and ID's with names that won't overlap your website class names. For example prepending everything with embed-*. Also, there is a small chance your website's CSS could affect the gallery inadvertently, but nothing to worry about. Just a challenge for such an app.
etienne wrote:would you be open to do a paid job to branch files app to make it fit for an injection? it would be nice if it could somehow still be updatable with new versions of files app. maybe doing all the dirty work in an extra php-file?
Since Files app does half the job and since I wanted to do something like this for a while, then yes. I couldn't charge you much, since I would have to refund you if/when it becomes a public app, but can we say a token fee $75.00? It would use Files app index.php as the API, but Javascript and CSS would be unique and served separately.

For now, it would have to be simple. Basically just the "gallery" part of files app (demo), without any of the additional interface. When images are clicked, they will open in popup naturally.
 
etienne
Posts: 3
Joined: 20 Apr 2020, 18:20

Re: Files App 0.1.0 :green_apple:

04 May 2020, 17:22

hi karl,

thanks for your reply, proposal and uncluttering things a little bit. i think i got you right. 

i would be happy to make an agreement as proposed by you about building an app/tool that would inject the files app output into an existing html-page. i am happy to pay any expenses up to 250$, you would be free to distribute the solution as you wish. i am just paying for getting the solution in the upcoming weeks instead of later when you own roadmap would have brought it up.

if the solution could offer the possibility to opt for a) the topbar with search/layout/sort and b) the breadcrump that would be great - but no must.

one more thing: i am working a lot with CRAFT CMS and plan to integrate this solution into pages i build and manage with it. that could easily be done by adding a content element with just the DIV that is getting injected with the embedded content from files. but if you would make the solution an CRAFT CMS plugin you could sell it through their plugin-store. sounds like a promising plugin to me - anything like files app is missing. how to build a plugin.

let's switch to email for the details, ok?

best, etienne