diff --git a/components/footer.php b/components/footer.php index dc56b3f..471a054 100644 --- a/components/footer.php +++ b/components/footer.php @@ -19,8 +19,16 @@

+ + + options->buildYear . " - " . date("Y"); ?> © options->title(); ?> +

+

diff --git a/functions.php b/functions.php index a92b1c2..1bacdbf 100644 --- a/functions.php +++ b/functions.php @@ -134,6 +134,12 @@ function themeConfig($form) $icpUrl = new Typecho_Widget_Helper_Form_Element_Text('icpUrl', null, 'https://beian.miit.gov.cn', _t('备案号指向链接'), _t('默认指向工信部')); $form->addInput($icpUrl); + $beian = new Typecho_Widget_Helper_Form_Element_Text('beian', null, null, _t('公安备案号'), _t('没有可以不填哟')); + $form->addInput($beian); + + $beianUrl = new Typecho_Widget_Helper_Form_Element_Text('beianUrl', null, 'http://www.beian.gov.cn', _t('公安备案号指向链接'), _t('默认指向公安部')); + $form->addInput($beianUrl); + $background = new Typecho_Widget_Helper_Form_Element_Text('background', null, null, _t('背景图片'), _t('可填颜色代码或者图片url')); $form->addInput($background); diff --git a/libs/G.class.php b/libs/G.class.php index 2c58a3a..1fd35e0 100644 --- a/libs/G.class.php +++ b/libs/G.class.php @@ -29,6 +29,7 @@ class G 'defaultBanner' => '', 'buildYear' => '', 'icp' => '', + 'beian' => '', 'defaultArticlePath' => '', 'enableIndexPage' => '', 'advanceSetting' => '', @@ -186,6 +187,22 @@ public static function getICP() return '还没有备案噢'; } + /** + * 获取公安备案号 + * + * @return String + */ + public static function getBeiAn() + { + if (Helper::options()->beian != '') + return Helper::options()->beian; + if (isset(self::$advanceConfig["customBeiAn"])) + return self::$advanceConfig["customBeiAn"]; + return '还没有备案噢'; + } + + + /** * 获取赞助按钮文字 *