add customization of copyright text

This commit is contained in:
printempw 2016-08-15 22:07:59 +08:00
parent 98edbc1d96
commit bd450ac8d0
6 changed files with 16 additions and 8 deletions

View File

@ -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 '<div class="callout callout-success">设置已保存。</div>';
} ?>
<table class="table">
@ -119,10 +120,17 @@
</td>
<td class="value">
<label for="show_footer_copyright">
<input <?php echo (Option::get('show_footer_copyright') == '1') ? 'checked="true"' : ''; ?> type="checkbox" id="show_footer_copyright" name="show_footer_copyright" value="1"> 显示页面右下角的版权信息
<input {{ (Option::get('show_footer_copyright') == '1') ? 'checked="true"' : '' }} type="checkbox" id="show_footer_copyright" name="show_footer_copyright" value="1"> 显示页面右下角的版权信息
</label>
</td>
</tr>
<tr>
<td class="key">版权文字</td>
<td class="value">
<textarea class="form-control" rows="4" name="copyright_text">{{ Option::get('copyright_text') }}</textarea>
<p class="description">自定义版权文字内可使用占位符,<code>{site_name}</code> 将会被自动替换为站点名称,<code>{site_url}</code> 会被替换为站点地址。</p>
</td>
</tr>
</tbody>
</table>
</div><!-- /.box-body -->

View File

@ -121,7 +121,7 @@
</div>
@endif
<!-- Default to the left -->
<strong>Copyright &copy; 2016 <a href="{{ Option::get('site_url') }}">{{ Option::get('site_name') }}</a>.</strong> All rights reserved.
{!! Utils::getStringReplaced(Option::get('copyright_text'), ['{site_name}' => Option::get('site_name'), '{site_url}' => Option::get('site_url')]) !!}
</footer>
</div><!-- ./wrapper -->

View File

@ -105,7 +105,7 @@
<!-- Main Footer -->
<footer class="main-footer">
<div class="container text-center">
Copyright &copy; 2016 <a href="{{ Option::get('site_url') }}">{{ Option::get('site_name') }}</a>. All rights reserved.
{!! Utils::getStringReplaced(Option::get('copyright_text'), ['{site_name}' => Option::get('site_name'), '{site_url}' => Option::get('site_url')]) !!}
</div>
</footer>

View File

@ -132,7 +132,7 @@
</div>
@endif
<!-- Default to the left -->
<strong>Copyright &copy; 2016 <a href="{{ Option::get('site_url') }}">{{ Option::get('site_name') }}</a>.</strong> All rights reserved.
{!! Utils::getStringReplaced(Option::get('copyright_text'), ['{site_name}' => Option::get('site_name'), '{site_url}' => Option::get('site_url')]) !!}
</div>
</footer>

View File

@ -122,7 +122,7 @@
</div>
@endif
<!-- Default to the left -->
<strong>Copyright &copy; 2016 <a href="{{ Option::get('site_url') }}">{{ Option::get('site_name') }}</a>.</strong> All rights reserved.
{!! Utils::getStringReplaced(Option::get('copyright_text'), ['{site_name}' => Option::get('site_name'), '{site_url}' => Option::get('site_url')]) !!}
</footer>
</div><!-- ./wrapper -->

View File

@ -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' => '<strong>Copyright &copy; 2016 <a href="{site_url}">{site_name}</a>.</strong> All rights reserved.'
];