From 7d3cbffb617a64631a13c5a7b99d3227104bb564 Mon Sep 17 00:00:00 2001
From: Zisbusy <49525016+Zisbusy@users.noreply.github.com>
Date: Sat, 18 Sep 2021 16:01:07 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E8=81=9A=E7=84=A6=E5=8A=9F?=
=?UTF-8?q?=E8=83=BD=E6=95=B0=E7=BB=84=E8=B0=83=E7=94=A8=E4=B8=8D=E8=A7=84?=
=?UTF-8?q?=E8=8C=83=EF=BC=8C=E5=85=BC=E5=AE=B9=E4=B8=80=E4=BA=9B=E5=85=B6?=
=?UTF-8?q?=E4=BB=96=E7=9A=84=E7=8E=AF=E5=A2=83=E3=80=82?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
Akina/index.php | 32 +++++++++++++++++++-------------
1 file changed, 19 insertions(+), 13 deletions(-)
diff --git a/Akina/index.php b/Akina/index.php
index fc8e122..8e725fc 100644
--- a/Akina/index.php
+++ b/Akina/index.php
@@ -147,22 +147,28 @@ if($this->options->sticky){
options->featureCids, ' ', ','));
- for($i=0;$i<3;$i++){
+ // 默认数据
+ $defaultUrl = ['https://zhebk.cn/Web/Akina.html','https://zhebk.cn/Web/userAkina.html','https://zhebk.cn/archives.html'];
+ $defaultTitle = ['Akina','使用说明','文章归档'];
+ // 整理
+ $featureCid = array_filter(explode(',', strtr($this->options->featureCids, ' ', ',')));
+ // 循环输出
+ for($i=0;$i
widget('Widget_Archive@lunbo'.$i, 'pageSize=1&type=single', 'cid='.$featureCid[$i])->to($ji);
- $featureNum = $i + 1;
- if($ji->permalink != ""){
- if ($ji->fields->thumbnail){
- $featureImg = $ji->fields->thumbnail;
- } else {
- $featureImg = theurl.'images/postbg/'.$featureNum.'.jpg';
- }
- echo ''.$ji->title.'
';
+ if ($ji->fields->thumbnail){
+ $featureImg = $ji->fields->thumbnail;
} else {
- $defaultUrl = ['https://zhebk.cn/Web/Akina.html','https://zhebk.cn/Web/userAkina.html','https://zhebk.cn/archives.html'];
- $defaultTitle = ['Akina','使用说明','文章归档'];
- echo ''.$defaultTitle[$i].'
';
+ $featureImg = theurl.'images/postbg/'.$featureNum.'.jpg';
}
+ echo ''.$ji->title.'
';
+ if( $featureNum == 3 ) {
+ break;
+ }
+ }
+ for($i = count($featureCid); $i < 3; $i++) {
+ $addNum = $i + 1;
+ echo ''.$defaultTitle[$i].'
';
}
?>