zblog归档代码 能帮忙看看嘛
网上找了一段归档代码 调用之后缺少标签 作者写的这个我实在看着有点懵 能帮忙看看嘛
function wx_blog2_archives() { global $zbp; $output = '<div class="null-archives">'; $year=0; $mon=0; $i=0; $j=0; $articles=$zbp->GetArticleList( array('*'), array(array('=','log_Type',0),array('=','log_Status',0)), array('log_PostTime' => 'DESC'), null, null ); foreach ($articles as $article) { $year_tmp = $article->Time('Y'); $mon_tmp = $article->Time('m'); $y=$year; $m=$mon; if ($mon != $mon_tmp && $mon > 0) $output .= '</ul></li>'; if ($year != $year_tmp && $year > 0) $output .= '</ul>'; if ($year != $year_tmp) { $year = $year_tmp; $output .= '<div class="archive-list"><h2 class="year">'. $year .' 年</h2><ul class="mon_list">'; } if ($mon != $mon_tmp) { $mon = $mon_tmp; $output .= '<li> <span class="mon">'. $mon .'月</span><ul class="post_list">'; } $output .= '<li> '. $article->Time('d日: ') .'<a href="'. $article->Url .'" title="'. $article->Title .'('.$article->ViewNums.'人阅读|'.$article->CommNums.'条评论)" target="_blank">'. $article->Title .'</a></li>'; } $output .= '</ul></li></ul></div>'; $output .= '</div>'; echo $output; }
发布于:3年前 (2020-07-24) IP属地:未知
回答数量2
浏览量3K+
2 个回答
在17行</ul>后面加上</div>
发布于:3年前 (2020-07-29) IP属地:江苏省
你说标签指的是文章标签?你想怎么调用?归档为什么要文章标签?
发布于:3年前 (2020-07-24) IP属地:江苏省
这个
发布于:3年前 (2020-07-26) IP属地:北京市
就是代码中的〈div〉ul 等标签,这个写的我看着有点懵,谢谢
发布于:3年前 (2020-07-24) IP属地:北京市
我来回答
您需要 登录 后回答此问题!
中秋促销
喜迎中秋节,共圆合家梦。五折大促销,快来选购吧!