精品国产免费观看久久久_久久天天躁狠狠躁夜夜爽_无码人妻少妇久久中文字幕_狠狠做深爱婷婷久久综合一区

網(wǎng)絡(luò)建站知識(shí)

精準(zhǔn)傳達(dá) ? 價(jià)值共享

洞悉互聯(lián)網(wǎng)前沿資訊,探尋網(wǎng)站營銷規(guī)律

織夢(mèng)dede只調(diào)用上一頁下一頁鏈接

作者:Smileby陌少羽 | 2018-05-03 16:12 |點(diǎn)擊:

1.

//首先打開織夢(mèng)系統(tǒng)文件 /include/arc.archives.class.php 找到GetPreNext函數(shù)
 

2. 

查找  function GetPreNext($gtype='') 找到后 替換下面的代碼



 function GetPreNext($gtype='')
    {
        $rs = '';
        if(count($this->PreNext)<2)
        {
            $aid = $this->ArcID;
            $preR =  $this->dsql->GetOne("Select id From `dede_arctiny` where id<$aid And arcrank>-1 And typeid='{$this->Fields['typeid']}' order by id desc");
            $nextR = $this->dsql->GetOne("Select id From `dede_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 `dede_archives` arc left join dede_arctype t on arc.typeid=t.id  ";
            $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'],$preRow['filename'],$preRow['moresite'],$preRow['siteurl'],$preRow['sitepath']);
                $this->PreNext['pre'] = "上一篇:<a href='$mlink'>{$preRow['title']}</a> ";
$this->PreNext['preurl']=$mlink;
                $this->PreNext['preimg'] = "<a href='$mlink'><img src=\"{$preRow['litpic']}\" alt=\"{$preRow['title']}\"/></a> "; 
            }
            else
            {
                $this->PreNext['pre'] = "上一篇:沒有了 ";
$this->PreNext['preurl'] = "javascript:void:";
                $this->PreNext['preimg'] ="<img src=\"/templets/default/images/nophoto.jpg\" alt=\"對(duì)不起,沒有上一圖集了!\"/>";
            }
            if(is_array($nextRow))
            {
                $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'] = "下一篇:<a href='$mlink'>{$nextRow['title']}</a> ";
$this->PreNext['nexturl']=$mlink;
                $this->PreNext['nextimg'] = "<a href='$mlink'><img src=\"{$nextRow['litpic']}\" alt=\"{$nextRow['title']}\"/></a> ";
            }
            else
            {
                $this->PreNext['next'] = "下一篇:沒有了 ";
$this->PreNext['nexturl'] = "javascript:void:";
                $this->PreNext['nextimg'] ="<a href='javascript:void(0)' alt=\"\"><img src=\"/templets/default/images/nophoto.jpg\" alt=\"對(duì)不起,沒有下一圖集了!\"/></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 if($gtype=='preurl'){
$rs = $this->PreNext['preurl'];
}else if($gtype=='nexturl'){
$rs = $this->PreNext['nexturl'];
}
 
        else{
            $rs =  $this->PreNext['pre']."   ".$this->PreNext['next'];
        }
        return $rs;
    }






調(diào)用方法


 上一篇標(biāo)題:{dede:prenext get='prename'/}     上一篇鏈接:{dede:prenext get='preurl'/}  

下一篇標(biāo)題:{dede:prenext get='nextname'/}  下一篇鏈接:{dede:prenext get='nexturl'/}  


這個(gè)方法修復(fù)了上次分享的方法
織夢(mèng)獲取上一頁下一頁標(biāo)題 鏈接單獨(dú)調(diào)用
不能 調(diào)用 {dede:prenext get='pre'/}以及{dede:prenext get='next'/}

現(xiàn)在修復(fù)過后的可以調(diào)用  {dede:prenext get='pre'/}以及{dede:prenext get='next'/}

如沒特殊注明,文章均為狐靈科技原創(chuàng),轉(zhuǎn)載請(qǐng)注明?? "織夢(mèng)dede只調(diào)用上一頁下一頁鏈接
多一份免費(fèi)策劃方案,總有益處。

請(qǐng)直接添加技術(shù)總監(jiān)微信聯(lián)系咨詢

網(wǎng)站設(shè)計(jì) 品牌營銷

多一份參考,總有益處

聯(lián)系狐靈科技,免費(fèi)獲得專屬《策劃方案》及報(bào)價(jià)

咨詢相關(guān)問題或預(yù)約面談,可以通過以下方式與我們聯(lián)系

業(yè)務(wù)熱線:15082661954 / 大客戶專線:15523356218