ページ Matrix feed の変更

EM SSRが2026/10/14 05:39に最終更新

バージョン 4.1 から
EM SSRにより編集
2026/10/14 05:19に
変更についてのコメント: このバージョンのコメントはありません
バージョン 1.1 へ
EM SSRにより編集
2026/10/14 05:19に
変更についてのコメント: このバージョンのコメントはありません

要約

詳細

XWiki.WikiMacroClass[0]
マクロのコード
... ... @@ -1,33 +1,0 @@
1 -{{velocity}}
2 -#set ($ooc = $xwiki.parseGroovyFromPage('OOC.Lib').init($xcontext.context, $services))
3 -#set ($room = "$!xcontext.macro.params.room")
4 -#set ($limit = $mathtool.toInteger("$!xcontext.macro.params.limit"))
5 -#if (!$limit || $limit < 1)
6 - #set ($limit = 5)
7 -#end
8 -#set ($title = "$!xcontext.macro.params.title")
9 -#if (!$ooc.validRoom($room))
10 -{{error}}room の指定が正しくありません。{{/error}}
11 -#else
12 -#set ($msgs = $ooc.recentMessages($room, $limit))
13 -{{html clean="false" wiki="false"}}
14 -<div class="ooc-matrix-feed">
15 -#if ($title != '')<h3 style="margin-top:0">$escapetool.xml($title)</h3>#end
16 -#if ($msgs.isEmpty())
17 - <p><em>まだ投稿がありません。</em></p>
18 -#else
19 - <ul style="list-style:none;padding-left:0;margin:0">
20 - #foreach ($m in $msgs)
21 - <li style="padding:.5em 0;border-bottom:1px solid rgba(128,128,128,.25)">
22 - <div style="font-size:.85em;opacity:.7">$escapetool.xml($m.sender) ・ $escapetool.xml($ooc.fmtTs($m.ts))</div>
23 - <div style="white-space:pre-wrap;word-break:break-word">$escapetool.xml($m.body)</div>
24 - </li>
25 - #end
26 - </ul>
27 -#end
28 -<p style="margin:.6em 0 0"><a href="$escapetool.xml($ooc.chatUrl())/#/room/$escapetool.xml($room.replace('#','%23'))">掲示板で開く »</a></p>
29 -</div>
30 -{{/html}}
31 -#end
32 -{{/velocity}}
33 -
マクロの内容の利用可能性
... ... @@ -1,1 +1,0 @@
1 -No content
Default categories
... ... @@ -1,1 +1,0 @@
1 -Content
マクロの説明
... ... @@ -1,1 +1,0 @@
1 -Shows the latest messages of a Matrix room (read-only).
マクロのID
... ... @@ -1,1 +1,0 @@
1 -matrix-feed
マクロの名称
... ... @@ -1,1 +1,0 @@
1 -Matrix feed
インラインモードをサポート
... ... @@ -1,1 +1,0 @@
1 -いいえ
マクロの見え方
... ... @@ -1,1 +1,0 @@
1 -Current Wiki
XWiki.WikiMacroParameterClass[0]
パラメーターの既定の値
... ... @@ -1,1 +1,0 @@
1 -#announcements:out-of-context.blog
パラメーターの説明
... ... @@ -1,1 +1,0 @@
1 -Room alias
必須のパラメーター
... ... @@ -1,1 +1,0 @@
1 -いいえ
パラメーター名
... ... @@ -1,1 +1,0 @@
1 -room
XWiki.WikiMacroParameterClass[1]
パラメーターの既定の値
... ... @@ -1,1 +1,0 @@
1 -5
パラメーターの説明
... ... @@ -1,1 +1,0 @@
1 -Number of messages (1-20)
必須のパラメーター
... ... @@ -1,1 +1,0 @@
1 -いいえ
パラメーター名
... ... @@ -1,1 +1,0 @@
1 -limit