{dede:prenext get='pre'/} {dede:prenext get='next'/}
大家很熟悉,这就是DEDECMS织梦的上一篇 下一篇调用代码。
现在我们将做以下修改,将上一篇下一篇只调用URL地址。
找到include目录下的这个文件:arc.archives.class.php
找到这几行:
$this->PreNext['pre'] = "上一篇:<a href='$mlink'>{$preRow['title']}</a> "; $this->PreNext['pre'] = "上一篇:没有了"; $this->PreNext['next'] = "下一篇:<a href='$mlink'>{$nextRow['title']}</a> "; $this->PreNext['next'] = "下一篇:没有了 ";
分别替换为以下几行:
$this->PreNext['pre'] = "$mlink"; $this->PreNext['pre'] = "javascript:window.alert('上一篇:没有了');"; $this->PreNext['next'] = "$mlink"; $this->PreNext['next'] = "javascript:window.alert('下一篇:没有了');";
以上是文章内容模型的上一篇下一篇调用标签。图集模型的修改地方如下:
找到这几行:
*$this->PreNext['preimg'] = "<a href='$mlink'><img src="{$preRow['litpic']}" alt="{$preRow['title']}"/></a> "; $this->PreNext['preimg'] ="<img src="/templets/default/images/nophoto.jpg" alt="对不起,没有上一图集了!"/>"; $this->PreNext['nextimg'] = "<a href='$mlink'><img src="{$nextRow['litpic']}" alt="{$nextRow['title']}"/></a> "; $this->PreNext['nextimg'] ="<a href='javascript:void(0)' alt=""><img src="/templets/default/images/nophoto.jpg" alt="对不起,没有下一图集了!"/></a>";
分别替换为以下几行:
$this->PreNext['preimg'] = "$mlink"; $this->PreNext['preimg'] ="javascript:window.alert('对不起,没有上一图集了!');"; $this->PreNext['nextimg'] = "$mlink"; $this->PreNext['nextimg'] ="javascript:window.alert('对不起,没有下一图集了!');";
Copyright © 2009-2019 Ywcms.Com All Right Reserved. 湘ICP备16006489号-2