diff --git a/archive copy.php b/archive copy.php deleted file mode 100644 index 85e831c..0000000 --- a/archive copy.php +++ /dev/null @@ -1,100 +0,0 @@ - -need('module/header.php'); ?> -highlight_category; -?> -
-

- archiveTitle(array( - 'category' => _t(' %s '), - 'search' => _t('包含关键字 %s 的文章'), - 'date' => _t('在 %s 发布的文章'), - 'tag' => _t('标签 %s 下的文章'), - 'author' => _t('作者 %s 发布的文章') - ), '', ''); ?> -

- is('category') && $this->categoryDescription()): ?> -
- categorydescription(); ?> -
- -
-
-
- have()): ?> - next()): ?> - categories; - // 检查是否为高亮分类 - $isHighlightCategory = false; - foreach ($currentCategories as $category) { - if ($category['mid'] == $highlightCategoryId) { - $isHighlightCategory = true; - break; - } - } - // 获取文章图片 - $default_thumbnail = Helper::options()->themeUrl . '/assets/images/nopic.svg'; - $firstImage = img_postthumb($this->cid); - if (empty($firstImage)) { - $firstImage = $default_thumbnail; - } - $cover = $this->fields->cover; - $imageToDisplay = $cover; - if (empty($imageToDisplay)) { - $imageToDisplay = $firstImage; - } - ?> -
- <?php $this->title() ?> -
-

- - title() ?> - -

-
- excerpt(20, '...'); ?> -
-
- - - - -
-
-
- -
- pageNav( - ' ', - ' ', - 1, - '...', - array( - 'wrapTag' => 'nav', - 'wrapClass' => 'nav-links nav-links__comment', - 'itemTag' => '', - 'textTag' => 'span', - 'itemClass' => 'page-numbers', - 'currentClass' => 'page-numbers current', - 'prevClass' => 'hidden', - 'nextClass' => 'hidden' - ) - ); ?> - -
- -
- -
-need('module/footer.php'); ?> \ No newline at end of file diff --git a/archive.php b/archive.php index ce59b7f..8cae77b 100644 --- a/archive.php +++ b/archive.php @@ -3,13 +3,11 @@ travel; - // 处理可能的情况 $travelId = is_array($travelId) ? intval(reset($travelId)) : intval($travelId); ?> -

archiveTitle(array( @@ -25,57 +23,63 @@ $travelId = is_array($travelId) categorydescription(); ?> -

+
-
have()): ?> + +
+ next()): ?> + categories, function($carry, $category) use ($travelId) { + return $carry || (intval($category['mid']) === $travelId); + }, false); + if ($istravel): + // 获取文章图片 + $default_thumbnail = Helper::options()->themeUrl . '/assets/images/nopic.svg'; + $firstImage = img_postthumb($this->cid); + if (empty($firstImage)) { + $firstImage = $default_thumbnail; + } + $cover = $this->fields->cover; + $imageToDisplay = $cover; + if (empty($imageToDisplay)) { + $imageToDisplay = $firstImage; + } + ?> +
+ <?php $this->title() ?> +
+

+ + title() ?> + +

+
+ excerpt(20, '...'); ?> +
+
+ + + + +
+
+
+ + +
+ next()): ?> categories, function($carry, $category) use ($travelId) { return $carry || (intval($category['mid']) === $travelId); }, false); - - // 获取文章图片 - $default_thumbnail = Helper::options()->themeUrl . '/assets/images/nopic.svg'; - $firstImage = img_postthumb($this->cid); - if (empty($firstImage)) { - $firstImage = $default_thumbnail; - } - $cover = $this->fields->cover; - $imageToDisplay = $cover; - if (empty($imageToDisplay)) { - $imageToDisplay = $firstImage; - } + if (!$istravel): ?> - - - - -
- <?php $this->title() ?> -
-

- - title() ?> - -

-
- excerpt(20, '...'); ?> -
-
- - - - -
-
-
- - -

@@ -108,9 +112,7 @@ $travelId = is_array($travelId)

- -
pageNav( ' ', ' ', diff --git a/functions.php b/functions.php index c0bf608..9ef7dd9 100644 --- a/functions.php +++ b/functions.php @@ -435,8 +435,8 @@ function commentApprove($widget, $email = NULL) ->from('table.comments') ->where('mail = ?', $email)); $commentNum = $commentNumSql[0]['commentNum']; - $linkSql = $db->fetchAll($db->select()->from('table.links') - ->where('user = ?',$email)); + //$linkSql = $db->fetchAll($db->select()->from('table.links') + // ->where('user = ?',$email)); if($commentNum==1){ $result['userLevel'] = '初识'; $result['bgColor'] = '#999999'; @@ -463,11 +463,11 @@ function commentApprove($widget, $email = NULL) } $userDesc = '已有'.$commentNum.'条评论'; } - if($linkSql){ - $result['userLevel'] = '博友'; - $result['bgColor'] = '#21b9bb'; - $userDesc = '🔗'.$linkSql[0]['description'].' ✌️'.$userDesc; - } + // if($linkSql){ + // $result['userLevel'] = '博友'; + // $result['bgColor'] = '#21b9bb'; + // $userDesc = '🔗'.$linkSql[0]['description'].' ✌️'.$userDesc; + // } $result['userDesc'] = $userDesc; $result['commentNum'] = $commentNum;