我的学习记录 我的学习记录
  • 首页
  • 国外出海
    • 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报错解决办法
下一篇
再想想
暂无评论
相关文章
2021年国外9个最好的CDN服务推荐 出海建站必备
[教程]WordPress的文章TAG标签如何使用ID的方式显示链接
[转载]wordpress整站搬家教程,已测试成功
[转载]wordpress上传的图片保存到二级域名 详细设置教程
[亲测可用]织梦Dedecms转wordpress搬家方法教程
近期文章
  • 16套直播玩法揭秘,全网首次公开!
  • 抖音SEO新人入门详解
  • 如果同行账号太少,达人相似账号怎么选?
  • 不是所有的同行都能做你的相似达人!如何筛选相似达人?
  • 广告投放中必掌握的AB测试思维
随机推荐
2021年祝大家新年快乐!
2021年最热门的国外网站推荐
生成输出织梦Dedecms全站RSS文件的方法
B2B行业搜索营销优化指南
抖音直播如何找到对标账号竞品账号寻找方法
2021年国外9个最好的CDN服务推荐 出海建站必备
2年前
0 0
[教程]WordPress的文章TAG标签如何使用ID的方式显示链接
2年前
0 0
[转载]wordpress整站搬家教程,已测试成功
3年前
0 3
[转载]wordpress上传的图片保存到二级域名 详细设置教程
3年前
0 2
1
  • 1
  • 0
个人介绍

没什么可以介绍的,拿不出手啊!!!!!

栏目导航
首页 国外出海 Facebook YouTube 外贸电商 推广 国内SEO 谷歌SEO 竞价SEM 信息流 互联网百科 网站建设 工具教程 资源 栏目精选 抖音 抖音直播 抖音短视频 影音资源 友情链接
友情链接
Copyright © 2003-2023 我的学习记录. Designed by nicetheme. 如果对你有帮助,支持下吧! 冀ICP备19023356号-1
  • 首页
  • 国外出海
    • Facebook
    • YouTube
    • 外贸电商
  • 推广
    • 国内SEO
    • 谷歌SEO
    • 竞价SEM
    • 信息流
  • 互联网百科
    • 网站建设
    • 工具教程
    • 资源
    • 栏目精选
  • 抖音
    • 抖音直播
    • 抖音短视频
  • 影音资源
  • 友情链接
# 搜索引擎原理 # # dedecms # # 抖音直播 # # 百度搜索算法 # # 平台 #
帅的一批