足球游戏_中国足彩网¥体育资讯$

DEDECMS 获取当前文档地址
来源:易贤网 阅读:949 次 日期:2016-07-02 11:03:19
温馨提示:易贤网小编为您整理了“DEDECMS 获取当前文档地址”,方便广大网友查阅!

找到调用当前文档的方法,故做了以下教程:DEDECMS 获取当前文档地址。

修改方法如下:

修改include/inc_archives_view.php

找到

//--------------------------

//获取上一篇,下一篇链接

//--------------------------

function GetPreNext($gtype='')

{

$rs = "";

if(count($this->PreNext)<2)

{

$aid = $this->ArcID;

$next = " xkzzz_archives.ID>'$aid' And xkzzz_archives.arcrank>-1 order by xkzzz_archives.ID asc ";

$pre = " xkzzz_archives.ID<'$aid' And xkzzz_archives.arcrank>-1 order by xkzzz_archives.ID desc ";

$query = "Select xkzzz_archives.ID,xkzzz_archives.title,

xkzzz_archives.typeid,xkzzz_archives.ismake,xkzzz_archives.senddate,

xkzzz_archives.arcrank,xkzzz_archives.money,

xkzzz_arctype.typedir,xkzzz_arctype.typename,xkzzz_arctype.namerule,xkzzz_arctype.namerule2,

xkzzz_arctype.ispart,

xkzzz_arctype.moresite,xkzzz_arctype.siteurl

from xkzzz_archives left join xkzzz_arctype on xkzzz_archives.typeid=xkzzz_arctype.ID

where ";

$nextRow = $this->dsql->GetOne($query.$next);

$preRow = $this->dsql->GetOne($query.$pre);

if(is_array($preRow)){

$mlink = GetFileUrl($preRow['ID'],$preRow['typeid'],$preRow['senddate'],$preRow['title'],

$preRow['ismake'],$preRow['arcrank'],$preRow['namerule'],$preRow['typedir'],

$preRow['money'],true,$preRow['siteurl']);

$this->PreNext['pre'] = "上一篇:<a href='$mlink'>{$preRow['title']}</a> ";

}

else{

$this->PreNext['pre'] = "上一篇:没有了 ";

}

if(is_array($nextRow)){

$mlink = GetFileUrl($nextRow['ID'],$nextRow['typeid'],$nextRow['senddate'],

$nextRow['title'],$nextRow['ismake'],

$nextRow['arcrank'],$nextRow['namerule'],$nextRow['typedir'],

$nextRow['money'],true,$nextRow['siteurl']);

$this->PreNext['next'] = "下一篇:<a href='$mlink'>{$nextRow['title']}</a> ";

}

else{

$this->PreNext['next'] = "下一篇:没有了 ";

}

}

if($gtype=='pre'){

$rs = $this->PreNext['pre'];

}

else if($gtype=='next'){

$rs = $this->PreNext['next'];

}

else{

$rs = $this->PreNext['pre']." &nbsp; ".$this->PreNext['next'];

}

return $rs;

}

看了大家都知道了,我是根据上一页下一页来改的

当然不会影响上一页和下一页的使用

修改

if(count($this->PreNext)<2)

if(count($this->PreNext)<3)

找到

$next = " xkzzz_archives.ID>'$aid' And xkzzz_archives.arcrank>-1 order by xkzzz_archives.ID asc ";

$pre = " xkzzz_archives.ID<'$aid' And xkzzz_archives.arcrank>-1 order by xkzzz_archives.ID desc ";

在下面添加

$dqy = " xkzzz_archives.ID='$aid' And xkzzz_archives.arcrank>-1 order by xkzzz_archives.ID asc ";

找到

$nextRow = $this->dsql->GetOne($query.$next);

$preRow = $this->dsql->GetOne($query.$pre);

在下面添加

$dqyRow = $this->dsql->GetOne($query.$dqy);

找到

if(is_array($nextRow)){

$mlink = GetFileUrl($nextRow['ID'],$nextRow['typeid'],$nextRow['senddate'],

$nextRow['title'],$nextRow['ismake'],$nextRow['arcrank'],$nextRow['namerule'],

$nextRow['typedir'],$nextRow['money'],true,$nextRow['siteurl']);

$this->PreNext['next'] = "下一篇:<a href='$mlink'>{$nextRow['title']}</a> ";

}

else{

$this->PreNext['next'] = "下一篇:没有了 ";

}

在下面添加

if(is_array($dqyRow)){

$mlink = GetFileUrl($dqyRow['ID'],$dqyRow['typeid'],$dqyRow['senddate'],

$dqyRow['title'],$dqyRow['ismake'],$dqyRow['arcrank'],$dqyRow['namerule'],

$dqyRow['typedir'],$dqyRow['money'],true,$dqyRow['siteurl']);

$this->PreNext['dqy'] = "本页地址:<a href='$mlink'>$mlink</a> ";

}

else{

$this->PreNext['dqy'] = "当前页:没有了 ";

}

找到

if($gtype=='pre'){

$rs = $this->PreNext['pre'];

}

else if($gtype=='next'){

$rs = $this->PreNext['next'];

}

else{

$rs = $this->PreNext['pre']." &nbsp; ".$this->PreNext['next'];

}

return $rs;

}

修改为

if($gtype=='pre'){

$rs = $this->PreNext['pre'];

}

else if($gtype=='next'){

$rs = $this->PreNext['next'];

}

else if($gtype=='dqy'){

$rs = $this->PreNext['dqy'];

}

else{

$rs = $this->PreNext['pre']." &nbsp; ".$this->PreNext['next'];

}

return $rs;

}

在内容页模版需要调用的地方调用 {dede:prenext get=’dqy’/}

OK,搞定,重新生成下看看!

中国足彩网信息请查看CMS教程
易贤网手机网站地址:DEDECMS 获取当前文档地址
由于各方面情况的不断调整与变化,易贤网提供的所有考试信息和咨询回复仅供参考,敬请考生以权威部门公布的正式信息和咨询为准!
关于我们 | 联系我们 | 人才招聘 | 网站声明 | 网站帮助 | 非正式的简要咨询 | 简要咨询须知 | 加入群交流 | 手机站点 | 投诉建议
工业和信息化部备案号:滇ICP备2023014141号-1 足球游戏_中国足彩网¥体育资讯$ 滇公网安备53010202001879号 人力资源服务许可证:(云)人服证字(2023)第0102001523号
云南网警备案专用图标
联系电话:0871-65317125(9:00—18:00) 获取招聘考试信息及咨询关注公众号:hfpxwx
咨询QQ:526150442(9:00—18:00)版权所有:易贤网
云南网警报警专用图标