diff --git a/conf/app.php b/conf/app.php index 6916ea4..b2568c1 100644 --- a/conf/app.php +++ b/conf/app.php @@ -5,6 +5,7 @@ $configs = array( 'version' => '0.1.0', 'default_timezone' => 'Asia/Shanghai', //timezone + 'site_name' => 'FileSite.io - 无数据库、基于文件和目录的Markdown文档、网址导航、图书、图片、视频网站PHP开源系统', //文档站皮肤 //'content_directory' => 'content/', //directory of contents in /www/ diff --git a/themes/videoblog/controller/ListController.php b/themes/videoblog/controller/ListController.php index 0874b30..cae0e21 100644 --- a/themes/videoblog/controller/ListController.php +++ b/themes/videoblog/controller/ListController.php @@ -58,11 +58,11 @@ Class ListController extends Controller { $htmlCateReadme = $scanner->fixMDUrls($cateReadmeFile['realpath'], $htmlCateReadme); } - $pageTitle = !empty($titles) ? $titles[0]['name'] : "FileSite.io - 无数据库、基于文件和目录的Markdown文档、网址导航、图书、图片、视频网站PHP开源系统"; + $pageTitle = $defaultTitle = !empty($titles) ? $titles[0]['name'] : FSC::$app['config']['site_name']; if (!empty($subcate)) { - $pageTitle = "{$subcate['directory']}的照片,来自{$pageTitle}"; + $pageTitle = "{$subcate['directory']}相关视频,来自{$defaultTitle}"; if (!empty($subcate['title'])) { - $pageTitle = $subcate['title']; + $pageTitle = "{$subcate['title']},来自{$defaultTitle}"; } } $viewName = '//site/index'; //共享视图 diff --git a/themes/videoblog/controller/SiteController.php b/themes/videoblog/controller/SiteController.php index 04494e5..af0dd0e 100644 --- a/themes/videoblog/controller/SiteController.php +++ b/themes/videoblog/controller/SiteController.php @@ -59,15 +59,12 @@ Class SiteController extends Controller { } - - - - $pageTitle = !empty($titles) ? $titles[0]['name'] : "FileSite.io - 无数据库、基于文件和目录的Markdown文档、网址导航、图书、图片、视频网站PHP开源系统"; + $pageTitle = $defaultTitle = !empty($titles) ? $titles[0]['name'] : FSC::$app['config']['site_name']; if (!empty($readmeFile['title'])) { - $pageTitle = $readmeFile['title']; + $pageTitle = "{$readmeFile['title']},来自{$defaultTitle}"; } if (!empty($subcate)) { - $pageTitle = "{$subcate['directory']},来自{$pageTitle}"; + $pageTitle = "{$subcate['directory']},来自{$defaultTitle}"; } $viewName = 'index'; $params = compact('cateId', 'dirTree', 'scanResults', 'menus', 'htmlReadme', 'htmlCateReadme'); diff --git a/themes/videoblog/controller/ViewController.php b/themes/videoblog/controller/ViewController.php index 54b95fc..6d96552 100644 --- a/themes/videoblog/controller/ViewController.php +++ b/themes/videoblog/controller/ViewController.php @@ -52,11 +52,11 @@ Class ViewController extends ListController { $htmlCateReadme = $scanner->fixMDUrls($cateReadmeFile['realpath'], $htmlCateReadme); } - $pageTitle = !empty($titles) ? $titles[0]['name'] : "FileSite.io - 无数据库、基于文件和目录的Markdown文档、网址导航、图书、图片、视频网站PHP开源系统"; + $pageTitle = $defaultTitle = !empty($titles) ? $titles[0]['name'] : FSC::$app['config']['site_name']; if (!empty($video)) { - $pageTitle = "{$video['directory']},来自{$pageTitle}"; + $pageTitle = "{$video['filename']},来自{$defaultTitle}"; if (!empty($video['title'])) { - $pageTitle = $video['title']; + $pageTitle = "{$video['title']},来自{$defaultTitle}"; } } $viewName = 'index';