discuz 帖子列表页 帖子预览 相关模板

discuz教程
帖子列表页的帖子预览展示用的模板是/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';复制代码

标签: