返回列表 发帖
查看: 343|回复: 2

[已解决] 怎么设置默认封面

1

主题

2

回帖

8

积分

初学乍练

贡献
0 点
金币
5 个
发表于 2024-2-20 15:01:38 | 显示全部楼层 |阅读模式
discuz可以设置封面的,帖子封面,可默认封面很难看,如何设计成自己的,是哪个图片? IMG_0687.jpeg
这是默认封面,我找了nophoto图片,可都不是
1 贡献

最佳答案

template\default\forum\forumdisplay_list.htm


          <!--{if $thread['cover']}-->
                                                                                        <img src="$thread[coverpath]" alt="$thread[subject]" width="{$_G[setting][forumpicstyle][thumbwidth]}" />
                                                                                <!--{else}-->
                                                                                        <span class="nophoto nopic" style="width:{$_G[setting][forumpicstyle][thumbwidth]}px; height:{$_G[setting][forumpicstyle][thumbwidth]}px; line-height:{$_G[setting][forumpicstyle][thumbwidth]}px;"></span>
                                                                                <!--{/if}-->


找到这段代码;
.nophoto:before{} 这个伪类 控制设置了 默认封面;


将  上边那段代码中 的
<span class="nophoto nopic" style="width:{$_G[setting][forumpicstyle][thumbwidth]}px; height:{$_G[setting][forumpicstyle][thumbwidth]}px; line-height:{$_G[setting][forumpicstyle][thumbwidth]}px;"></span>

模仿
<img src="$thread[coverpath]" alt="$thread[subject]" width="{$_G[setting][forumpicstyle][thumbwidth]}" />
替换成自己的图片即可;

如果你能看到img标签 就应该明白我说的是什么意思了
回复

使用道具 举报

8

主题

1573

回帖

2718

积分

应用开发者

贡献
186 点
金币
123 个
QQ
发表于 2024-2-20 16:24:05 | 显示全部楼层
template\default\forum\forumdisplay_list.htm


          <!--{if $thread['cover']}-->
                                                                                        <img src="$thread[coverpath]" alt="$thread[subject]" width="{$_G[setting][forumpicstyle][thumbwidth]}" />
                                                                                <!--{else}-->
                                                                                        <span class="nophoto nopic" style="width:{$_G[setting][forumpicstyle][thumbwidth]}px; height:{$_G[setting][forumpicstyle][thumbwidth]}px; line-height:{$_G[setting][forumpicstyle][thumbwidth]}px;"></span>
                                                                                <!--{/if}-->


找到这段代码;
.nophoto:before{} 这个伪类 控制设置了 默认封面;


将  上边那段代码中 的
<span class="nophoto nopic" style="width:{$_G[setting][forumpicstyle][thumbwidth]}px; height:{$_G[setting][forumpicstyle][thumbwidth]}px; line-height:{$_G[setting][forumpicstyle][thumbwidth]}px;"></span>

模仿
<img src="$thread[coverpath]" alt="$thread[subject]" width="{$_G[setting][forumpicstyle][thumbwidth]}" />
替换成自己的图片即可;

如果你能看到img标签 就应该明白我说的是什么意思了
专业解决各类服务器问题 和 discuz疑难杂症!
QQ 860855665 西部数码核心代理www.wensuhulian.com 飘仙建站论坛bbs.piaoxian.net
discuz互助QQ群 73131419
回复 支持 1 反对 0

使用道具 举报

35

主题

2024

回帖

3503

积分

应用开发者

Discuz! 运维

贡献
99 点
金币
616 个
QQ
发表于 2024-2-20 15:38:21 | 显示全部楼层
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

  • 关注公众号
  • 有偿服务微信
  • 有偿服务QQ

手机版|小黑屋|Discuz! 官方交流社区 ( 皖ICP备16010102号 |皖公网安备34010302002376号 )|网站地图|star

GMT+8, 2024-5-14 21:04 , Processed in 0.048217 second(s), 11 queries , Redis On.

Powered by Discuz! W1.0 Licensed

Cpoyright © 2001-2024 Discuz! Team.

关灯 在本版发帖
有偿服务QQ
有偿服务微信
返回顶部
快速回复 返回顶部 返回列表