久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

dede文章頁面的上一篇下一篇增加文章摘要

系統(tǒng)默認(rèn)的是在 dede 的上一篇和下一篇的鏈接只顯示標(biāo)題,但是有時我們希望顯示其他信息,比如文章的摘要。 找到arc.archives.class.php文件,在include目錄下面,然后查找“GetPreNext”這個

系統(tǒng)默認(rèn)的是在dede的上一篇和下一篇的鏈接只顯示標(biāo)題,但是有時我們希望顯示其他信息,比如文章的摘要。

找到arc.archives.class.php文件,在include目錄下面,然后查找“GetPreNext”這個函數(shù),將

$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 `jcode_archives` arc left join jcode_arctype t on arc.typeid=t.id ";


改成


$query = "Select
arc.id,arc.title,arc.shorttitle,arc.typeid,arc.ismake,arc.senddate,arc.arcrank,arc.money,arc.filename,arc.litpic,
arc.description,t.typedir,t.typename,t.namerule,t.namerule2,t.ispart,t.moresite,t.siteurl,t.sitepath
from `jcode_archives` arc left join jcode_arctype t on arc.typeid=t.id ";


比較一下其實(shí)現(xiàn)在只是多了arc.description,這就是文章的摘要,也稱為文章描述。
需要注意的是這里的jcode_archives和jcode_arctype中的jcode_是我表結(jié)構(gòu)的前綴,你需要將這個前綴改成你自己的。

現(xiàn)在我們已經(jīng)將文章描述從數(shù)據(jù)庫里面取出來了。下一步將描述顯示在頁面上,顯示連接文字的代碼本來是這樣的,你可以通過查找找到,其實(shí)就在上面那段代碼的附近:

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['preimg'] = "<a href='$mlink'><img
src=\"{$preRow['litpic']}\" />";
}
else
{
$this->PreNext['pre'] = "上一篇:沒有了 ";
$this->PreNext['preimg']
="<img src=\"/templets/default/images/nophoto.jpg\"
alt=\"對不起,沒有上一圖集了!\"/>";
}
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['nextimg'] = "<a href='$mlink'><img
src=\"{$nextRow['litpic']}\" />";
}
else
{
$this->PreNext['next'] = "下一篇:沒有了 ";
$this->PreNext['nextimg'] ="<a href='javascript:void(0)'
alt=\"\"><img src=\"/templets/default/images/nophoto.jpg\"
alt=\"對不起,沒有下一圖集了!\"/></a>";
}
}

現(xiàn)在為了顯示出文章描述,在每一個a標(biāo)簽之后添加一個div div中包含文章描述(紅色部分):

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> <div>{$preRow['description']}</div>
";
$this->PreNext['preimg'] = "<a href='$mlink'><img
src=\"{$preRow['litpic']}\" />}
else
{
$this->PreNext['pre']
= "上一篇:沒有了 ";
$this->PreNext['preimg'] ="<img
src=\"/templets/default/images/nophoto.jpg\"
alt=\"對不起,沒有上一圖集了!\"/>";
}
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> <div>{$preRow['description']}</div>
";
$this->PreNext['nextimg'] = "<a href='$mlink'><img
src=\"{$nextRow['litpic']}\" />}
else
{
$this->PreNext['next']
= "下一篇:沒有了 ";
$this->PreNext['nextimg'] ="<a href='javascript:void(0)'
alt=\"\"><img src=\"/templets/default/images/nophoto.jpg\"
alt=\"對不起,沒有下一圖集了!\"/></a>";
}
}

【網(wǎng)站聲明】本站除付費(fèi)源碼經(jīng)過測試外,其他素材未做測試,不保證完整性,網(wǎng)站上部分源碼僅限學(xué)習(xí)交流,請勿用于商業(yè)用途。如損害你的權(quán)益請聯(lián)系客服QQ:2655101040 給予處理,謝謝支持。

相關(guān)文檔推薦

我們有時候需要對織夢文檔的點(diǎn)擊量進(jìn)行批量維護(hù),比如采集來的文章,點(diǎn)擊量都為0,需要批量修改,可以用到如下方法1。 1、在數(shù)據(jù)庫里運(yùn)行下面的代碼就可以了,文章的點(diǎn)擊量變得
用過dedecms的朋友都知道,織夢cms后臺系統(tǒng)基本參數(shù)里是無法直接上傳圖片的,我們更換logo圖只能到ftp里替換,非常的不方便,我們?nèi)绻胫苯釉谙到y(tǒng)基本參數(shù)里上傳,要怎么處理呢?
dedecms要想調(diào)用所有子欄目是沒有這個標(biāo)簽的,要調(diào)用只可用sql標(biāo)簽,reid表示子欄目,channeltype=6表示模型為商品,sortrank表示按排序升序.小的放前面 {dede:sql sql=Select * from `dede_arctype` where r
下面小編就為大家分享一篇php 替換文章中的圖片路徑,下載圖片到本地服務(wù)器的方法,具有很好的參考價(jià)值,希望對大家有所幫助。一起跟隨小編過來看看吧
本篇內(nèi)容主要給大家詳細(xì)分析了用PHP制作微信網(wǎng)頁來獲取用戶基本信息的過程,以及步驟講解。
這篇文章主要為大家詳細(xì)介紹了thinkPHP5使用laypage分頁插件實(shí)現(xiàn)列表分頁功能,具有一定的參考價(jià)值,感興趣的小伙伴們可以參考一下
主站蜘蛛池模板: 成人免费福利视频 | 欧美精品国产一区二区 | 国产一级精品毛片 | 成人九区| 一区二区三区四区国产 | 久综合 | 欧美视频精品 | 日韩一级免费大片 | 二区在线观看 | 亚洲精品成人网 | 亚洲午夜精品一区二区三区 | 精品一二三 | 国产欧美一区二区三区日本久久久 | 精品乱码一区二区 | 日韩精品在线观看视频 | 国产精品黄 | 成人在线a | 日本亚洲一区 | 精品国产一区二区三区久久狼黑人 | 免费一级片 | 成人网在线观看 | 在线播放国产视频 | 欧美三区 | www.日韩av.com| 一级做a爰片久久毛片免费看 | 久久久久久久久久久久久9999 | 狠狠亚洲| 亚洲成人一级 | 一区二区三区亚洲 | 自拍偷拍亚洲一区 | 另类一区| 午夜视频在线 | 国产精品久久久久久久久久久久 | 亚洲欧美中文日韩在线v日本 | 久久国产精品无码网站 | 国产欧美日韩一区二区三区 | 91精品久久久久久综合五月天 | yiren22 亚洲综合 | 99精品欧美一区二区三区综合在线 | 黄网免费看| 亚洲精品国产电影 |