张佑晨个人博客 张佑晨个人博客
  • 首页
  • 国外出海
    • Facebook
    • YouTube
    • 外贸电商
  • 推广
    • 国内SEO
    • 谷歌SEO
    • 竞价SEM
    • 信息流
  • 互联网百科
    • 网站建设
    • 工具教程
    • 资源
    • 栏目精选
  • 抖音
    • 抖音直播
    • 抖音短视频
  • 影音资源
  • 友情链接
首页 › 网站建设 › 修改dedecms文章详情页上一篇下一篇,改为英文上下篇

修改dedecms文章详情页上一篇下一篇,改为英文上下篇

帅的一批
3年前网站建设

打开织梦CMS根目录下的 include文件,找到 include/arc.archives.class.php 文件

编辑内容中上一篇下一篇字段,修改为或者直接替换为(注意备份):

/**
     *  获取上一篇,下一篇链接
     *
     * @access    public
     * @param     string  $gtype  获取类型
     *                    pre:上一篇  preimg:上一篇图片  next:下一篇  nextimg:下一篇图片
     * @return    string
     */
    function GetPreNext($gtype='')
    {
        $rs = '';
        if(count($this->PreNext)<2)
        {
            $aid = $this->ArcID;
            $preR =  $this->dsql->GetOne("Select id From `#@__arctiny` where id<$aid And arcrank>-1 And typeid='{$this->Fields['typeid']}' order by id desc");
            $nextR = $this->dsql->GetOne("Select id From `#@__arctiny` where id>$aid And arcrank>-1 And typeid='{$this->Fields['typeid']}' order by id asc");
            $next = (is_array($nextR) ? " where arc.id={$nextR['id']} " : ' where 1>2 ');
            $pre = (is_array($preR) ? " where arc.id={$preR['id']} " : ' where 1>2 ');
            $query = "Select arc.id,arc.title,arc.shorttitle,arc.typeid,arc.ismake,arc.senddate,arc.arcrank,arc.money,arc.filename,arc.litpic,
                        t.typedir,t.typename,t.namerule,t.namerule2,t.ispart,t.moresite,t.siteurl,t.sitepath
                        from `#@__archives` arc left join #@__arctype t on arc.typeid=t.id  ";
            $nextRow = $this->dsql->GetOne($query.$next);
            $preRow = $this->dsql->GetOne($query.$pre);
            if(is_array($preRow))
            {
                if ( defined('DEDEMOB') && false)
                {
                    $mlink = 'view.php?aid='.$preRow['id'];
                } else {
                    $mlink = GetFileUrl($preRow['id'],$preRow['typeid'],$preRow['senddate'],$preRow['title'],$preRow['ismake'],$preRow['arcrank'],
                $preRow['namerule'],$preRow['typedir'],$preRow['money'],$preRow['filename'],$preRow['moresite'],$preRow['siteurl'],$preRow['sitepath']);
                }
                
                $this->PreNext['pre'] = "Prev:<a href='$mlink'>{$preRow['title']}</a> ";
                $this->PreNext['preimg'] = "<a href='$mlink'><img src=\"{$preRow['litpic']}\" alt=\"{$preRow['title']}\"/></a> ";
            }
            else
            {
                $this->PreNext['pre'] = "Prev:None ";
                $this->PreNext['preimg'] ="<img src=\"/templets/default/images/nophoto.jpg\" alt=\"对不起,没有上一图集了!\"/>";
            }
            if(is_array($nextRow))
            {
                if ( defined('DEDEMOB') && false )
                {
                    $mlink = 'view.php?aid='.$nextRow['id'];
                } else {
                    $mlink = GetFileUrl($nextRow['id'],$nextRow['typeid'],$nextRow['senddate'],$nextRow['title'],$nextRow['ismake'],$nextRow['arcrank'],
                    $nextRow['namerule'],$nextRow['typedir'],$nextRow['money'],$nextRow['filename'],$nextRow['moresite'],$nextRow['siteurl'],$nextRow['sitepath']);
                }
    
                $this->PreNext['next'] = "Next:<a href='$mlink'>{$nextRow['title']}</a> ";
                $this->PreNext['nextimg'] = "<a href='$mlink'><img src=\"{$nextRow['litpic']}\" alt=\"{$nextRow['title']}\"/></a> ";
            }
            else
            {
                $this->PreNext['next'] = "Next:None ";
                $this->PreNext['nextimg'] ="<a href='javascript:void(0)' alt=\"\"><img src=\"/templets/default/images/nophoto.jpg\" alt=\"对不起,没有下一图集了!\"/></a>";
            }
        }
        if($gtype=='pre')
        {
            $rs =  $this->PreNext['pre'];
        }
        else if($gtype=='preimg'){

            $rs =  $this->PreNext['preimg'];
        }
        else if($gtype=='next')
        {
            $rs =  $this->PreNext['next'];
        }
        else if($gtype=='nextimg'){

            $rs =  $this->PreNext['nextimg'];
        }
        else
        {
            $rs =  $this->PreNext['pre']."   ".$this->PreNext['next'];
        }
        return $rs;
    }
dedecms 上下篇英文
赞赏 赞(1)
本文系作者 @帅的一批 原创发布在 张佑晨个人博客。未经许可,禁止转载。
修改dedecms列表页上下页改成英文上下页翻页
上一篇
Wordpress Nginx 服务器修改固定链接页面404报错解决办法
下一篇
再想想
暂无评论
近期文章
  • 热门美剧《老友记 S01~S10》重聚版 Friends 百度云盘高清下载 中文字幕 带音频版
  • 2021年美剧《肇事逃逸》全集百度云高清下载 中文字幕
  • 抖音直播间拆解分析方向和维度
  • 乌克兰电视剧喜剧【人民公仆 S01~S03】百度云高清下载中文字幕
  • 2022年5款最好的付费和免费电子邮箱推荐
相关文章
2021年国外9个最好的CDN服务推荐 出海建站必备
[教程]WordPress的文章TAG标签如何使用ID的方式显示链接
[转载]wordpress整站搬家教程,已测试成功
[转载]wordpress上传的图片保存到二级域名 详细设置教程
[亲测可用]织梦Dedecms转wordpress搬家方法教程
生成输出织梦Dedecms全站RSS文件的方法
可能喜欢
一条跑的好的老计划 ROI降低成本增加是否关停
[搜索引擎原理]PageRank算法
爱情韩剧《那年,我们的夏天》百度云高清全集下载
美剧《洛基》6集百度云资源高清下载在线看 中文字幕
2021年美剧《黄蜂》10集全集百度云高清下载
亚马逊全球开店需要什么条件
2021年国外9个最好的CDN服务推荐 出海建站必备
1年前
0 0
[教程]WordPress的文章TAG标签如何使用ID的方式显示链接
1年前
0 0
[转载]wordpress整站搬家教程,已测试成功
2年前
0 3
[转载]wordpress上传的图片保存到二级域名 详细设置教程
2年前
0 2
1
  • 1
  • 0
关于张佑晨个人博客

一个个人运营的个人博客,没有套路,不定时的更新博客内容,主题有点宽泛,内容有点深度,你想要的可能就在这里,多用博客站内搜索,简单便捷的找到你想要的的内容!如果没有也可以联系我,尽最大的能力帮助你。注:张佑晨个人博客采用知识共享署名-非商业性使用-相同方式共享协议。

网站导航
互联网百科 国外出海 Facebook YouTube 外贸电商 工具教程 推广 网站建设 资源 栏目精选 国内SEO 谷歌SEO 碎碎念
友情链接
个人博客
Copyright © 2003 -2022 张佑晨个人博客. 本媒体部分图片、文章来源于网络,不代表本人观点,版权归原作者所有,如有侵权,请联系本站删除。 冀ICP备19023356号-1
  • 首页
  • 互联网百科
  • 国外出海
    • 资源
    • Facebook
    • YouTube
    • 外贸电商
  • 工具教程
    • 网站建设
  • 抖音
    • 抖音直播
    • 抖音短视频
  • 推广
    • 信息流
    • 国内SEO
    • 竞价SEM
    • 谷歌SEO
  • 影音资源
# 百度云下载 # # 美剧 # # 搜索引擎原理 # # dedecms # # 百度搜索算法 #
帅的一批