欢迎来到DIVCSS5查找CSS资料与学习DIV CSS布局技术!

1、更改include/arc.taglist.class.php 文件中的代码如下:

1-1、找到

$this->TagInfos = $this->dsql->GetOne("Select * From `dede_tagindex` where taglike '{$this->Tag}' ");

变革为:

$this->TagInfos = $this->dsql->GetOne("Select * From `dede_tagindex` where id like'{$this->Tag}' ");

注:代表从数据库中输出tag名字变加倍输出tag的ID,即tags.php?/中文,变为tags.php?/id

1-2、找到(取得当前链接地点)

function GetCurUrl()
{
if(!empty($_SERVER["REQUEST_URI"]))
{
$nowurl = $_SERVER["REQUEST_URI"];
$nowurls = explode("?",$nowurl);
$nowurl = $nowurls[0];
}
else
{
$nowurl = $_SERVER["PHP_SELF"];
}
return $nowurl;
}

修改成

function GetCurUrl()
{
$nowurl = $_SERVER["PHP_SELF"];
$nowurl=str_replace(".php",'',$nowurl);
return $nowurl;
}

1-3、找到(修改毗连所在途径1)

$plist = '';
if(preg_match('/info/i', $listitem))
{
$plist .= $maininfo.' ';
}
if(preg_match('/index/i', $listitem))
{
$plist .= $indexpage.' ';
}
if(preg_match('/pre/i', $listitem))
{
$plist .= $prepage.' ';
}
if(preg_match('/pageno/i', $listitem))
{
$plist .= $listdd.' ';
}
if(preg_match('/next/i', $listitem))
{
$plist .= $nextpage.' ';
}
if(preg_match('/end/i', $listitem))
{
$plist .= $endpage.' ';
}
return $plist;

改成

$plist = '';
if(eregi('info',$listitem))
{
$plist .= $maininfo.' ';
}
if(eregi('index',$listitem))
{
$plist .= $indexpage.' ';
}
if(eregi('pre',$listitem))
{
$plist .= $prepage.' ';
}
if(eregi('pageno',$listitem))
{
$plist .= $listdd.' ';
}
if(eregi('next',$listitem))
{
$plist .= $nextpage.' ';
}
if(eregi('end',$listitem))
{
$plist .= $endpage.' ';
}
return $plist;

1-4、找到(修改分页链接)

if($j == $this->PageNo)
{
$listdd.= "<li class=\"thisclass\"><a>$j</a></li>\r\n";
}
else
{
$listdd.="<li><a href='".$purl."/$j/'>".$j."</a></li>\r\n";
}

修改成

if($j == $this->PageNo)
{
$listdd.= " $j ";
}
else
{
$listdd.=" <a href='".$purl."-$j.html'>".$j."</a> ";
}

1-5、找到(批改分页 上一页 下一页路子)

if($this->PageNo != 1)
{
$prepage.="<li><a href='".$purl."/$prepagenum/'>上一页</a></li>\r\n";
$indexpage="<li><a href='".$purl."/1/'>首页</a></li>\r\n";
}
else
{
$indexpage="<li><a>首页</a></li>\r\n";
}
if($this->PageNo!=$totalpage && $totalpage>1)
{
$nextpage.="<li><a href='".$purl."/$nextpagenum/'>下一页</a></li>\r\n";
$endpage="<li><a href='".$purl."/$totalpage/'>末页</a></li>\r\n";
}
else
{
$endpage="<li><a>末页</a></li>\r\n";
}

修正成

if($this->PageNo != 1)
{
if($this->PageNo == 2){
$prepage.="<a href='".$purl."-1.html'>上一页</a>\r\n";
$indexpage="<a href='".$purl."-1.html'>首页</a>\r\n";
}
else{
$prepage.=" <a href='".$purl."-$prepagenum.html'>上一页</a> ";
$indexpage=" <a href='".$purl."-1.html'>首页</a> ";
}
}
else
{
$indexpage=" 首页 ";
}
if($this->PageNo!=$totalpage && $totalpage>1)
{
$nextpage.=" <a href='".$purl."-$nextpagenum.html'>下一页</a> ";
$endpage=" <a href='".$purl."-$totalpage.html'>末页</a> ";
}
else
{
$endpage="末页";
}

1-6、找到(修改 共几页 去掉class和html标签)

if($totalpage <= 1 && $this->TotalResult > 0)
{
return "<span class=\"pageinfo\">共1页/".$this->TotalResult."条</span>";
}
if($this->TotalResult == 0)
{
return "<span class=\"pageinfo\">共0页/".$this->TotalResult."条</span>";
}
$maininfo = "<span class=\"pageinfo\">共{$totalpage}页/".$this->TotalResult."条</span>\r\n";
$purl = $this->GetCurUrl();
$purl .= "?/".urlencode($this->Tag);

修正成

if($totalpage <= 1 && $this->TotalResult > 0)
{
return "共1页/".$this->TotalResult."";
}
if($this->TotalResult == 0)
{
return "共0页/".$this->TotalResult."";
}
$maininfo = "共{$totalpage}页/".$this->TotalResult."";
$purl = $this->GetCurUrl();
$purl .= rawurlencode($this->Tag);

1-7、留心批改生成份页地点错误修正,tag伪信息地点自带问号舛误:

留心URL修改

$purl .= "?/".urlencode($this->Tag);

改成

$purl .= "/".urlencode($this->Tag);

2、更改include/taglib/tag.lib.php文件

2-1、更改tag为id之处如下

找到

$row['keyword'] = $row['tag'];

将更改为

$row['keyword'] = $row['id'];

2-2、找到

$row['link'] = $cfg_cmsurl."/tags.php?/".urlencode($row['keyword'])."/";

更改为:

$row['link'] = $cfg_cmsurl."/tags/".urlencode($row['id'])."-1.html";

注:第一行代表将tag的名字变为tag的id,第二行代表将tags.php?/+tag关键字更换为tags名堂+tag的id

3、找到文件templets/default/taglist.htm

3-1、我的地位代码

<strong>今朝地位:</strong>:<a href="{dede:global.cfg_cmsurl/}/">主页</a> > <a href='tags.php'>TAG标签</a> > {dede:field.title /}

修正成:

<strong>目前地位:</strong>:<a href="{dede:global.cfg_cmsurl/}/">主页</a> &gt; 
<a href='/xue/tags.html'>TAG标签</a> &gt; {dede:sql sql="select tag from divcss5_tagindex where id=~title~"}[field:tag/]{/dede:sql}

3-2、title网页标题

<title>{dede:field.title/}_{dede:global.cfg_webname/}</title>

修正成:

<title>{dede:sql sql="select tag from divcss5_tagindex where id=~title~"}[field:tag/]{/dede:sql}_{dede:global.cfg_站点name/}</title>

如需转载,请注明文章出处和来源网址:http://www.yuqseh.com.cn/css3-style/c53823.shtml

重庆彩开奖号码查询结果