Browse Source

only show tags which has videos

master
filesite 7 months ago
parent
commit
0cd2eaca18
  1. 8
      themes/tajian/views/site/myindex.php

8
themes/tajian/views/site/myindex.php

@ -49,9 +49,11 @@ $videoExts = array('url');
if (!empty($viewData['tags'])) { //显示tags分类 if (!empty($viewData['tags'])) { //显示tags分类
$tagIndex = 0; $tagIndex = 0;
foreach($viewData['tags'] as $id => $item) { foreach($viewData['tags'] as $id => $item) {
$category = $viewData['scanResults'][$item['id']];
if (!empty($category['files'])) { //一级目录支持,目录下直接存放视频文件
//输出分类名称 //输出分类名称
echo <<<eof echo <<<eof
<div class="tgroup"> <div class="tgroup">
<a href="{$linkPrefix}/list/?id={$id}" class="morelink">更多&gt;&gt;</a> <a href="{$linkPrefix}/list/?id={$id}" class="morelink">更多&gt;&gt;</a>
<h3>{$item['name']}</h3> <h3>{$item['name']}</h3>
@ -59,9 +61,7 @@ if (!empty($viewData['tags'])) { //显示tags分类
<div class="clearfix"> <div class="clearfix">
eof; eof;
$category = $viewData['scanResults'][$item['id']];
if (!empty($category['files'])) { //一级目录支持,目录下直接存放视频文件
$cate_files = Html::sortFilesByCreateTime($category['files'], 'desc'); //按创建时间排序 $cate_files = Html::sortFilesByCreateTime($category['files'], 'desc'); //按创建时间排序
foreach($cate_files as $index => $file) { foreach($cate_files as $index => $file) {

Loading…
Cancel
Save