1

As the tag implies, I am using MediaWiki as wiki-software. I would like to include the talk page/discussion into the page the talk/discussion is about.

I figured out how to include the talk page as a whole already doing something like this fo example (don't bother with the German notation): {{Diskussion:Test}} which add the talk page of the article Test.

The next step would be to limit the output to e.g. the 5 most recent talk "posts" (they are rather gouped under 2nd-grade headlines, I presume). Insertin of special pages can be limited by using additional parameters like so: {{Special:RecentChanges/days=5,limit=40}} as mentioned in MediaWiki help articles. However, these parameters obviously don't work when including the talk page because it is a single page/element. {{Diskussion:Test/days=5,limit=40}} is not even parsed.

Any hints and examples ae appreciated, although I prefer not to use extensions IF POSSIBLE.

4

1 回答 1

1

通常的方法是通过添加适当的noinclude(或 onlyinclude)标签来编辑 [[Diskussion:Test]] :

<noinclude>
blabla
</noinclude>
== The ==
...
== sections ==
...
== I ==
...
== want==
...
== transcluded ==
...

现在 {{Diskussion:Test}} 不会包含旧的东西。这是最干净的解决方案,但在许多页面上可能会很乏味:您可以使用bot自动执行此操作。

wiki 上有无数可能的解决方案,例如,您可以将所有内容转置,然后使用 JavaScript 隐藏“多余”部分;或者您可以将所有讨论页讨论包装在一个模板中,然后当嵌入主题命名空间时,该模板仅显示最新的 X。

至于“正确”的解决方案,也许您正在寻找讨论扩展。如果你有勇气,你可以测试 LiquidThreads,直接在页面上添加线程(而不是说话),并根据需要设置自动存档。

于 2014-12-19T18:39:17.163 回答