Added and rearranged config
This commit is contained in:
@@ -1,39 +1,74 @@
|
|||||||
<?php
|
<?php
|
||||||
// includes/config.php
|
// includes/config.php
|
||||||
// Global configuration for the site. Edit values as needed.
|
|
||||||
|
// === Site Setting ===
|
||||||
$ROOT_DIR='/home/reclusejay/repos/camera-gallery/src';
|
$ROOT_DIR='/home/reclusejay/repos/camera-gallery/src';
|
||||||
$CONFIG = [
|
$CONFIG = [
|
||||||
|
|
||||||
// === General Site Info ===
|
// === General Site Info ===
|
||||||
'site_name' => 'My Photo Gallery',
|
'site_name' => 'The Photo Gallery',
|
||||||
'nav_order' => ['home', 'gallery', 'upload'],
|
|
||||||
'nav_admin' => ['shell', 'gethash'],
|
|
||||||
'nav_hidden' => ['admin','infophp'],
|
|
||||||
'default_theme' => 'dark', // 'dark' or 'light'
|
'default_theme' => 'dark', // 'dark' or 'light'
|
||||||
|
'nav_order' => ['home', 'gallery', 'upload'],
|
||||||
|
'nav_admin' => ['shell', 'options'],
|
||||||
|
'nav_hidden' => ['admin','infophp','gethash'],
|
||||||
'timezone' => 'UTC',
|
'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 ===
|
// === Gallery & Caching ===
|
||||||
'max_per_page' => 100,
|
'max_per_page' => 100,
|
||||||
'thumb_max_size' => 300,
|
'thumb_max_size' => 300,
|
||||||
'thumb_quality' => 80,
|
'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_nodes' => ['MAKERNOTE', 'INTEROP', 'THUMBNAIL'],
|
||||||
'remove_tags' => ['SectionsFound','UserComment','UserCommentEncoding','Thumbnail.FileType','Thumbnail.MimeType','ComponentsConfiguration','FileSource','SceneType'],
|
'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
|
// Apply timezone globally
|
||||||
date_default_timezone_set($CONFIG['timezone']);
|
date_default_timezone_set($CONFIG['timezone']);
|
||||||
|
|
||||||
|
?>
|
||||||
Reference in New Issue
Block a user