Skip to content
This repository was archived by the owner on Aug 27, 2022. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
6e432bd
admin-views: added feature and sample panel (collage)
jacques42 Dec 23, 2020
26f7519
admin-views: fixed manual/index.php to also adhere to view setting
jacques42 Dec 23, 2020
9ced781
admin-panel: Major redesign - initial version
jacques42 Jan 4, 2021
961fe64
admin-panel: Adjustments and fixes
jacques42 Jan 5, 2021
6638c42
admin-panel: Fixed login / logout and font size for headings
jacques42 Jan 7, 2021
1190b30
admin-panel: fixed reset button and minor style elements
jacques42 Jan 7, 2021
ebde5a0
lang: alphabetic order again
andi34 Jan 9, 2021
6229a75
admin-panel: improvements for small screen sizes
jacques42 Jan 16, 2021
cef2204
restore default color & small adjustments, add back missing language …
andi34 Jan 24, 2021
5049896
config: fix saving print key and preview from url settings
andi34 Jan 24, 2021
9a8c263
admin: fix back URL
andi34 Jan 24, 2021
fe27eea
admin (configsetup): fix saving background image path
andi34 Jan 24, 2021
5db20f5
admin (configsetup): fix some config options, adjust strings
andi34 Jan 25, 2021
38d13b1
config: adjust default config to match configsetup order
andi34 Jan 27, 2021
4620a95
config: restore default background config
andi34 Jan 28, 2021
465c3e1
config: allow split config for slider
jacques42 Jan 29, 2021
95d24cf
split config: fixed checkbox where default is true
jacques42 Feb 7, 2021
2806061
admin-panel: added button for disk-usage, added button as available c…
jacques42 Feb 16, 2021
03f16f8
admin-panel: fixed nav bar for small screen sizes
jacques42 Feb 17, 2021
9ca4415
admin-panel: fixed logout button and top nav bar
jacques42 Feb 18, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
445 changes: 275 additions & 170 deletions admin/index.php

Large diffs are not rendered by default.

9 changes: 3 additions & 6 deletions api/admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,18 +53,15 @@

foreach ($config as $k => $conf) {
if (is_array($conf)) {
if (!empty($data[$k]) && is_array($data[$k])) {
$newConfig[$k] = $data[$k];
continue;
}

foreach ($conf as $sk => $sc) {
if (isset($data[$k][$sk]) && !empty($data[$k][$sk])) {
if (isset($data[$k][$sk])) {
if ($data[$k][$sk] == 'true') {
$newConfig[$k][$sk] = true;
} else {
$newConfig[$k][$sk] = $data[$k][$sk];
}
} elseif (isset($defaultConfig[$k][$sk])) {
$newConfig[$k][$sk] = false;
}
}
} else {
Expand Down
284 changes: 145 additions & 139 deletions config/config.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,67 +9,105 @@
// G E N E R A L
// possible language values: de, el, en, es, fr, pl, it
$config['language'] = 'en';
$config['adminpanel_view'] = 'basic';
$config['dev'] = false;
$config['start_screen_title'] = 'Photobooth';
$config['start_screen_subtitle'] = NULL;
$config['dev'] = false;
$config['pictureRotation'] = '0';
$config['keep_images'] = true;
// possible thumb_size values: '360px', '540px', '900px', '1080px', '1260px'
$config['thumb_size'] = '540px';
$config['show_error_messages'] = true;
$config['auto_reload_on_error'] = true;
$config['db_file'] = 'db';
// possible file_naming values: 'dateformatted', 'numbered', 'random'
$config['file_naming'] = 'dateformatted';
// picture_permissions example values: '0644' (rw-r--r--), '0666' (rw-rw-rw-), '0600' (rw-------)
$config['picture_permissions'] = '0644';
$config['use_qr'] = true;
$config['webserver_ip'] = null;
$config['wifi_ssid'] = 'Photobooth';
$config['use_download'] = true;
$config['download_thumbs'] = false;
$config['use_slideshow'] = true;
// mail data needs to be configured if use_mail is enabled
$config['use_mail'] = false;
// specify key id (e.g. 13 is the enter key) to use that key to take a picture (photo_key) or collage (collage_key)
// use for example https://keycode.info to get the key code
$config['photo_key'] = null;
$config['collage_key'] = null;
// control time in milliseconds until Photobooth reloads automatically
$config['time_to_live'] = '90000';
$config['image_preview_before_processing'] = true;
$config['db_file'] = 'db';


// F R O N T P A G E
$config['show_fork'] = true;
$config['is_event'] = true;
$config['event']['textLeft'] = 'We';
// possible event symbol values: 'fa-camera-retro', 'fa-birthday-cake', 'fa-gift', 'fa-tree', 'fa-snowflake-o', 'fa-heart-o',
// 'fa-heart', 'fa-heartbeat', 'fa-apple', 'fa-anchor', 'fa-glass', 'fa-gears', 'fa-users'
$config['event']['symbol'] = 'fa-heart-o';
$config['event']['textRight'] = 'OpenSource';
$config['force_buzzer'] = false;


// P I C T U R E S
// control countdown timer in seconds
$config['cntdwn_time'] = '5';
$config['no_cheese'] = false;
// control time for cheeeeese! in milliseconds
// control time for cheeeeese! in milliseconds
$config['cheese_time'] = '1000';
// control time in milliseconds until Photobooth reloads automatically
$config['time_to_live'] = '90000';
$config['image_preview_before_processing'] = true;
$config['preserve_exif_data'] = false;
$config['pictureRotation'] = '0';
$config['polaroid_effect'] = false;
$config['polaroid_rotation'] = '0';
$config['use_filter'] = true;
$config['default_imagefilter'] = 'plain';
$config['disabled_filters'] = array();
$config['polaroid_effect'] = false;
$config['polaroid_rotation'] = '0';
$config['take_frame'] = false;
$config['take_frame_path'] = '../resources/img/frames/frame.png';
// specify key id (e.g. 13 is the enter key) to use that key to take a picture (photo_key)
// use for example https://keycode.info to get the key code
$config['photo_key'] = null;
// possible file_naming values: 'dateformatted', 'numbered', 'random'
$config['file_naming'] = 'dateformatted';
// picture_permissions example values: '0644' (rw-r--r--), '0666' (rw-rw-rw-), '0600' (rw-------)
$config['picture_permissions'] = '0644';
$config['keep_images'] = true;
$config['preserve_exif_data'] = false;
$config['allow_delete'] = true;


// C O L L A G E
$config['use_collage'] = true;
$config['take_collage_frame'] = false;
$config['take_collage_frame_always'] = false;
$config['take_collage_frame_path'] = '../resources/img/frames/frame.png';
// possible collage_layout values: '2x2', '2x4', '2x4BI'
$config['collage_layout'] = '2x2';
$config['collage_background'] = '../resources/img/frames/DefaultCollageBackground.png';
// control countdown timer between collage pictures in seconds
$config['collage_cntdwn_time'] = '3';
$config['continuous_collage'] = true;
$config['allow_delete'] = true;
$config['allow_delete_from_gallery'] = true;
// possible collage_layout values: '2x2', '2x4', '2x4BI'
$config['collage_layout'] = '2x2';
$config['collage_background'] = '../resources/img/frames/DefaultCollageBackground.png';
// specify key id (e.g. 13 is the enter key) to use that key to take a collage (collage_key)
// use for example https://keycode.info to get the key code
$config['collage_key'] = null;
$config['take_collage_frame'] = false;
$config['take_collage_frame_always'] = false;
$config['take_collage_frame_path'] = '../resources/img/frames/frame.png';


// J P E G Q U A L I T Y
$config['jpeg_quality_thumb'] = 60;
$config['jpeg_quality_chroma'] = 100;
$config['jpeg_quality_image'] = 100;
// G A L L E R Y
$config['show_gallery'] = true;
$config['newest_first'] = true;
$config['use_slideshow'] = true;
$config['gallery_pictureTime'] = '3000';
$config['pswp_animateTransitions'] = false;
$config['pswp_fullscreenEl'] = false;
$config['pswp_counterEl'] = true;
$config['pswp_history'] = true;
// show_date only works if file_naming = 'dateformatted' in general section
$config['show_date'] = true;
$config['gallery']['date_format'] = 'd.m.Y - G:i';
$config['gallery_db_check_enabled'] = true;
$config['gallery_db_check_time'] = '10';
$config['allow_delete_from_gallery'] = true;
$config['scrollbar'] = false;
$config['gallery_bottom_bar'] = true;
$config['pswp_clickToCloseNonZoomable'] = false;
$config['pswp_closeOnScroll'] = false;
$config['pswp_closeOnOutsideClick'] = false;
$config['pswp_preventSwiping'] = false;
$config['pswp_pinchToClose'] = true;
$config['pswp_closeOnVerticalDrag'] = true;
$config['pswp_tapToToggleControls'] = true;
$config['pswp_zoomEl'] = false;
$config['pswp_loop'] = true;
$config['pswp_bgOpacity'] = 1;


// P R E V I E W
Expand All @@ -89,72 +127,19 @@
$config['previewCamBackground'] = false;


// U S E R I N T E R F A C E
// possible index_style values: "classic", "modern", "custom"
$config['index_style'] = 'modern';
$config['font_size'] = '16px';
$config['background_image'] = null;
$config['background_admin'] = null;
$config['background_chroma'] = null;
$config['show_fork'] = true;
$config['cups_button'] = false;
$config['toggle_fs_button'] = false;
$config['rounded_corners'] = false;
$config['colors']['primary'] = '#0a6071';
$config['colors']['secondary'] = '#214852';
$config['colors']['font'] = '#79bad9';
$config['colors']['button_font'] = '#ffffff';
$config['colors']['start_font'] = '#ffffff';
$config['colors']['panel'] = '#2d4157';
$config['colors']['hover_panel'] = '#446781';
$config['colors']['border'] = '#eeeeee';
$config['colors']['box'] = '#f8f9fc';
$config['colors']['gallery_button'] = '#ffffff';
$config['colors']['countdown'] = '#ffffff';
$config['colors']['background_countdown'] = '#214852';
$config['colors']['cheese'] = '#ffffff';


// L O G I N
$config['login_enabled'] = false;
$config['login_username'] = 'Photo';
$config['login_password'] = NULL;
$config['protect_admin'] = true;
$config['protect_index'] = false;


// F O L D E R S
$config['folders']['data'] = 'data';
$config['folders']['images'] = 'data/images';
$config['folders']['keying'] = 'data/keying';
$config['folders']['print'] = 'data/print';
$config['folders']['qrcodes'] = 'data/qrcodes';
$config['folders']['thumbs'] = 'data/thumbs';
$config['folders']['tmp'] = 'data/tmp';
$config['folders']['archives'] = 'archives';


// E V E N T
$config['is_event'] = true;
$config['event']['textLeft'] = 'We';
$config['event']['textRight'] = 'OpenSource';
// possible event symbol values: 'fa-camera-retro', 'fa-birthday-cake', 'fa-gift', 'fa-tree', 'fa-snowflake-o', 'fa-heart-o',
// 'fa-heart', 'fa-heartbeat', 'fa-apple', 'fa-anchor', 'fa-glass', 'fa-gears', 'fa-users'
$config['event']['symbol'] = 'fa-heart-o';


// K E Y I N G
$config['chroma_keying'] = false;
// possible chroma_keying_variant values: 'marvinj', 'seriouslyjs'
$config['chroma_keying_variant'] = 'marvinj';
// possible chroma_size values: '1000px', '1500px', '2000px', '2500px'
$config['chroma_size'] = '1500px';
$config['use_live_keying'] = false;
// possible chroma_keying_variant values: 'marvinj', 'seriouslyjs'
$config['chroma_keying_variant'] = 'marvinj';
$config['keying_background_path'] = 'resources/img/background';
$config['live_keying_show_all'] = false;
$config['use_live_keying'] = false;


// P R I N T
$config['cups_button'] = false;
$config['use_print_result'] = false;
$config['use_print_gallery'] = false;
$config['use_print_chromakeying'] = false;
Expand All @@ -180,49 +165,22 @@
$config['linespace'] = '100';


// G A L L E R Y
$config['show_gallery'] = true;
$config['newest_first'] = true;
$config['scrollbar'] = false;
// show_date only works if file_naming = 'dateformatted' in general section
$config['show_date'] = true;
$config['gallery']['date_format'] = 'd.m.Y - G:i';
$config['gallery_bottom_bar'] = true;
$config['gallery_pictureTime'] = '3000';
$config['gallery_db_check_enabled'] = true;
$config['gallery_db_check_time'] = '10';
// PhotoSwipe options:
$config['pswp_clickToCloseNonZoomable'] = false;
$config['pswp_closeOnScroll'] = false;
$config['pswp_closeOnOutsideClick'] = false;
$config['pswp_preventSwiping'] = false;
$config['pswp_pinchToClose'] = true;
$config['pswp_closeOnVerticalDrag'] = true;
$config['pswp_tapToToggleControls'] = true;
$config['pswp_animateTransitions'] = false;
$config['pswp_zoomEl'] = false;
$config['pswp_fullscreenEl'] = false;
$config['pswp_counterEl'] = true;
$config['pswp_history'] = true;
$config['pswp_loop'] = true;
$config['pswp_bgOpacity'] = 1;


// E - M A I L
// Please read https://github.com/andi34/photobooth/wiki/FAQ#ive-trouble-setting-up-e-mail-config-how-do-i-solve-my-problem
//
// If send_all_later is enabled, a checkbox to save the current mail address for later in {mail_file}.txt is visible
$config['use_mail'] = false;
$config['send_all_later'] = false;
$config['mail_file'] = 'mail-adresses';
$config['mail_subject'] = null; // if empty, default translation is used
$config['mail_text'] = null; // if empty, default translation is used
$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';
$config['mail_subject'] = null; // if empty, default translation is used
$config['mail_text'] = null; // if empty, default translation is used
$config['mail_file'] = 'mail-adresses';
$config['mail_secure'] = 'tls';
$config['mail_port'] = '587';


// S T A N D A L O N E S L I D E S H O W
Expand All @@ -232,6 +190,58 @@
$config['slideshow_use_thumbs'] = false;


// R E M O T E B U Z Z E R
$config['remotebuzzer_enabled'] = false;
// remotebuzzer_collagetime controls the time to distinguish picture from collage in seconds
$config['remotebuzzer_collagetime'] = '2';
$config['remotebuzzer_port'] = 14711;
$config['remotebuzzer_pin'] = 40;


// S Y N C T O U S B S T I C K
$config['synctodrive_enabled'] = false;
$config['synctodrive_target'] = 'photobooth'; //Default target for the sync script
$config['synctodrive_interval'] = 300;


// A U T H E N T I C A T I O N
$config['login_enabled'] = false;
$config['login_username'] = 'Photo';
$config['login_password'] = NULL;
$config['protect_admin'] = true;
$config['protect_index'] = false;


// U S E R I N T E R F A C E
// possible index_style values: "classic", "modern", "custom"
$config['index_style'] = 'modern';
$config['toggle_fs_button'] = false;
$config['font_size'] = '16px';
$config['colors']['countdown'] = '#ffffff';
$config['colors']['background_countdown'] = '#214852';
$config['colors']['cheese'] = '#ffffff';
$config['background_image'] = null;
$config['background_admin'] = null;
$config['background_chroma'] = null;
$config['rounded_corners'] = false;
$config['colors']['primary'] = '#0a6071';
$config['colors']['secondary'] = '#214852';
$config['colors']['font'] = '#79bad9';
$config['colors']['button_font'] = '#ffffff';
$config['colors']['start_font'] = '#ffffff';
$config['colors']['panel'] = '#2d4157';
$config['colors']['hover_panel'] = '#446781';
$config['colors']['border'] = '#eeeeee';
$config['colors']['box'] = '#f8f9fc';
$config['colors']['gallery_button'] = '#ffffff';


// J P E G Q U A L I T Y
$config['jpeg_quality_image'] = 100;
$config['jpeg_quality_chroma'] = 100;
$config['jpeg_quality_thumb'] = 60;


// C O M M A N D S
$config['take_picture']['cmd'] = null;
$config['take_picture']['msg'] = null;
Expand All @@ -244,22 +254,18 @@
$config['nodebin']['cmd'] = null;


// R E M O T E B U Z Z E R
$config['remotebuzzer_enabled'] = false;
// remotebuzzer_collagetime controls the time to distinguish picture from collage in seconds
$config['remotebuzzer_collagetime'] = '2';
$config['remotebuzzer_port'] = 14711;
$config['remotebuzzer_pin'] = 40;
$config['remotebuzzer_collagetime'] = '2'; // control time to distinguish picture from collage
// F O L D E R S
$config['folders']['data'] = 'data';
$config['folders']['images'] = 'data/images';
$config['folders']['keying'] = 'data/keying';
$config['folders']['print'] = 'data/print';
$config['folders']['qrcodes'] = 'data/qrcodes';
$config['folders']['thumbs'] = 'data/thumbs';
$config['folders']['tmp'] = 'data/tmp';
$config['folders']['archives'] = 'archives';


// R E S E T
$config['reset_remove_images'] = true;
$config['reset_remove_mailtxt'] = true;
$config['reset_remove_config'] = true;


// S Y N C T O U S B S T I C K
$config['synctodrive_enabled'] = false;
$config['synctodrive_target'] = 'photobooth'; //Default target for the sync script
$config['synctodrive_interval'] = 300;
$config['reset_remove_mailtxt'] = false;
$config['reset_remove_config'] = false;
2 changes: 2 additions & 0 deletions lib/config.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,8 @@
$config['preview']['killcmd'] = $cmds[$os]['preview']['killcmd'];
$config['nodebin']['cmd'] = $cmds[$os]['nodebin']['cmd'];

$config['adminpanel_view_default'] = 'expert';

$config['collage_limit'] = 4;

$config['remotebuzzer_logfile'] = 'remotebuzzer_server.log';
Expand Down
Loading