增加底部链接显示选项

This commit is contained in:
Skywt2003 2021-08-10 22:07:19 +08:00
parent 3cf771d7c0
commit bd95789569
3 changed files with 20 additions and 13 deletions

View File

@ -18,17 +18,19 @@
<hr>
<div class="text-center">
<p>
<?php if ($this->options->nisInfo != "") {?>
<?php if ($this->options->nisInfo != ""): ?>
<a id="nis" href="http://www.beian.gov.cn/portal/registerSystemInfo?recordcode=<?php echo mb_substr($this->options->nisInfo, 5, 14) ?>" target="_blank">
<?php echo $this->options->nisInfo ?>
</a> | <?php } ?>
<?php if ($this->options->icpInfo != "") {?>
<a href="https://beian.miit.gov.cn/" target="_blank"><?php echo $this->options->icpInfo ?></a> | <?php } ?>
<a href="<?php $this->options->siteUrl();?>sitemap.xml">Sitemap</a> |
<a href="<?php $this->options->siteUrl();?>links">Links</a>
</a> | <?php endif; ?>
<?php if ($this->options->icpInfo != ""): ?>
<a href="https://beian.miit.gov.cn/" target="_blank"><?php echo $this->options->icpInfo ?></a>
<?php endif; ?>
<?php if ($this->options->bottomLinks != ""): ?>
<?php Links_Plugin::output($pattern=' | <a href="{url}" title="{title}" target="_blank">{name}</a>', $links_num=0, $sort=$this->options->bottomLinks); ?>
<?php endif; ?>
</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>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://github.com/Skywt2003/sky">Sky</a> by <a href="https://skywt.cn/">SkyWT</a></p>
</div>
</div>
</footer><!-- end #footer -->

View File

@ -18,6 +18,9 @@ function themeConfig($form) {
$notification = new Typecho_Widget_Helper_Form_Element_Text('notification', NULL, NULL, _t('网站公告'), _t('显示在首页,留空则不显示'));
$form->addInput($notification);
$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);
$oldPosts = new Typecho_Widget_Helper_Form_Element_Radio('oldPosts',
array('able' => _t('启用'),
'disable' => _t('禁用'),

View File

@ -105,14 +105,16 @@ $this->need('functions.php'); // 不知道为啥,似乎模版页面不会自
<hr>
<div class="text-center">
<p>
<?php if ($this->options->nisInfo != "") {?>
<?php if ($this->options->nisInfo != ""): ?>
<a id="nis" href="http://www.beian.gov.cn/portal/registerSystemInfo?recordcode=<?php echo mb_substr($this->options->nisInfo, 5, 14) ?>" target="_blank">
<?php echo $this->options->nisInfo ?>
</a> | <?php } ?>
<?php if ($this->options->icpInfo != "") {?>
<a href="https://beian.miit.gov.cn/" target="_blank"><?php echo $this->options->icpInfo ?></a> | <?php } ?>
<a href="<?php $this->options->siteUrl();?>sitemap.xml">Sitemap</a> |
<a href="<?php $this->options->siteUrl();?>links">Links</a>
</a> | <?php endif; ?>
<?php if ($this->options->icpInfo != ""): ?>
<a href="https://beian.miit.gov.cn/" target="_blank"><?php echo $this->options->icpInfo ?></a>
<?php endif; ?>
<?php if ($this->options->bottomLinks != ""): ?>
<?php Links_Plugin::output($pattern=' | <a href="{url}" title="{title}" target="_blank">{name}</a>', $links_num=0, $sort=$this->options->bottomLinks); ?>
<?php endif; ?>
</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>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>