forked from andreknieriem/photobooth
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.inc.php
More file actions
70 lines (61 loc) · 2.32 KB
/
config.inc.php
File metadata and controls
70 lines (61 loc) · 2.32 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
<?php
// WARNING!
// This config gets overwritten by the admin panel if you use it.
// If you want to use only this file, delete the admin/config.json file and do not use the admin panel
// as it writes new config.json files.
$config = array();
$sys['os'] = (DIRECTORY_SEPARATOR == '\\') || (strtolower(substr(PHP_OS, 0, 3)) === 'win') ? 'windows' : 'linux';
$config['dev'] = false;
$config['use_print'] = false;
$config['use_qr'] = true;
$config['show_fork'] = true;
$config['previewFromCam'] = false; // experimental see https://github.com/andreknieriem/photobooth/pull/30
$config['file_format_date'] = false;
$config['cntdwn_time'] = '5'; // control countdown timer
$config['cheese_time'] = '1000'; // control time for cheeeeese!
// LANGUAGE
// possible values: en, de, fr
$config['language'] = 'de';
// StartScreen
$config['start_screen_title'] = 'Photobooth';
$config['start_screen_subtitle'] = 'Webinterface by André Rinas';
// FOLDERS
// change the folders to whatever you like
$config['folders']['images'] = 'images';
$config['folders']['thumbs'] = 'thumbs';
$config['folders']['qrcodes'] = 'qrcodes';
$config['folders']['print'] = 'print';
// GALLERY
// should the gallery list the newest pictures first?
$config['gallery']['show_gallery'] = true;
$config['gallery']['newest_first'] = true;
$config['gallery']['scrollbar'] = false;
$config['gallery']['show_date'] = false; // only works if file_format_date = true
$config['gallery']['date_format'] = 'd.m.Y - G:i';
// COMMANDS and MESSAGES
switch($sys['os']) {
case 'windows':
$config['take_picture']['cmd'] = 'digicamcontrol\CameraControlCmd.exe /capture /filename %s';
$config['take_picture']['msg'] = 'Photo transfer done.';
$config['print']['cmd'] = 'mspaint /pt "%s"';
$config['print']['msg'] = '';
break;
case 'linux':
default:
$config['take_picture']['cmd'] = 'sudo gphoto2 --capture-image-and-download --filename=%s images';
$config['take_picture']['msg'] = 'New file is in location';
$config['print']['cmd'] = 'sudo lp -o landscape -o fit-to-page %s';
$config['print']['msg'] = '';
break;
}
// MERGE WITH admin/config.json if exists
$filename = false;
if(file_exists('admin/config.json')) {
$filename = 'admin/config.json';
} elseif(file_exists('config.json')) {
$filename = 'config.json';
}
if($filename){
$file = json_decode(file_get_contents($filename),true);
$config = $file;
}