This commit is contained in:
make
2025-04-12 18:20:35 +08:00
parent 1d431ecce5
commit 760fe47b5e
40 changed files with 751 additions and 338 deletions

View File

@@ -9,11 +9,16 @@ class Site extends TagLib
protected $tags = [
'cfg' => ['attr' => 'code,encode', 'close' => 0],
'wz' => ['attr' => 'wz', 'close' => 0],
'nurl' => ['attr' => 'n_id', 'close' => 0],
'nurl' => ['attr' => 'n_id,n_py', 'close' => 0],
'nnurl' => ['attr' => 'n_id,n_py,n_fid', 'close' => 0],
'souurl' => ['attr' => 'key', 'close' => 0],
'cpurl' => ['attr' => 'n_id,n_py,c_sort,c_page', 'close' => 0],
'lcpurl' => ['attr' => 'n_id,n_py', 'close' => 0],
'nclurl' => ['attr' => 'n_id,n_py,order,page', 'close' => 0],
'nflurl' => ['attr' => 'gender,category,status,page', 'close' => 0],
'grm' => ['attr' => 'domain,code,line,diff,start,end,index,type', 'close' => 0],
];
/**
* cfg 标签处理函数-系统配置
@@ -60,8 +65,6 @@ EOD;
return $parse;
}
/**
* 小说详情URL生成器
*
@@ -82,6 +85,133 @@ EOD;
return $strParse;
}
/**
* 伪小说详情URL生成器
*
* @param array $n_id
* @return string
*/
public function tagNNUrl($tag)
{
$intNId = isset($tag['n_id']) ? $tag['n_id'] : '';
$strNPy = isset($tag['n_py']) ? $tag['n_py'] : '';
$intNForgeId = isset($tag['n_fid']) ? $tag['n_fid'] : '';
$strParse = <<<EOD
<?php
\$strUrl = \\app\\model\\NovelModel::getForgeNovelInfoUrl("{$intNId}","{$strNPy}","{$intNForgeId}");
echo \$strUrl;
?>
EOD;
return $strParse;
}
/**
* 小说章节URL生成器
*
* @param array $n_id
* @return string
*/
public function tagCPUrl($tag)
{
$intNId = isset($tag['n_id']) ? $tag['n_id'] : '';
$strNPy = isset($tag['n_py']) ? $tag['n_py'] : '';
$intChapterSort = isset($tag['c_sort']) ? $tag['c_sort'] : '';
$intChapterPage = isset($tag['c_page']) ? $tag['c_page'] : '';
$strParse = <<<EOD
<?php
\$strUrl = \\app\\model\\NovelModel::getNovelChapterUrl("{$intNId}","{$strNPy}","{$intChapterSort}","{$intChapterPage}");
echo \$strUrl;
?>
EOD;
return $strParse;
}
/**
* 小说最新章节URL生成器
*
* @param array $n_id
* @return string
*/
public function tagLCPUrl($tag)
{
$intNId = isset($tag['n_id']) ? $tag['n_id'] : '';
$strNPy = isset($tag['n_py']) ? $tag['n_py'] : '';
$strParse = <<<EOD
<?php
\$strUrl = \\app\\model\\NovelModel::getNovelLasterChapterUrl("{$intNId}","{$strNPy}");
echo \$strUrl;
?>
EOD;
return $strParse;
}
/**
* 小说目录URL生成器
*
* @param array $n_id
* @return string
*/
public function tagNClUrl($tag)
{
$intNId = isset($tag['n_id']) ? $tag['n_id'] : '';
$strNPy = isset($tag['n_py']) ? $tag['n_py'] : '';
$strOrder = isset($tag['order']) ? $tag['order'] : '';
$intPage = isset($tag['page']) ? $tag['page'] : '';
$strParse = <<<EOD
<?php
\$strUrl = \\app\\model\\NovelModel::getNovelCatalogUrl("{$intNId}","{$strNPy}","{$strOrder}","{$intPage}");
echo \$strUrl;
?>
EOD;
return $strParse;
}
/**
* 小说书库/分类 URL生成器
*
* @param array $n_id
* @return string
*/
public function tagNFLUrl($tag)
{
$strGender = isset($tag['gender']) ? $tag['gender'] : '';
$strCategory = isset($tag['category']) ? $tag['category'] : '';
$strStatus = isset($tag['status']) ? $tag['status'] : '';
$intPage = isset($tag['page']) ? $tag['page'] : '';
$strParse = <<<EOD
<?php
\$strUrl = \\app\\model\\NovelModel::getNovelCategoryUrl("{$strGender}","{$strCategory}","{$strStatus}","{$intPage}");
echo \$strUrl;
?>
EOD;
return $strParse;
}
/**
* 搜索页URL生成器
*
* @param array $key
* @return string
*/
public function tagSouUrl($tag)
{
$strKey = isset($tag['key']) ? $tag['key'] : '';
$intPage = isset($tag['p']) ? $tag['p'] : '';
$strParse = <<<EOD
<?php
\$strUrl = \\app\\model\\NovelModel::getNovelSearchUrl("{$strKey}","{$intPage}");
echo \$strUrl;
?>
EOD;
return $strParse;
}
/**
* 干扰码