From cd7f95a2db2c2d2ab8bfafd96f8c8d7e5469d507 Mon Sep 17 00:00:00 2001 From: filesite Date: Mon, 15 Jul 2024 12:27:19 +0800 Subject: [PATCH] sitename, copyright support txt config file --- themes/beauty/controller/SiteController.php | 9 +++++++- themes/beauty/views/layout/main.php | 8 ++++++- themes/beauty/views/site/index.php | 2 +- www/girls/README.md | 24 +++++++++++++++++++++ 4 files changed, 40 insertions(+), 3 deletions(-) diff --git a/themes/beauty/controller/SiteController.php b/themes/beauty/controller/SiteController.php index 217937c..d977cfb 100644 --- a/themes/beauty/controller/SiteController.php +++ b/themes/beauty/controller/SiteController.php @@ -122,10 +122,17 @@ Class SiteController extends Controller { if (!empty($subcate)) { $pageTitle = "{$subcate['directory']}照片,来自{$pageTitle}"; } + + //底部版权申明配置支持 + $copyright = ''; + if (!empty($readmeFile['copyright'])) { + $copyright = $readmeFile['copyright']; + } + $viewName = 'index'; $params = compact( 'page', 'pageSize', 'cacheDataId', - 'dirTree', 'scanResults', 'menus', 'htmlReadme', 'htmlCateReadme', 'mp3File' + 'dirTree', 'scanResults', 'menus', 'htmlReadme', 'htmlCateReadme', 'mp3File', 'copyright' ); return $this->render($viewName, $params, $pageTitle); } diff --git a/themes/beauty/views/layout/main.php b/themes/beauty/views/layout/main.php index 238ecec..289e7aa 100644 --- a/themes/beauty/views/layout/main.php +++ b/themes/beauty/views/layout/main.php @@ -35,7 +35,12 @@ require_once __DIR__ . '/../../../../plugins/Html.php';

用手机扫码打开

-

+

diff --git a/themes/beauty/views/site/index.php b/themes/beauty/views/site/index.php index 40254d9..9402be7 100644 --- a/themes/beauty/views/site/index.php +++ b/themes/beauty/views/site/index.php @@ -23,7 +23,7 @@ $supportedExts = array_merge($imgExts, $videoExts); - 家庭相册 + diff --git a/www/girls/README.md b/www/girls/README.md index 098fa4b..691cdea 100644 --- a/www/girls/README.md +++ b/www/girls/README.md @@ -26,6 +26,30 @@ Machete是一款简单易用的家庭相册系统,可方便更新升级、支 * Machete交流群 + +## 网站配置 + +网站名称和底部的版权申明支持文本文件配置,在girls/目录(或你本地映射到girls/的目录)下增加以下文件: +* README_title.txt - 网站名称配置文件 +* README_copyright.txt - 版权申明配置文件 + +注意配置文件名大小写必须一致! + + +配置文件内容填写纯文本的中英文信息(支持html代码),示例: + +* README_title.txt +``` +家庭相册演示 +``` + +* README_copyright.txt +``` +©2022 - 2024 +by FileSite.io +``` + + ## 友情链接 * Ta荐 - 你的聚宝盆 \ No newline at end of file