Browse Source

修复tags相关问题

tags/6.5.2
tianya 6 days ago
parent
commit
75bb9b1376
2 changed files with 6 additions and 9 deletions
  1. +4
    -7
      src/system/archive/taglist.class.php
  2. +2
    -2
      src/system/taglib/arclist.lib.php

+ 4
- 7
src/system/archive/taglist.class.php View File

@@ -64,11 +64,13 @@ class TagList
ShowMsg('当前标签不存在,系统自动返回主页', '/');
exit();
}
$this->Fields['keywords'] = empty($this->Fields['keywords'])? "" : $this->Fields['keywords'];
$this->Fields['description'] = empty($this->Fields['description'])? "" : $this->Fields['description'];
$this->Fields['title'] = empty($this->TagInfos['title']) ? $this->TagInfos['tag'] : $this->TagInfos['title'];
$this->Fields['keywords'] = empty($this->TagInfos['keywords']) ? $this->Fields['keywords'] : $this->TagInfos['keywords'];
$this->Fields['description'] = empty($this->TagInfos['description']) ? $this->Fields['description'] : $this->TagInfos['description'];
$addInfos = $this->dsql->GetOne("SELECT * FROM `#@__tagindex_infos` WHERE tagid='{$this->Tag}' ");
$this->Fields['litpic'] = empty($addInfos['litpic']) ? $addInfos['litpic'] : $addInfos['litpic'];
if(is_array($addInfos)) $this->Fields['litpic'] = empty($addInfos['litpic']) ? $addInfos['litpic'] : $addInfos['litpic'];
}
//初始化模板
$tempfile = $GLOBALS['cfg_basedir'].$GLOBALS['cfg_templets_dir']."/".$GLOBALS['cfg_df_style'].'/'.$this->Templet;
@@ -547,12 +549,7 @@ class TagList
$maininfo = "<li class='page-item disabled'><span class='page-link'>{$totalpage}页".$this->TotalResult."条</span></li>";
$purl = $this->GetCurUrl();
//开启伪静态对规则替换
if ($cfg_rewrite == 'Y') {
$purl = str_replace("/apps", "", $purl);
$nowurls = preg_replace("/", ".php?", $purl);
$nowurls = explode("?", $nowurls);
$purl = $nowurls[0];
}
if ($cfg_rewrite == 'Y') $purl = "/tags/";
$purl .= "?/".urlencode($this->Tag);
//获得上页和下页的链接
if ($this->PageNo != 1) {


+ 2
- 2
src/system/taglib/arclist.lib.php View File

@@ -32,7 +32,7 @@ function lib_arclist(&$ctag, &$refObj)
$tagid = $ctag->GetAtt('tagid');
}
//arclist是否需要weight排序,默认为N,如果需要排序则设置为Y
$weight = $ctag->GetAtt('weight');
$isweight = $ctag->GetAtt('weight');
if ($tagname == 'imglist' || $tagname == 'imginfolist') {
$listtype = 'image';
} else if ($tagname == 'specart') {
@@ -72,7 +72,7 @@ function lib_arclist(&$ctag, &$refObj)
} else {
$flag = $ctag->GetAtt('att');
}
return lib_arclistDone ($refObj, $ctag, $typeid, $ctag->GetAtt('row'), $ctag->GetAtt('col'), $titlelen, $infolen, $ctag->GetAtt('imgwidth'), $ctag->GetAtt('imgheight'), $listtype, $orderby, $ctag->GetAtt('keyword'), $innertext, $envs['aid'], $ctag->GetAtt('idlist'), $channelid, $ctag->GetAtt('limit'), $flag,$ctag->GetAtt('orderway'), $ctag->GetAtt('subday'), $ctag->GetAtt('noflag'), $tagid, $pagesize,$isweight, $ctag->GetAtt('notypeid')
return lib_arclistDone ($refObj, $ctag, $typeid, $ctag->GetAtt('row'), $ctag->GetAtt('col'), $titlelen, $infolen, $ctag->GetAtt('imgwidth'), $ctag->GetAtt('imgheight'), $listtype, $orderby, $ctag->GetAtt('keyword'), $innertext, $envs['aid'], $ctag->GetAtt('idlist'), $channelid, $ctag->GetAtt('limit'), $flag,$ctag->GetAtt('orderway'), $ctag->GetAtt('subday'), $ctag->GetAtt('noflag'), $tagid, $pagesize, $isweight, $ctag->GetAtt('notypeid')
);
}
/**


Loading…
Cancel
Save