From 01a58f5aebb20b8ed05c041fa950bdc10d6559c7 Mon Sep 17 00:00:00 2001 From: filesite Date: Mon, 24 Oct 2022 22:45:49 +0800 Subject: [PATCH] add template config for videoblog --- conf/template_googleimage.php | 59 +++++++++++++++++++++++-------- conf/template_manual.php | 63 ++++++++++++++++++++++++++-------- conf/template_videoblog.php | 63 ++++++++++++++++++++++++++++++++++ conf/template_webdirectory.php | 59 ++++++++++++++++++++++--------- docker_build.sh | 5 +++ 5 files changed, 203 insertions(+), 46 deletions(-) create mode 100644 conf/template_videoblog.php create mode 100755 docker_build.sh diff --git a/conf/template_googleimage.php b/conf/template_googleimage.php index 1442df7..10a2dba 100644 --- a/conf/template_googleimage.php +++ b/conf/template_googleimage.php @@ -1,32 +1,63 @@ 'Asia/Shanghai', //timezone - //文档站皮肤 - //'content_directory' => 'content/', //directory of contents in /www/ - //when it's empty, use layout and views in directory views/ - //'theme' => 'manual', //name of theme which is enabled - - //导航站皮肤 - //'content_directory' => 'navs/', //directory of contents in /www/ - //'theme' => 'webdirectory', - //图片站皮肤 'content_directory' => 'girls/', //directory of contents in /www/ 'theme' => 'googleimage', //name of theme which is enabled - + + 'maxScanDirLevels' => 4, //max directory levels to scan 'default_layout' => 'main', //default layout 'error_layout' => 'error', //exception layout, show error title and content //for debug, log directory: ../runtime/logs/ - 'debug' => false, + 'debug' => true, - //for themes + //图片皮肤配置 'googleimage' => array( 'imageHeight' => 350, //图片高度,单位:px 'contact' => 'FileSite图片网站订制联系:FileSite.io', ), + + //目前支持的皮肤 + 'allowedThemes' => array( + 'manual', + 'webdirectory', + 'googleimage', + 'videoblog', + ), + + //md5加密前缀 + 'md5Prefix' => 'some_code_here', + + //后台管理相关配置 + 'admin' => array( + 'username' => 'filesite', + 'password' => '88888888', + 'captcha' => true, //后台登陆是否开启验证码 + + 'maxUploadFileSize' => 20, //单位:Mb + 'allowedUploadFileTypes' => array( + 'image/jpeg', + 'image/png', + 'image/webp', + 'image/gif', + ), + ), + ); + +//自定义配置支持 +$customConfigFile = __DIR__ . '/../runtime/custom_config.json'; +if (file_exists($customConfigFile)) { + try { + $json = file_get_contents($customConfigFile); + $customConfigs = json_decode($json, true); + $configs = array_merge($configs, $customConfigs); + }catch(Exception $e) {} +} + +return $configs; diff --git a/conf/template_manual.php b/conf/template_manual.php index dd57268..0d00e3a 100644 --- a/conf/template_manual.php +++ b/conf/template_manual.php @@ -1,8 +1,8 @@ 'Asia/Shanghai', //timezone //文档站皮肤 @@ -10,23 +10,56 @@ return array( //when it's empty, use layout and views in directory views/ 'theme' => 'manual', //name of theme which is enabled - //导航站皮肤 - //'content_directory' => 'navs/', //directory of contents in /www/ - //'theme' => 'webdirectory', - //图片站皮肤 - //'content_directory' => 'girls/', //directory of contents in /www/ - //'theme' => 'googleimage', //name of theme which is enabled - + 'maxScanDirLevels' => 4, //max directory levels to scan 'default_layout' => 'main', //default layout 'error_layout' => 'error', //exception layout, show error title and content //for debug, log directory: ../runtime/logs/ - 'debug' => false, + 'debug' => true, + + //视频皮肤配置 + 'videoblog' => array( + 'imageHeight' => 180, //图片高度,单位:px + 'contact' => 'FileSite视频网站订制联系:FileSite.io', + ), + + //目前支持的皮肤 + 'allowedThemes' => array( + 'manual', + 'webdirectory', + 'googleimage', + 'videoblog', + ), + + //md5加密前缀 + 'md5Prefix' => 'some_code_here', + + //后台管理相关配置 + 'admin' => array( + 'username' => 'filesite', + 'password' => '88888888', + 'captcha' => true, //后台登陆是否开启验证码 + + 'maxUploadFileSize' => 20, //单位:Mb + 'allowedUploadFileTypes' => array( + 'image/jpeg', + 'image/png', + 'image/webp', + 'image/gif', + ), + ), - //for themes - //'googleimage' => array( - // 'imageHeight' => 350, //图片高度,单位:px - // 'contact' => 'FileSite图片网站订制联系:FileSite.io', - //), ); + +//自定义配置支持 +$customConfigFile = __DIR__ . '/../runtime/custom_config.json'; +if (file_exists($customConfigFile)) { + try { + $json = file_get_contents($customConfigFile); + $customConfigs = json_decode($json, true); + $configs = array_merge($configs, $customConfigs); + }catch(Exception $e) {} +} + +return $configs; diff --git a/conf/template_videoblog.php b/conf/template_videoblog.php new file mode 100644 index 0000000..b1b9a64 --- /dev/null +++ b/conf/template_videoblog.php @@ -0,0 +1,63 @@ + 'Asia/Shanghai', //timezone + + //视频站皮肤 + 'content_directory' => 'videos/', //directory of contents in /www/ + 'theme' => 'videoblog', //name of theme which is enabled + + 'maxScanDirLevels' => 4, //max directory levels to scan + 'default_layout' => 'main', //default layout + 'error_layout' => 'error', //exception layout, show error title and content + + //for debug, log directory: ../runtime/logs/ + 'debug' => true, + + //视频皮肤配置 + 'videoblog' => array( + 'imageHeight' => 180, //图片高度,单位:px + 'contact' => 'FileSite视频网站订制联系:FileSite.io', + ), + + //目前支持的皮肤 + 'allowedThemes' => array( + 'manual', + 'webdirectory', + 'googleimage', + 'videoblog', + ), + + //md5加密前缀 + 'md5Prefix' => 'some_code_here', + + //后台管理相关配置 + 'admin' => array( + 'username' => 'filesite', + 'password' => '88888888', + 'captcha' => true, //后台登陆是否开启验证码 + + 'maxUploadFileSize' => 20, //单位:Mb + 'allowedUploadFileTypes' => array( + 'image/jpeg', + 'image/png', + 'image/webp', + 'image/gif', + ), + ), + +); + +//自定义配置支持 +$customConfigFile = __DIR__ . '/../runtime/custom_config.json'; +if (file_exists($customConfigFile)) { + try { + $json = file_get_contents($customConfigFile); + $customConfigs = json_decode($json, true); + $configs = array_merge($configs, $customConfigs); + }catch(Exception $e) {} +} + +return $configs; diff --git a/conf/template_webdirectory.php b/conf/template_webdirectory.php index 9189a75..359eeb6 100644 --- a/conf/template_webdirectory.php +++ b/conf/template_webdirectory.php @@ -1,32 +1,57 @@ 'Asia/Shanghai', //timezone - //文档站皮肤 - //'content_directory' => 'content/', //directory of contents in /www/ - //when it's empty, use layout and views in directory views/ - //'theme' => 'manual', //name of theme which is enabled - //导航站皮肤 'content_directory' => 'navs/', //directory of contents in /www/ 'theme' => 'webdirectory', - //图片站皮肤 - //'content_directory' => 'girls/', //directory of contents in /www/ - //'theme' => 'googleimage', //name of theme which is enabled - + 'maxScanDirLevels' => 4, //max directory levels to scan 'default_layout' => 'main', //default layout 'error_layout' => 'error', //exception layout, show error title and content //for debug, log directory: ../runtime/logs/ - 'debug' => false, + 'debug' => true, + + //目前支持的皮肤 + 'allowedThemes' => array( + 'manual', + 'webdirectory', + 'googleimage', + 'videoblog', + ), + + //md5加密前缀 + 'md5Prefix' => 'some_code_here', + + //后台管理相关配置 + 'admin' => array( + 'username' => 'filesite', + 'password' => '88888888', + 'captcha' => true, //后台登陆是否开启验证码 + + 'maxUploadFileSize' => 20, //单位:Mb + 'allowedUploadFileTypes' => array( + 'image/jpeg', + 'image/png', + 'image/webp', + 'image/gif', + ), + ), - //for themes - //'googleimage' => array( - // 'imageHeight' => 350, //图片高度,单位:px - // 'contact' => 'FileSite图片网站订制联系:FileSite.io', - //), ); + +//自定义配置支持 +$customConfigFile = __DIR__ . '/../runtime/custom_config.json'; +if (file_exists($customConfigFile)) { + try { + $json = file_get_contents($customConfigFile); + $customConfigs = json_decode($json, true); + $configs = array_merge($configs, $customConfigs); + }catch(Exception $e) {} +} + +return $configs; diff --git a/docker_build.sh b/docker_build.sh new file mode 100755 index 0000000..bf375b7 --- /dev/null +++ b/docker_build.sh @@ -0,0 +1,5 @@ +#!/bin/sh +docker stop machete +docker rm machete +docker rmi filesite/machete +docker build --no-cache -t filesite/machete .