https://github.com/oros42/kissgallery
Keep It Stupid Simple Gallery
https://github.com/oros42/kissgallery
gallery javascript kiss php
Last synced: 2 months ago
JSON representation
Keep It Stupid Simple Gallery
- Host: GitHub
- URL: https://github.com/oros42/kissgallery
- Owner: Oros42
- License: cc0-1.0
- Created: 2020-04-04T09:58:41.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2024-04-13T09:05:28.000Z (over 1 year ago)
- Last Synced: 2025-05-16T00:42:02.077Z (5 months ago)
- Topics: gallery, javascript, kiss, php
- Language: PHP
- Size: 14.6 MB
- Stars: 7
- Watchers: 1
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# KISSGallery
Keep It Stupid Simple Gallery
PHP + javascript gallery in 1 file.
Demo : https://oros42.github.io/KISSGallery/index.html
KISS : https://en.wikipedia.org/wiki/KISS_principle## Install
```bash
sudo apt install php-gd
cd //
wget https://raw.githubusercontent.com/Oros42/KISSGallery/master/index.php
```## Recommendation, resize, optimise and make progressive your images
Install imagemagick
```bash
sudo apt install imagemagick
```
Resize any «.jpg» in 2000x2000px :
```bash
# /!\ This line modify files !
for i in *.{jpg,JPG,jpeg}; do convert "$i" -resize 2000x2000 -strip -interlace Plane -auto-orient "${i}"; done
```
Adapte this to your needs.## Customize
### Change the favicon
Put a favicon image in the folder and edit line 23 :
```
//define("FAVICON_PATH", "favicon.png");
```
to
```
define("FAVICON_PATH", "favicon.png");
```
With the good favicon's name.### Add title on images
Create the file ```titles.csv``` with :
```
;
;
;
...
```
Example :
```
100_0178.jpg;A nice sunset
100_4154.JPG;A cool building
```### Change the order of the files
For ascending (default) :
```
define("FILE_SORT", "ASC");
```
For descending :
```
define("FILE_SORT", "DESC");
```# You want more ?
## For uploading files
Add this : https://github.com/Oros42/tiny_DnDUp## Security ?
### Apache
https://httpd.apache.org/docs/current/howto/htaccess.html
Set in you /etc/apache2/sites-available/.conf :
```
AllowOverride All
```
And
```bash
cd
htpasswdPATH="/.htpasswd"
echo "Authtype Basic
Authname 'Who are you ?'
require valid-user
AuthUserFile $htpasswdPATH
" > .htaccess
htpasswd -c $htpasswdPATH
```#### Nginx
https://docs.nginx.com/nginx/admin-guide/security-controls/configuring-http-basic-authentication/