From 04bf1d358fc6cf1e71437e3f4164bb0954cd5d4728473872caba12a5cb1dc86c Mon Sep 17 00:00:00 2001 From: reclusejay Date: Thu, 23 Oct 2025 00:55:42 +0100 Subject: [PATCH] Added and rearranged config --- src/includes/config.php | 77 ++++++++++++++++++++++++++++++----------- 1 file changed, 56 insertions(+), 21 deletions(-) diff --git a/src/includes/config.php b/src/includes/config.php index d88e325..672f7e6 100644 --- a/src/includes/config.php +++ b/src/includes/config.php @@ -1,39 +1,74 @@ 'My Photo Gallery', - 'nav_order' => ['home', 'gallery', 'upload'], - 'nav_admin' => ['shell', 'gethash'], - 'nav_hidden' => ['admin','infophp'], + 'site_name' => 'The Photo Gallery', 'default_theme' => 'dark', // 'dark' or 'light' + 'nav_order' => ['home', 'gallery', 'upload'], + 'nav_admin' => ['shell', 'options'], + 'nav_hidden' => ['admin','infophp','gethash'], 'timezone' => 'UTC', - - // === Paths === - 'base_dir' => $ROOT_DIR, - 'gallery_dir' => $ROOT_DIR.'/img/sorted/jpg', - 'thumb_dir' => $ROOT_DIR.'/cache/thumbs', - 'cache_dir' => $ROOT_DIR.'/cache', - 'log_dir' => $ROOT_DIR.'/logs', - 'upload_dir' => $ROOT_DIR.'/img/uploads', - 'index_file' => $ROOT_DIR.'/img/.index', - + // === Gallery & Caching === 'max_per_page' => 100, 'thumb_max_size' => 300, 'thumb_quality' => 80, - 'cache_file' => $ROOT_DIR.'/cache/gallery.json', + + // === Uploads === + 'max_parallel_uploads' => 2, // max simultaneous uploads + + // === Shell === + 'blacklist_commands' => ['rm', 'shutdown', 'reboot', 'passwd', 'dd', ':(){'], + 'default_dir' => '/home', + + + + +]; + +// === JavaScript Variables === +$CONFIG += [ + // === Index System Wide === + 'index_admin_status_update_interval' => 50000, + + // === Home Page === + 'home_chart_color_threshold_medium' => '70', + 'home_chart_color_threshold_high' => '80', + + // === Shell Page === + 'shell_print_howto_to_logconsole' => TRUE, + + // === Options Page === + 'options_status_interval' => 100000, + 'options_status_services' => ['uhttpd', 'dnsmasq', 'dropbear'], + +]; + +// === ! DO NOT CHANGE ! === +$CONFIG += [ + // === Paths === + 'base_dir' => $ROOT_DIR, // Location of root directory for the web server usually (Define at the top $ROOT_DIR) + 'gallery_dir' => $ROOT_DIR.'/img/sorted/jpg', // Location of the images + 'upload_dir' => $ROOT_DIR.'/img/uploads', // Location for uploaded images + 'index_file' => $ROOT_DIR.'/img/.index', // Location of the index file for image naming + 'cache_dir' => $ROOT_DIR.'/cache', // Location of the cache directory + 'thumb_dir' => $ROOT_DIR.'/cache/thumbs', // Location for generated thumbnail + 'exif_dir' => $ROOT_DIR.'/cache/exif', // Location of exif file, info extracted from images + 'cache_file' => $ROOT_DIR.'/cache/gallery.json', // Location of the gallery cache file + 'log_dir' => $ROOT_DIR.'/logs', // Location of the log files + // Admin Hashed Password + 'upload_password' => '$2y$12$Fb7u3H.428PoPCy/pxhqpu.poqjmDbiyzJtRJs/CEcCEPPMOYBLCm', // The bcrypt hash for admin password ! DO NOT USE PLAIN TEXT PASSWORD ! + // Exclude empty or useless exif information 'remove_nodes' => ['MAKERNOTE', 'INTEROP', 'THUMBNAIL'], 'remove_tags' => ['SectionsFound','UserComment','UserCommentEncoding','Thumbnail.FileType','Thumbnail.MimeType','ComponentsConfiguration','FileSource','SceneType'], - 'exif_dir' => $ROOT_DIR.'/cache/exif', - - // === Uploads === - 'upload_password' => '$2y$12$Fb7u3H.428PoPCy/pxhqpu.poqjmDbiyzJtRJs/CEcCEPPMOYBLCm', // bcrypt hash - 'max_parallel_uploads' => 2, // max simultaneous uploads + ]; // Apply timezone globally date_default_timezone_set($CONFIG['timezone']); +?> \ No newline at end of file