模拟讨论区 组件

这是一个未完成组件,有部分模块存在未修复的问题。

评分: +1+x
  • 存在两种讨论串,一种是单页讨论,这种没有摘要,但是标题有一个返回的链接;另外一种是一般的发帖,这种会有摘要,不知道怎么写切换逻辑比较好
  • 如果隐藏页面本身的标题,如何在任何网站上都让假标题(.meta-title)继承真标题(#page-title)的样式?

职员贴:删帖
AreyoucrazytomAreyoucrazytom 1 Apr 2021, 12:00

短而无物,该杀!

a16.png(account deleted) 3 Apr 2021, 20:01

怎么不是长而无物了

大家好啊,我是……
Dr TalciteDr Talcite 22 Jun 2025, 15:00

本组件试图利用wikidot原生的元素和版式模拟讨论区,不需要任何外部样式,理论上可以兼容任何wikidot站点。

下面几个组成部分有的不是必须的,但是在源代码中必须按顺序放置。请仔细阅读下面说明再复制使用:

(可选)隐藏页面标题,替换成假标题

[[include :area-cn-02:component:forum-posts hide-title=-]]]

(可选)讨论串开头

类似于讨论区的开头“摘要”部分。如果要用,把这一块代码放在下面的整个“帖子结构”前面。预览:点击查看效果

[[include :area-cn-02:component:forum-posts thread-head=-]
|thread-link= 前往原页面的链接URL(也可以写其它网页)
|thread-link-text= URL的文字,(通常是原页面的标题,但是可以随便写)
|thread-title-suffix=/ 讨论区(这个字可以换)
|thread-time= 讨论串发起时间,通常和一楼发帖时间相同(格式是14 Mar 2023, 16:02 这种,日/英文月/年+24小时制的时分)
|post-count= 帖子总楼数
]]


帖子结构

[[include :area-cn-02:component:forum-posts thread-start=-]]]

[[include :area-cn-02:component:forum-posts post-start=-]
|title= 贴文标题
|user= 发帖者的wikidot id
|time= 发帖时间(格式是14 Mar 2023, 16:02 这种,日/英文月/年+24小时制的时分)
]]

贴文内容(适用所有普通wikidot语法)

如果要插入嵌套回复,请在这里插入另外一整个蓝色部分

[[include :area-cn-02:component:forum-posts post-end=-]]]

如果要插入后续平级回复,请在这里插入另外一整个蓝色部分

[[include :area-cn-02:component:forum-posts thread-end=-]]]


模拟删号的用户

请将上面的回复开头这一行

[[include :area-cn-02:component:forum-posts post-start=-]

替换成:

[[include :area-cn-02:component:forum-posts post-start-deleted=-]


如果加了讨论串开头,必须在最后加个结尾,否则会炸

[[include :area-cn-02:component:forum-posts thread-end-end=-]]]

除非特别注明,本页内容采用以下授权方式: Creative Commons Attribution-ShareAlike 3.0 License