PHP Gallery

Posted by ganastor 
This forum is currently read only. You can not log in or make any changes. This is a temporary situation.
Now, this forum is in read-only mode. You find details Details hereContinue on /r/PirateBox
PHP Gallery
July 27, 2015 05:45PM
So if this belongs elsewhere (like the mods section) or you'd like more detail please let me know... I've had some users not find it super intuitive for the forum/images because the first place they put their pictures is the first splash screen then go to browse files and don't see a gallery.

So, first thing I've been doing is adding a 5th "gallery" tab and installing php so I can show a gallery of just the pictures in the directory:

PHP code - [pastebin.com]
index.html for gallery - [pastebin.com]

Again please feel free to ignore, I just did this the first time because I was using it as a photo/video sharing for a wedding and the users did use the forum but thought the pictures would be coming from the files.



Edited 1 time(s). Last edit at 07/27/2015 05:47PM by Matthias.
Re: PHP Gallery
July 27, 2015 05:49PM
Thank you for that contribution. That is very nice!

Unfortunately, you posted in a thread for preparing a hotfix release, which should mostly include only fixes for PirateBox. In addition, as we don't have PHP in the stable release yet, we can't make use of it now.

best regards Matthias


This is only my signature.
Re: PHP Gallery
July 27, 2015 06:18PM
Thanks for the advice and sorry about that. I've always been a self developer and am still getting the hang of the whole community development thing... hell I'm still figuring out github smiling smiley

I'll add full instructions here then at some point when I get that thing called time. I actually built docker images which automates your post install steps and my portion above for the pi(rate) versions.
Re: PHP Gallery
July 27, 2015 07:35PM
nice @ docker images. Do you think about publishing them on the repository? How do you make it working against the wifi card and the hostap stuff?
Re: PHP Gallery
July 27, 2015 08:48PM
Honestly, it was Docker that got me even looking into other community projects, I've been developing on my own for almost 20 years and never looked at github.

When I get my very personalized image cleaned up for public use I can certainly put it up there.. again just the inexperience with sharing stuff is still a learning curve for me. Like comments in code that mean something to someone other than myself..hah.

Re: the wifi stuff, I had bought my first few raspi's from canakit which come with a Ralink RT5370 card which work out of box. I've continued buying the RT5370 chipsets for this reason, so never really had to take the driver issues.
Re: PHP Gallery
August 02, 2015 09:42AM
re wifi: My question was: can a docker container setup a wifi hotspot?


This is only my signature.
Re: PHP Gallery
August 02, 2015 06:03PM
Ah, sorry for the misunderstanding. I haven't tested it yet, but yes, with the --privileged flag when the container is actually run it would allow it to access all devices on the host system I should think it would work. In theory, I believe you could make the entirety of piratebox itself a docker image so you could run it on any machine, virtually.

Of course, this does defeat the purpose of making it mobile if being run from a desktop/laptop virtually, but it should be possible.

I did take a really quick glance as I don't have time to write my own right now, but it looks like someone did already start creating hostapd to do this: [github.com]. Note the --privileged flag he has in his run command.
Re: PHP Gallery
August 03, 2015 05:21PM
Ah, ok.
That privileged flag explains it, I was wondering because a docker container usually hides everything from the running guest smiling smiley

Thanks for the info


This is only my signature.
Re: PHP Gallery
August 03, 2015 06:48PM
Np. Hopefully by the end of this week as I get time to work on it, I'll get the entire Pi(rate) manual diy page into one as a test run through. Got started last night and was hoping to finish but then life happened...
Re: PHP Gallery
April 06, 2018 08:32PM
Hello ganastor

I would like to know how to install these scripts on a piratebox.
Where do you place it's 2 files?
Thanks in advance.