请选择
进入手机版
|
继续访问电脑版
设为首页
收藏本站
开启辅助访问
用户名
Email
自动登录
找回密码
密码
登录
立即注册
快捷导航
论坛
BBS
导读
在线调色板
大马网站大全
写文章
在线调色板
搜索
搜索
热搜:
discuz
sclub
夜读
本版
文章
帖子
›
门户
›
查看主题
帖子页面显示缩略图 For7.2
发布者:
QMS
|
发布时间: 2022-3-27 20:56
|
查看数: 202
|
评论数: 0
|
帖子模式
1)打开css_common模板,在最下面加上:
<!--骨头帖子列表缩略图-->
.gtsla a{width: 120px; height: 80px; float: left; margin: 0 10px 0 0;}.gtsla a img{height: 80px;width: 120px;}.gtsla{height:80px;margin:10px 0 6px 0}
复制代码
注:图片尺寸可以自由修改
2)打开forumdisplay模板,找到:
<img src="images/attachicons/image_s.gif" alt="{lang attach_img}" class="attach" />
复制代码
替换为:
<!--骨头帖子列表缩略图-->
{eval $q2 = $db->query("SELECT * FROM cdb_attachments WHERE tid='".$thread[tid]."' AND isimage !=0 ORDER BY pid DESC LIMIT 0,4");}
{eval $gtsla=Array();}
{eval $i=0;}
{eval while ($asdfgh=$db->fetch_array($q2)) $gtsla[$i++] = $asdfgh ; }
{eval while ($asdfgh=$db->fetch_array($q2)) $q2[img]=$asdfgh[attachment];}
<br />
<div class="gtsla">
<!--{loop $gtsla $thing}-->
<a href="javascript:void(0);"><img src="http://你的论坛地址/attachments/$thing[attachment]"></a>
<!--{/loop}-->
</div>
<!--骨头帖子列表缩略图end-->
复制代码
注:别漏了在http://你的论坛地址/attachments/$thing[attachment加上你的论坛地址哦!
文章来源:bone.joinbbs.net
骨头系列
最新评论
Powered by
Discuz!
X3.5
|
Copyright © 2001-2023 Tencent Cloud.
快速回复
返回顶部
返回列表