Merge branch 'dev' of ssh://git.bgbg.live:18150/root/SEONexus into dev

This commit is contained in:
make
2025-05-05 13:59:52 +08:00
2 changed files with 31 additions and 7 deletions

View File

@@ -1,22 +1,22 @@
<pre>
<!-- {video:ranklist count="10" sort_type="total" v_status="wanjie" d_key="d_key" d_val="video" cache_life="1000" diff_key="fdasfads"}
{video:ranklist count="10" sort_type="total" v_status="wanjie" d_key="d_key" d_val="video" cache_life="1000" diff_key="fdasfads"}
<li>
章节名称: {$video.v_name}
章节序号: {$video.v_category}
</li>
{/video:ranklist} -->
{/video:ranklist}
{video:pager page="1" limit="10" d_key="d_key" d_val="video" cache_life="1000" button_num="3" v_category_en="动作片" v_status="wanjie" sort_type="update" p_val="page_data" func="generateVideoPager"}
<!-- {video:pager page="1" limit="10" d_key="d_key" d_val="video" cache_life="1000" button_num="3" v_category_en="动作片" v_status="wanjie" sort_type="update" p_val="page_data" func="generateVideoPager"}
<li>
Index: {$d_key}
章节名称: {$video.v_name}
章节序号: {$video.v_category}
</li>
{/video:pager}
{/video:pager} -->
<!-- {php}var_dump($page_data);{/php} -->
<!--

View File

@@ -23,6 +23,7 @@ class Video extends TagLib
'categorytype' => ['attr' => 'category_type,d_key,d_val,v_sex'],
'ranklist' => ['attr' => 'count,sort_type,v_status,v_category_en,v_parent_category_en,diff_key,cache_life,d_key,d_val', 'close' => 1],
'ranklistexp' => ['attr' => 'count,sort_type,v_status,v_category_en,v_parent_category_en,diff_key,cache_life,d_key,d_val,export_name', 'close' => 0],
];
private function customBuildVar($mixedArgs)
@@ -34,6 +35,19 @@ class Video extends TagLib
}
}
/**
* tagRankListExp
*
* @param array $tag
* @param string $content
* @return void
*/
public function tagRankListExp($tag, $content)
{
return $this->tagRankList($tag, $content);
}
/**
* tagRankList
*
@@ -252,6 +266,7 @@ EOT;
$v_lang_en = $tag['v_lang_en'] ?? "all";
$v_area_en = $tag['v_area_en'] ?? "all";
$v_year = $tag['v_year'] ?? "all";
$export_name = $tag['export_name'] ?? '';
$v_category = $this->customBuildVar($v_category);
$sort_type = $this->customBuildVar($sort_type);
@@ -280,19 +295,28 @@ EOT;
'diff_key' => {$diff_key},
'cache_life' => {$cache_life}
]);
EOT;
if (empty($export_name)) {
$strParse .= <<<EOT
if (!empty(\${$arrDataName}) && is_array(\${$arrDataName})):
?>
EOT;
$strParse .= <<<EOT
$strParse .= <<<EOT
<?php foreach (\${$arrDataName} as \${$d_key} => \${$d_val}): ?>
EOT;
$strParse .= $content;
$strParse .= <<<EOT
$strParse .= $content;
$strParse .= <<<EOT
<?php endforeach; ?>
<?php endif; ?>
EOT;
} else {
$strParse .= <<<EOT
\${$export_name} = \${$arrDataName};
?>
EOT;
}
return $strParse;
}