forked from andreknieriem/photobooth
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.inc.php
114 lines (102 loc) · 3.87 KB
/
config.inc.php
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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
<?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['print_qrcode'] = true;
$config['print_frame'] = false;
$config['use_mail'] = false; // mail data needs to be configured
$config['use_mobile_view'] = false;
$config['use_gpio_button'] = false; // Use alt+p to take a new picture, can be triggered via GPIO24
$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!
$config['use_filter'] = true;
$config['chroma_keying'] = true;
$config['use_collage'] = false;
// 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']['keying'] = 'keying';
$config['folders']['print'] = 'print';
$config['folders']['qrcodes'] = 'qrcodes';
$config['folders']['thumbs'] = 'thumbs';
$config['folders']['tmp'] = 'tmp';
// WEDDING SETTINGS
$config['is_wedding'] = false;
$config['wedding']['groom'] = 'Name 1';
$config['wedding']['bride'] = 'Name 2';
$config['wedding']['symbol'] = 'fa-heart-o';
// GALLERY
// should the gallery list the newest pictures first?
$config['show_gallery'] = true;
$config['newest_first'] = true;
$config['scrollbar'] = false;
$config['show_date'] = false; // only works if file_format_date = true
$config['gallery']['date_format'] = 'd.m.Y - G:i';
// EMAIL
// If connection fails some help can be found here: https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting
// Especially gmail needs some special config
$config['send_all_later'] = false; // if true enables checkbox to save the current mail address for later in mail-addresses.txt
$config['mail_host'] = 'smtp.example.com';
$config['mail_username'] = 'photobooth@example.com';
$config['mail_password'] = 'yourpassword';
$config['mail_secure'] = 'tls';
$config['mail_port'] = '587';
$config['mail_fromAddress'] = 'photobooth@example.com';
$config['mail_fromName'] = 'Photobooth';
switch($config['language']) {
case 'de':
$config['mail_subject'] = 'Hier ist dein Bild';
$config['mail_text'] = 'Hey, dein Bild ist angehangen.';
break;
case 'fr':
$config['mail_subject'] = 'Voici votre photo';
$config['mail_text'] = 'Hé, ta photo est attachée.';
break;
case 'en':
default:
$config['mail_subject'] = 'Here is your picture';
$config['mail_text'] = 'Hey, your picture is attached.';
break;
}
// 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;
}