今天來(lái)說(shuō)下如何修改dedecms分頁(yè)的下一頁(yè)和上一頁(yè)的文字和文字長(zhǎng)度!
1.首先到include/arc.archives.class.php
加入紅色代碼,是用來(lái)設(shè)置默認(rèn)獲取字?jǐn)?shù)的。當(dāng)前設(shè)置為14個(gè)中文字符
//獲取上一篇,下一篇鏈接function GetPreNext($gtype='',$titlelen=28)
2.再往下找,插入紅色部分!即是用截取后的長(zhǎng)度賦予$preRow['title2'],那么原始沒(méi)截取的就是
$preRow['title']$preRow['namerule'],$preRow['typedir'],$preRow['money'],$preRow['filename'],$preRow['moresite'],$preRow['siteurl'],$preRow['sitepath']);$preRow['title2']=cn_substr($preRow['title'],$titlelen);$this->PreNext['pre'] = "上一篇:<a href='$mlink'
3.接下來(lái)就很簡(jiǎn)單了。做鼠標(biāo)指上后就能顯示完整文章標(biāo)題。(對(duì)seo很有利)
$preRow['namerule'],$preRow['typedir'],$preRow['money'],$preRow['filename'],$preRow['moresite'],$preRow['siteurl'],$preRow['sitepath']);$preRow['title2']=cn_substr($preRow['title'],$titlelen);$this->PreNext['pre'] = "上一篇:<a href='$mlink' title='{$preRow['title']}'> {$preRow['title2']}</a> "; 4.修改下一篇 如下:
1 $nextRow['namerule'],$nextRow['typedir'],$nextRow['money'],$nextRow['filename'],$nextRow['moresite'],$nextRow['siteurl'],$nextRow['sitepath']); 2 $nextRow['title2']=cn_substr($nextRow['title'],$titlelen); 3 $this->PreNext['next'] = "下一篇:<a href='$mlink' title='{$nextRow['title']}'>{$nextRow['title2']}</a> ";如果需要修改文字那我就不說(shuō)了,直接修改文字即可實(shí)現(xiàn)!
新聞熱點(diǎn)
疑難解答
圖片精選