帖子列表页的帖子预览展示用的模板是/template/default/forum/viewthread_preview.htm,展示出来的楼层模板是同目录的viewthread_preview_node.htm
预览按钮是
预览按钮是
<!--{if !$_G['setting']['forumdisplaythreadpreview'] && !($thread['readperm'] && $thread['readperm'] > $_G['group']['readaccess'] && !$_G['forum']['ismoderator'] && $thread['authorid'] != $_G['uid'])}--> <!--{if !(!empty($_G['setting']['antitheft']['allow']) && empty($_G['setting']['antitheft']['disable']['thread']) && empty($_G['forum']['noantitheft']))}--> <a class="tdpre y" href="javascript:void(0);" onclick="previewThread('{echo $thread['moved'] ? $thread[closed] : $thread[tid]}', '$thread[id]');">{lang preview}</a> <!--{/if}--> <!--{/if}--> 复制代码 |
包含viewthread_preview.htm页面的html元素tr、td不在模板里,在/static/js/forum.js约600行 newTr = document.createElement('tr'); newTr.id = 'threadPreviewTR_'+tid; newTr.className = 'threadpre'; $(tbody).appendChild(newTr); newTd = document.createElement('td'); newTd.colSpan = listcolspan; newTd.className = 'threadpretd'; newTr.appendChild(newTd); newTr.style.display = 'none'; 复制代码 |
声明:有的资源均来自网络转载,版权归原作者所有,如有侵犯到您的权益 请联系邮箱:123456@qq.com 我们将配合处理!
原文地址:discuz 帖子列表页 帖子预览 相关模板下载发布于2023-06-12 02:43:35