帖子列表页的帖子预览展示用的模板是/template/default/forum/viewthread_preview.htm,展示出来的楼层模板是同目录的viewthread_preview_node.htm
预览按钮是
  1. <!–{if !$_G[‘setting’][‘forumdisplaythreadpreview’] && !($thread[‘readperm’] && $thread[‘readperm’] > $_G[‘group’][‘readaccess’] && !$_G[‘forum’][‘ismoderator’] && $thread[‘authorid’] != $_G[‘uid’])}–>
  2. <!–{if !(!empty($_G[‘setting’][‘antitheft’][‘allow’]) && empty($_G[‘setting’][‘antitheft’][‘disable’][‘thread’]) && empty($_G[‘forum’][‘noantitheft’]))}–>
  3. <a class=”tdpre y” href=”javascript:void(0);” onclick=”previewThread(‘{echo $thread[‘moved’] ? $thread[closed] : $thread[tid]}’, ‘$thread[id]’);”>{lang preview}</a>
  4. <!–{/if}–>
  5. <!–{/if}–>

复制代码

复制代码

包含viewthread_preview.htm页面的html元素tr、td不在模板里,在/static/js/forum.js约600行

  1.     newTr = document.createElement(‘tr’);
  2.     newTr.id = ‘threadPreviewTR_’+tid;
  3.     newTr.className = ‘threadpre’;
  4.     $(tbody).appendChild(newTr);
  5.     newTd = document.createElement(‘td’);
  6.     newTd.colSpan = listcolspan;
  7.     newTd.className = ‘threadpretd’;
  8.     newTr.appendChild(newTd);
  9.     newTr.style.display = ‘none’;

复制代码

复制代码

点赞(0) 打赏

评论列表 共有 0 条评论

暂无评论

微信小程序

微信扫一扫体验

立即
投稿

微信公众账号

微信扫一扫加关注

发表
评论
返回
顶部