From 7c970774e9b92cc9cd8aabc01edfebc31d8f30ec Mon Sep 17 00:00:00 2001 From: outtime Date: Thu, 19 Dec 2019 09:50:45 +0800 Subject: =?UTF-8?q?=F0=9F=8E=82Perf=EF=BC=9A=E6=9B=B4=E6=94=B9=E8=AE=BE?= =?UTF-8?q?=E7=BD=AE=E9=A1=B5=E6=96=87=E6=A1=88=EF=BC=8C=E9=A1=BA=E5=B8=A6?= =?UTF-8?q?=E8=AF=95=E4=B8=80=E4=B8=8B=E6=96=B0=E5=BC=80=E5=8F=91=E7=8E=AF?= =?UTF-8?q?=E5=A2=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- libs/Options.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'libs') diff --git a/libs/Options.php b/libs/Options.php index bbc93bb..e876a46 100644 --- a/libs/Options.php +++ b/libs/Options.php @@ -16,14 +16,14 @@ function themeConfig($form) { if($db->fetchRow($db->select()->from ('table.options')->where ('name = ?', 'theme:MiraclesBackup'))){ $update = $db->update('table.options')->rows(array('value'=>$ysj))->where('name = ?', 'theme:MiraclesBackup'); $updateRows= $db->query($update); - echo '
备份已更新,请等待自动刷新!如果等不到请点击'; + echo '
备份已更新,即将自动刷新。如过您的浏览器没有自动跳转请点击'; ?>这里
insert('table.options') ->rows(array('name' => 'theme:MiraclesBackup','user' => '0','value' => $ysj)); $insertId = $db->query($insert); - echo '
备份完成,请等待自动刷新!如果等不到请点击'; + echo '
备份完成,即将自动刷新。如过您的浏览器没有自动跳转请点击'; ?>这里
update('table.options')->rows(array('value'=>$bsj))->where('name = ?', 'theme:Miracles'); $updateRows= $db->query($update); - echo '
检测到模板备份数据,恢复完成,请等待自动刷新!如果等不到请点击'; + echo '
检测到模板备份数据,恢复完成,即将自动刷新。如过您的浏览器没有自动跳转请点击'; ?>这里
Date: Thu, 19 Dec 2019 10:47:08 +0800 Subject: =?UTF-8?q?=F0=9F=A7=B6Add=EF=BC=9A=E6=96=B0=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E8=BD=BD=E5=8A=A8=E7=94=BB=E8=AE=BE=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- libs/Options.php | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) (limited to 'libs') diff --git a/libs/Options.php b/libs/Options.php index e876a46..a94d509 100644 --- a/libs/Options.php +++ b/libs/Options.php @@ -58,9 +58,10 @@ function themeConfig($form) { /** * 设置样式+面板 */ - $ver = themeVersion(); + $ver = themeVersion(); + $themeDir = "/usr/themes/Miracles/"; - echo ''; + echo ''; echo '

Miracles 主题设置面板

欢迎使用 Miracles 主题,目前版本是:'. $ver .'
@@ -77,7 +78,7 @@ function themeConfig($form) { * 设置项 */ //首要设置项 - $news = new Typecho_Widget_Helper_Form_Element_Text('news', NULL, NULL, _t('

首要设置 First

全站公告'), _t('输入公告内容,用户进入站点时自动弹出')); + $news = new Typecho_Widget_Helper_Form_Element_Text('news', NULL, NULL, _t('

首要设置

全站公告'), _t('输入公告内容,用户进入站点时自动弹出')); $form->addInput($news); //nav @@ -99,7 +100,7 @@ function themeConfig($form) { $form->addInput($bannerTitle); $bannerIntro = new Typecho_Widget_Helper_Form_Element_Text('bannerIntro', NULL, NULL, _t('介绍'), _t('这里是首页大图标题下的简介
')); $form->addInput($bannerIntro); - + //pjax $pjax = new Typecho_Widget_Helper_Form_Element_Select('pjax',array('0'=>'关闭','1'=>'开启'),'1','

Pjax 预加载

是否开启','Pjax 预加载功能的开关'); $form->addInput($pjax); @@ -117,7 +118,16 @@ function themeConfig($form) { $form->addInput($grayTheme); $bodyFonts = new Typecho_Widget_Helper_Form_Element_Select('bodyFonts',array('0'=>'无衬线字体','1'=>'衬线字体'),'0','网站字体','选择网站的字体,无衬线字体即“思源黑体”,衬线字体即“思源宋体”'); $form->addInput($bodyFonts); - + + //LoadingImage + $LoadingOptions = [ + 'block' => "方块:", + 'octopus' => "旋转章鱼:", + 'bilibili' => "哔哩哔哩小电视:" + ]; + $LoadingImage = new Typecho_Widget_Helper_Form_Element_Radio('loading_image', $LoadingOptions, 'block', _t('选择图片加载动画'),_t("
")); + $form->addInput($LoadingImage); + //developer $headerEcho = new Typecho_Widget_Helper_Form_Element_Textarea('headerEcho', NULL, NULL, _t('

开发者设置

自定义头部信息'), _t('填写 html 代码,将输出在 <head> 标签中')); $form->addInput($headerEcho); -- cgit v1.2.3 From 467366b3788943eefbbd0c18fabbe23ac5692376 Mon Sep 17 00:00:00 2001 From: outtime Date: Thu, 19 Dec 2019 13:48:42 +0800 Subject: =?UTF-8?q?=F0=9F=8D=ADAdd=EF=BC=9A=E6=B7=BB=E5=8A=A0=E8=B9=A6?= =?UTF-8?q?=E8=B7=B6=E7=9A=84=E9=A2=9C=E6=96=87=E5=AD=97=E4=B8=8E=E5=BB=BA?= =?UTF-8?q?=E7=AB=99=E6=97=B6=E9=97=B4=E9=A1=B9=EF=BC=8C=E5=90=8C=E6=97=B6?= =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=BA=86=E9=83=A8=E5=88=86=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- libs/Options.php | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'libs') diff --git a/libs/Options.php b/libs/Options.php index a94d509..cc305df 100644 --- a/libs/Options.php +++ b/libs/Options.php @@ -127,11 +127,18 @@ function themeConfig($form) { ]; $LoadingImage = new Typecho_Widget_Helper_Form_Element_Radio('loading_image', $LoadingOptions, 'block', _t('选择图片加载动画'),_t("
")); $form->addInput($LoadingImage); - + + //SiteBuildTime + $buildTime = new Typecho_Widget_Helper_Form_Element_Text('build_time', NULL, NULL, _t('在页脚输出建站至今时间'), _t('填写格式如2020-01-01的时间,将输出在站点信息之前,不想开启请留空。')); + $form->addInput($buildTime); + //AnimeFace + $AnimeFace = new Typecho_Widget_Helper_Form_Element_Text('anime_face', NULL, NULL, _t('在其之后输出一个蹦跶的颜文字'), _t('如果开启了建站时间将会输出在其之后,反之会输出在站点信息之后。在此写上你想展示的颜文字,多个颜文字用"&&"分割,每次刷新更换。如不想开启请留空。')); + $form->addInput($AnimeFace); + //developer - $headerEcho = new Typecho_Widget_Helper_Form_Element_Textarea('headerEcho', NULL, NULL, _t('

开发者设置

自定义头部信息'), _t('填写 html 代码,将输出在 <head> 标签中')); + $headerEcho = new Typecho_Widget_Helper_Form_Element_Textarea('headerEcho', NULL, NULL, _t('

开发者设置

自定义头部信息'), _t('填写 html 代码,将输出在 <head> 标签中,可以在这里写上统计代码')); $form->addInput($headerEcho); - $footerEcho = new Typecho_Widget_Helper_Form_Element_Textarea('footerEcho', NULL, NULL, _t('自定义页脚部信息'), _t('填写 html 代码,将输出在页脚的版权信息后')); + $footerEcho = new Typecho_Widget_Helper_Form_Element_Textarea('footerEcho', NULL, NULL, _t('自定义页脚部信息'), _t('填写 html 代码,将输出在页脚的版权信息之前')); $form->addInput($footerEcho); $cssEcho = new Typecho_Widget_Helper_Form_Element_Textarea('cssEcho', NULL, NULL, _t('自定义 CSS'), _t('填写 CSS 代码,输出在 head 标签结束之前的 style 标签内')); $form->addInput($cssEcho); -- cgit v1.2.3 From 01ada4a59c47a49991594599353c1e68a1c12bf4 Mon Sep 17 00:00:00 2001 From: outtime Date: Thu, 19 Dec 2019 17:37:49 +0800 Subject: =?UTF-8?q?=F0=9F=91=A7Add=EF=BC=9A=E6=B7=BB=E5=8A=A0=E4=B8=80?= =?UTF-8?q?=E6=9E=9A=E5=B0=91=E5=A5=B3=E5=88=B0=E6=9C=AC=E9=A1=B9=E7=9B=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- libs/Options.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) mode change 100644 => 100755 libs/Options.php (limited to 'libs') diff --git a/libs/Options.php b/libs/Options.php old mode 100644 new mode 100755 index cc305df..8472fa5 --- a/libs/Options.php +++ b/libs/Options.php @@ -123,7 +123,8 @@ function themeConfig($form) { $LoadingOptions = [ 'block' => "方块:", 'octopus' => "旋转章鱼:", - 'bilibili' => "哔哩哔哩小电视:" + 'bilibili' => "哔哩哔哩小电视:", + 'shojo' => "少女祈祷中:" ]; $LoadingImage = new Typecho_Widget_Helper_Form_Element_Radio('loading_image', $LoadingOptions, 'block', _t('选择图片加载动画'),_t("
")); $form->addInput($LoadingImage); -- cgit v1.2.3 From 47d59395cdc631fed379b8dd638f54861c6627ed Mon Sep 17 00:00:00 2001 From: outtime Date: Fri, 20 Dec 2019 07:52:24 +0800 Subject: =?UTF-8?q?=F0=9F=98=8EFix=EF=BC=9A=E4=BF=AE=E6=AD=A3=E6=96=87?= =?UTF-8?q?=E7=AB=A0=E9=A1=B5=E9=9D=A2=E6=9C=AA=E5=B8=A6=E4=B8=8A=E5=8A=A0?= =?UTF-8?q?=E8=BD=BD=E5=9B=BE=E7=89=87=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- libs/Contents.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libs') diff --git a/libs/Contents.php b/libs/Contents.php index d9c5ddc..7904603 100644 --- a/libs/Contents.php +++ b/libs/Contents.php @@ -20,7 +20,7 @@ class Contents //FancyBox $text = preg_replace('//s','
',$text); //LazyLoad - $text = preg_replace('//','',$text); + $text = preg_replace('//','',$text); //气泡 $text = preg_replace('/\[bubble\](.*?)\[\/bubble\]/s','

${1}

',$text); -- cgit v1.2.3 From f145340482111518f91e0ffce7fb2ea1b4964ef5 Mon Sep 17 00:00:00 2001 From: outtime Date: Fri, 20 Dec 2019 09:45:34 +0800 Subject: =?UTF-8?q?=F0=9F=A4=AEFix=EF=BC=9A=E4=BF=AE=E5=A4=8D=E6=96=87?= =?UTF-8?q?=E7=AB=A0=E9=A1=B5=E5=8A=A0=E8=BD=BD=E5=9B=BE=E7=89=87=E6=97=A0?= =?UTF-8?q?=E6=B3=95=E6=98=BE=E7=A4=BA=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- libs/Contents.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'libs') diff --git a/libs/Contents.php b/libs/Contents.php index 7904603..fc8c90b 100644 --- a/libs/Contents.php +++ b/libs/Contents.php @@ -13,6 +13,10 @@ class Contents */ static public function parseContent($data, $widget, $last) { + $db=Typecho_Db::get(); + $load_image = $db->fetchAll($db->select('value')->from('table.options')->where('name = %s', "theme:Miracles")->limit(1)); + $load_image = explode("\";",explode("\"",explode("\"loading_image\";",$load_image[0]["value"],2)[1],2)[1],2)[0]; + //由于实在没找到TE获取主题配置的相关函数,故只能用这种方法,吐了。 $text = empty($last) ? $data : $last; if ($widget instanceof Widget_Archive) { //Prism 高亮 @@ -20,7 +24,7 @@ class Contents //FancyBox $text = preg_replace('//s','
',$text); //LazyLoad - $text = preg_replace('//','',$text); + $text = preg_replace('//','',$text); //气泡 $text = preg_replace('/\[bubble\](.*?)\[\/bubble\]/s','

${1}

',$text); -- cgit v1.2.3