返回列表 发帖
查看: 430|回复: 1

[求助] 关于帖子分类信息的问题?

16

主题

38

回帖

65

积分

渐入佳境

贡献
1 点
金币
4 个
发表于 2024-10-31 14:21:45 | 查看全部 |阅读模式


如何让分类信息内容一直显示,意思就是访客、设在购买主题的帖子 分类信息 内容依然显示。
我在模板里 viewthread_node_body.htm 找到了这段分类信息代码,我把这段代码移到的模板的顶端,可以实现了此功能,但是有个问题就是,所有回复的帖子也会显示这个分类,但我这需要主题显示即可。。这个不知如何解决?请高手指教下。。。
  1.   <!--{if $threadsort && $threadsortshow}-->
  2.                         <!--{if $threadsortshow['typetemplate']}-->
  3.                                 $threadsortshow[typetemplate]
  4.                         <!--{elseif $threadsortshow['optionlist']}-->
  5.                                 <div class="typeoption">
  6.                                         <!--{if $threadsortshow['optionlist'] == 'expire'}-->
  7.                                                 {lang has_expired}
  8.                                         <!--{else}-->
  9.                                                 <table summary="{lang threadtype_option}" cellpadding="0" cellspacing="0" class="cgtl mbm">
  10.                                                         <caption>$_G[forum][threadsorts][types][$_G[forum_thread][sortid]]</caption>
  11.                                                         <tbody>
  12.                                                                 <!--{loop $threadsortshow['optionlist'] $option}-->
  13.                                                                         <!--{if $option['type'] != 'info'}-->
  14.                                                                                 <tr>
  15.                                                                                         <th>$option[title]:</th>
  16.                                                                                         <td><!--{if $option['value'] !== ''}-->$option[value] $option[unit]<!--{else}-->-<!--{/if}--></td>
  17.                                                                                 </tr>
  18.                                                                         <!--{/if}-->
  19.                                                                 <!--{/loop}-->
  20.                                                         </tbody>
  21.                                                 </table>
  22.                                         <!--{/if}-->
  23.                                 </div>
  24.                         <!--{/if}-->
  25.                 <!--{/if}-->
复制代码


我知道答案 回答被采纳将会获得1 贡献 已有1人回答
回复

使用道具 举报

16

主题

38

回帖

65

积分

渐入佳境

贡献
1 点
金币
4 个
 楼主| 发表于 2024-10-31 14:28:02 | 查看全部
通过多次摸索,终于找到了解决方法,供大家参考:


解决方法: \template\default\forum\viewthread_node_body.htm
29-53行代码删除,将以下代码粘贴到顶部第二行 <div class="pcb"> 代码下即可。
  1. <!--{if $post['first']}-->
  2.                 <!--{if $threadsort && $threadsortshow}-->
  3.                         <!--{if $threadsortshow['typetemplate']}-->
  4.                                 $threadsortshow[typetemplate]
  5.                         <!--{elseif $threadsortshow['optionlist']}-->
  6.                                 <div class="typeoption">
  7.                                         <!--{if $threadsortshow['optionlist'] == 'expire'}-->
  8.                                                 {lang has_expired}
  9.                                         <!--{else}-->
  10.                                                 <table summary="{lang threadtype_option}" cellpadding="0" cellspacing="0" class="cgtl mbm">
  11.                                                         <caption>$_G[forum][threadsorts][types][$_G[forum_thread][sortid]]</caption>
  12.                                                         <tbody>
  13.                                                                 <!--{loop $threadsortshow['optionlist'] $option}-->
  14.                                                                         <!--{if $option['type'] != 'info'}-->
  15.                                                                                 <tr>
  16.                                                                                         <th>$option[title]:</th>
  17.                                                                                         <td><!--{if $option['value'] !== ''}-->$option[value] $option[unit]<!--{else}-->-<!--{/if}--></td>
  18.                                                                                 </tr>
  19.                                                                         <!--{/if}-->
  20.                                                                 <!--{/loop}-->
  21.                                                         </tbody>
  22.                                                 </table>
  23.                                         <!--{/if}-->
  24.                                 </div>
  25.                         <!--{/if}-->
  26.                 <!--{/if}-->
  27. <!--{/if}-->
复制代码



回复

使用道具 举报

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

本版积分规则

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

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

GMT+8, 2025-5-1 12:43 , Processed in 0.057177 second(s), 26 queries .

Powered by Discuz! W1.0 Licensed

Cpoyright © 2001-2025 Discuz! Team.

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