From a43fef14137c629bf42b1f792d8c543d5fceb587 Mon Sep 17 00:00:00 2001 From: root Date: Mon, 13 Nov 2017 20:07:55 +0100 Subject: [PATCH] Merged pull-request #6,#15 and #16 --- README.md | 3 +++ config.inc.php | 4 +++- index.php | 4 +++- lang/de.js | 4 ++-- lang/en.js | 4 ++-- lang/fr.js | 14 ++++++++++++++ package.json | 16 ++++++++++++++++ resources/css/style.css | 4 ++++ resources/sass/style.scss | 6 ++++++ takePic.php | 10 ++++++++++ 10 files changed, 63 insertions(+), 6 deletions(-) create mode 100644 lang/fr.js create mode 100644 package.json diff --git a/README.md b/README.md index 01daf1d94..0aa6ebd02 100644 --- a/README.md +++ b/README.md @@ -29,6 +29,8 @@ cd /var/www/ sudo rm -r html/ sudo git clone https://github.com/andreknieriem/photobooth sudo mv photobooth html +sudo chown -R pi: /var/www/ +sudo chmod -R 777 /var/www ``` Give sudo rights to the webserver user (www-data) @@ -48,6 +50,7 @@ If you want the english labels, just change it to en.js. If you want to change the labels just change the de.js or en.js ### Changelog +- 1.3.1: Merged pull-request #6,#15 and #16 - 1.3.0: Option for QR and Print Butons, code rework, gulp-sass feature enabled - 1.2.0: Printing feature, code rework, bugfixes - 1.1.1: Bugix - QR not working on touch devices diff --git a/config.inc.php b/config.inc.php index 9e437b52d..f63f1c1ff 100644 --- a/config.inc.php +++ b/config.inc.php @@ -2,9 +2,11 @@ $config = array(); $config['os'] = (DIRECTORY_SEPARATOR == '\\') || (strtolower(substr(PHP_OS, 0, 3)) === 'win') ? 'windows' : 'linux'; -$config['dev'] = false; +$config['dev'] = true; $config['use_print'] = true; $config['use_qr'] = true; +$config['show_fork'] = true; +#$config['file_format'] = 'date'; // comment in to get dateformat images // FOLDERS // change the folders to whatever you like diff --git a/index.php b/index.php index 1bbd5f0df..54bc9e7c5 100644 --- a/index.php +++ b/index.php @@ -76,7 +76,9 @@ - Fork me on GitHub + + Fork me on GitHub + diff --git a/lang/de.js b/lang/de.js index 0cd0852e0..807065269 100644 --- a/lang/de.js +++ b/lang/de.js @@ -10,5 +10,5 @@ L10N = { "qrHelp": "Um das Bild auf dein Handy zu laden, verbinde dich mit dem WLAN photobooth<\/strong>", "error": "Es ist ein Fehler aufgetreten, bitte versuche es erneut", "reload": "Seite neu laden", - "print": "Drucken" -} \ No newline at end of file + "print": "Drucken" +} diff --git a/lang/en.js b/lang/en.js index 06f1ad7fb..b4dba68ba 100644 --- a/lang/en.js +++ b/lang/en.js @@ -10,5 +10,5 @@ L10N = { "qrHelp": "Connect to the wifi photobooth<\/strong>, to download the picture to your smartphone.", "error": "Something went wrong. Please try it again", "reload": "Reload Page", - "print": "Print" -} \ No newline at end of file + "print": "Print" +} diff --git a/lang/fr.js b/lang/fr.js new file mode 100644 index 000000000..3e5339c02 --- /dev/null +++ b/lang/fr.js @@ -0,0 +1,14 @@ +L10N = { + "gallery": "Galerie", + "startScreen": "

Photobooth<\/h1>

Interface Web<\/h2> by Andr\u00e9 Rinas", + "takePhoto": "Prendre une photo!", + "home": "Accueil", + "qr": "QR Code", + "newPhoto": "Une autre", + "busy": "En cours de traitement", + "cheese": "Cheeeeeeeese!", + "qrHelp": "Se connecter au wifi du photobooth<\/strong>, pour télécharger la photo sur votre smartphone.", + "error": "Il y a eu un problème. Merci de réessayer", + "reload": "Recharger la page", + "print": "Imprimer" +} diff --git a/package.json b/package.json new file mode 100644 index 000000000..235bd7078 --- /dev/null +++ b/package.json @@ -0,0 +1,16 @@ +{ + "name": "photobooth", + "version": "1.0.0", + "description": "photobooth sass setup", + "main": "index.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "author": "", + "license": "GPL", + "dependencies": { + "bower": "1.7.9", + "gulp": "3.9.1", + "gulp-sass": "2.3.2" + } +} diff --git a/resources/css/style.css b/resources/css/style.css index e169b18ba..8b0ea78b6 100644 --- a/resources/css/style.css +++ b/resources/css/style.css @@ -542,3 +542,7 @@ hr.small { margin: 0; float: right; opacity: 0.75; } + +@media (max-width: 767px) { + .takePic { + bottom: auto; } } diff --git a/resources/sass/style.scss b/resources/sass/style.scss index 671b9281c..7405d9731 100644 --- a/resources/sass/style.scss +++ b/resources/sass/style.scss @@ -650,3 +650,9 @@ hr.small { float: right; opacity: 0.75; } + +@media (max-width: 767px){ + .takePic { + bottom: auto; + } +} diff --git a/takePic.php b/takePic.php index 0f83e909a..8c44935ff 100644 --- a/takePic.php +++ b/takePic.php @@ -4,6 +4,16 @@ require_once('config.inc.php'); $file = md5(time()).'.jpg'; + +switch($config['file_format']){ + case 'date': + $file = date('Ymd_His').'.jpg'; + break; + default: + $file = md5(time()).'.jpg'; + break; + } + $filename_photo = $config['folders']['images'] . DIRECTORY_SEPARATOR . $file; $filename_thumb = $config['folders']['thumbs'] . DIRECTORY_SEPARATOR . $file;