• [织梦吧]唯一域名:www.dedecms8.com,织梦DedeCMS学习平台.

当前位置: > DedeCMS教程 > Dedecms二次开发 >

dedecms上一篇下一篇调用图片的方法

来源: www.dedecms8.com 编辑:织梦吧 时间:2011-02-17点击:

文件所在目录地址:/include/arc.archives.class.php
查找:arc.money,arc.filename, 在后面添加arc.litpic,
查找:$this->PreNext['pre'] = "上一篇:<a href='$mlink'>{$preRow['title']}</a> ";

替换:[上一篇]
if(empty($preRow['litpic']))
{
$this->PreNext['pre'] = "上一篇:<a href='$mlink'>{$preRow['title']}</a> ";
}else{
$preimage = str_replace('/photo-img', 'http://images.jiaju123.com',trim($preRow['litpic']));
$this->PreNext['pre'] = "<div class=\"photo_article_pre\">
<div class=\"pre_photo\"><a href=\"$mlink\"><img src=\"$preimage\" alt=\"上一篇:{$preRow['title']}\"></a></div>
<div class=\"pre_right\">
<p>上一篇:{$preRow['title']}</p>
<div class=\"photo_textlink\">◀<a href=\"$mlink\">浏览上一张图片</a></div>
</div></div>";
}


查找:$this->PreNext['next'] = "下一篇:<a href='$mlink'>{$nextRow['title']}</a> ";

替换:if(empty($nextRow['litpic']))
{
$this->PreNext['next'] = "下一篇:<a href='$mlink'>{$nextRow['title']}</a> ";
}else{
$nextimage = str_replace('/photo-img', 'https://www.dedecms8.com',trim($nextRow['litpic']));
$this->PreNext['next'] = "<div class=\"photo_article_next\">
<div class=\"pre_photo\"><a href=\"$mlink\"><img src=\"$nextimage\" alt=\"下一篇:{$nextRow['title']}\"></a></div>
<div class=\"pre_right\">
<p>下一篇:{$nextRow['title']}</p>
<div class=\"photo_textlink\">▶<a href=\"$mlink\">浏览下一张图片</a></div>
</div></div>";
}

About D8

  • ©2014 织梦吧(d8) DedeCMS学习交流平台
  • 唯一网址 www.DedeCMS8.com 网站地图
  • 联系我们 1170734538@qq.com ,  QQ