添加头部和页脚添加代码的配置项

This commit is contained in:
Skywt2003 2021-11-19 16:38:23 +08:00
parent e4bd872b6d
commit 7ed0abc99f
4 changed files with 12 additions and 0 deletions

View File

@ -65,6 +65,7 @@
<!-- <p>&copy; <?php #echo date('Y');?> <?php #$this->options->title(); ?> ♥ <?php #Typecho_Widget::widget('Widget_Stat')->to($stat); ?><?php #$stat->publishedPostsNum() ?> Posts <?php #allOfCharacters();?> Words crafted</p> --> <!-- <p>&copy; <?php #echo date('Y');?> <?php #$this->options->title(); ?> ♥ <?php #Typecho_Widget::widget('Widget_Stat')->to($stat); ?><?php #$stat->publishedPostsNum() ?> Posts <?php #allOfCharacters();?> Words crafted</p> -->
<p>&copy; <?php echo date('Y');?> <?php $this->options->title(); ?> <i class="fas fa-heart text-danger"></i> <?php Typecho_Widget::widget('Widget_Stat')->to($stat); ?><?php $stat->publishedPostsNum() ?> Posts <?php allOfCharacters();?> Words crafted</p> <p>&copy; <?php echo date('Y');?> <?php $this->options->title(); ?> <i class="fas fa-heart text-danger"></i> <?php Typecho_Widget::widget('Widget_Stat')->to($stat); ?><?php $stat->publishedPostsNum() ?> Posts <?php allOfCharacters();?> Words crafted</p>
<p>Powered by <a href="https://www.typecho.org">Typecho</a> | Theme <a href="https://github.com/Skywt2003/sky">Sky</a> by <a href="https://skywt.cn/">SkyWT</a></p> <p>Powered by <a href="https://www.typecho.org">Typecho</a> | Theme <a href="https://github.com/Skywt2003/sky">Sky</a> by <a href="https://skywt.cn/">SkyWT</a></p>
<?php $this->options->footerCode(); ?>
</div> </div>
</div> </div>
</footer><!-- end #footer --> </footer><!-- end #footer -->

View File

@ -27,6 +27,12 @@ function themeConfig($form) {
$bottomLinks = new Typecho_Widget_Helper_Form_Element_Text('bottomLinks', NULL, NULL, _t('底部链接'), _t('(需要配合<a href="http://www.imhan.com/archives/typecho-links/" target="_blank">友情链接插件</a>使用)网站底部的链接分类名称')); $bottomLinks = new Typecho_Widget_Helper_Form_Element_Text('bottomLinks', NULL, NULL, _t('底部链接'), _t('(需要配合<a href="http://www.imhan.com/archives/typecho-links/" target="_blank">友情链接插件</a>使用)网站底部的链接分类名称'));
$form->addInput($bottomLinks); $form->addInput($bottomLinks);
$headerCode = new Typecho_Widget_Helper_Form_Element_Textarea('headerCode', NULL, NULL, _t('头部代码'), _t('在头部添加的代码'));
$form->addInput($headerCode);
$footerCode = new Typecho_Widget_Helper_Form_Element_Textarea('footerCode', NULL, NULL, _t('页脚代码'), _t('在页脚添加的代码'));
$form->addInput($footerCode);
$oldPosts = new Typecho_Widget_Helper_Form_Element_Radio('oldPosts', $oldPosts = new Typecho_Widget_Helper_Form_Element_Radio('oldPosts',
array('able' => _t('启用'), array('able' => _t('启用'),
'disable' => _t('禁用'), 'disable' => _t('禁用'),

View File

@ -48,6 +48,8 @@
<!-- KaTeX css via jsDelivr--> <!-- KaTeX css via jsDelivr-->
<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/katex@latest/dist/katex.min.css"> <link rel="stylesheet" href="//cdn.jsdelivr.net/npm/katex@latest/dist/katex.min.css">
<?php $this->options->headerCode(); ?>
<?php $this->header(); ?> <?php $this->header(); ?>
</head> </head>
<!--[if lt IE 8]> <!--[if lt IE 8]>

View File

@ -52,6 +52,8 @@ $this->need('functions.php'); // 不知道为啥,似乎模版页面不会自
<!-- KaTeX css via jsDelivr--> <!-- KaTeX css via jsDelivr-->
<!-- <link rel="stylesheet" href="//cdn.jsdelivr.net/npm/katex@latest/dist/katex.min.css"> --> <!-- <link rel="stylesheet" href="//cdn.jsdelivr.net/npm/katex@latest/dist/katex.min.css"> -->
<?php $this->options->headerCode(); ?>
<?php $this->header(); ?> <?php $this->header(); ?>
</head> </head>
<!--[if lt IE 8]> <!--[if lt IE 8]>
@ -169,6 +171,7 @@ $this->need('functions.php'); // 不知道为啥,似乎模版页面不会自
<!-- <p>&copy; <?php #echo date('Y');?> <?php #$this->options->title(); ?> ♥ <?php #Typecho_Widget::widget('Widget_Stat')->to($stat); ?><?php #$stat->publishedPostsNum() ?> Posts <?php #allOfCharacters();?> Words crafted</p> --> <!-- <p>&copy; <?php #echo date('Y');?> <?php #$this->options->title(); ?> ♥ <?php #Typecho_Widget::widget('Widget_Stat')->to($stat); ?><?php #$stat->publishedPostsNum() ?> Posts <?php #allOfCharacters();?> Words crafted</p> -->
<p>&copy; <?php echo date('Y');?> <?php $this->options->title(); ?> <i class="fas fa-heart text-danger"></i> <?php Typecho_Widget::widget('Widget_Stat')->to($stat); ?><?php $stat->publishedPostsNum() ?> Posts <?php allOfCharacters();?> Words crafted</p> <p>&copy; <?php echo date('Y');?> <?php $this->options->title(); ?> <i class="fas fa-heart text-danger"></i> <?php Typecho_Widget::widget('Widget_Stat')->to($stat); ?><?php $stat->publishedPostsNum() ?> Posts <?php allOfCharacters();?> Words crafted</p>
<p>Powered by <a href="https://www.typecho.org">Typecho</a> | Theme <a href="https://skywt.cn/sky-theme">Sky</a> by <a href="https://skywt.cn/">SkyWT</a></p> <p>Powered by <a href="https://www.typecho.org">Typecho</a> | Theme <a href="https://skywt.cn/sky-theme">Sky</a> by <a href="https://skywt.cn/">SkyWT</a></p>
<?php $this->options->footerCode(); ?>
</div> </div>
</div> </div>
</footer><!-- end #footer --> </footer><!-- end #footer -->