diff --git a/resources/views/admin/customize.tpl b/resources/views/admin/customize.tpl index c2bdc479..0186dde7 100644 --- a/resources/views/admin/customize.tpl +++ b/resources/views/admin/customize.tpl @@ -103,6 +103,7 @@ Option::set('home_pic_url', $_POST['home_pic_url']); Option::set('show_footer_copyright', $_POST['show_footer_copyright']); + Option::set('copyright_text', $_POST['copyright_text']); echo '
设置已保存。
'; } ?> @@ -119,10 +120,17 @@ + + + +
版权文字 + +

自定义版权文字内可使用占位符,{site_name} 将会被自动替换为站点名称,{site_url} 会被替换为站点地址。

+
diff --git a/resources/views/admin/master.tpl b/resources/views/admin/master.tpl index 296dd70e..803a8fb2 100644 --- a/resources/views/admin/master.tpl +++ b/resources/views/admin/master.tpl @@ -121,7 +121,7 @@ @endif - Copyright © 2016 {{ Option::get('site_name') }}. All rights reserved. + {!! Utils::getStringReplaced(Option::get('copyright_text'), ['{site_name}' => Option::get('site_name'), '{site_url}' => Option::get('site_url')]) !!} diff --git a/resources/views/index.tpl b/resources/views/index.tpl index 8fc762ab..ca638bd1 100644 --- a/resources/views/index.tpl +++ b/resources/views/index.tpl @@ -105,7 +105,7 @@ diff --git a/resources/views/skinlib/master.tpl b/resources/views/skinlib/master.tpl index 37547038..ec578b85 100644 --- a/resources/views/skinlib/master.tpl +++ b/resources/views/skinlib/master.tpl @@ -132,7 +132,7 @@ @endif - Copyright © 2016 {{ Option::get('site_name') }}. All rights reserved. + {!! Utils::getStringReplaced(Option::get('copyright_text'), ['{site_name}' => Option::get('site_name'), '{site_url}' => Option::get('site_url')]) !!} diff --git a/resources/views/user/master.tpl b/resources/views/user/master.tpl index e1912d15..ad83cae9 100644 --- a/resources/views/user/master.tpl +++ b/resources/views/user/master.tpl @@ -122,7 +122,7 @@ @endif - Copyright © 2016 {{ Option::get('site_name') }}. All rights reserved. + {!! Utils::getStringReplaced(Option::get('copyright_text'), ['{site_name}' => Option::get('site_name'), '{site_url}' => Option::get('site_url')]) !!} diff --git a/setup/options.php b/setup/options.php index 02420f62..daab4d7a 100644 --- a/setup/options.php +++ b/setup/options.php @@ -3,7 +3,7 @@ * @Author: printempw * @Date: 2016-07-29 11:53:11 * @Last Modified by: printempw - * @Last Modified time: 2016-08-13 23:02:04 + * @Last Modified time: 2016-08-15 22:09:17 */ return [ @@ -18,7 +18,6 @@ return [ 'home_pic_url' => './assets/images/bg.jpg', 'custom_css' => '', 'custom_js' => '', - 'update_url' => 'https://work.prinzeugen.net/update.json', 'allow_chinese_playername' => '1', 'show_footer_copyright' => '1', 'comment_script' => '', @@ -32,5 +31,6 @@ return [ 'avatar_query_string' => '0', 'version' => '', 'check_update' => '1', - 'update_source' => 'github' + 'update_source' => 'github', + 'copyright_text' => 'Copyright © 2016 {site_name}. All rights reserved.' ];