ページ Matrix feed の変更
EM SSRが2026/10/14 05:39に最終更新
要約
-
ページのプロパティー (1変更済、0追加済、0削除済)
-
オブジェクト (0変更済、4追加済、0削除済)
詳細
- ページのプロパティー
-
- 非表示
-
... ... @@ -1,1 +1,1 @@ 1 - false1 +true
- XWiki.WikiMacroClass[0]
-
- マクロのID
-
... ... @@ -1,0 +1,1 @@ 1 +matrix-feed - マクロの名称
-
... ... @@ -1,0 +1,1 @@ 1 +Matrix feed - マクロの説明
-
... ... @@ -1,0 +1,1 @@ 1 +Shows the latest messages of a Matrix room (read-only). - Default categories
-
... ... @@ -1,0 +1,1 @@ 1 +Content - マクロの見え方
-
... ... @@ -1,0 +1,1 @@ 1 +Current Wiki - インラインモードをサポート
-
... ... @@ -1,0 +1,1 @@ 1 +いいえ - マクロの内容の利用可能性
-
... ... @@ -1,0 +1,1 @@ 1 +No content - マクロのコード
-
... ... @@ -1,0 +1,33 @@ 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 +
- XWiki.WikiMacroParameterClass[0]
-
- パラメーター名
-
... ... @@ -1,0 +1,1 @@ 1 +room - パラメーターの説明
-
... ... @@ -1,0 +1,1 @@ 1 +Room alias - 必須のパラメーター
-
... ... @@ -1,0 +1,1 @@ 1 +いいえ - パラメーターの既定の値
-
... ... @@ -1,0 +1,1 @@ 1 +#announcements:out-of-context.blog
- XWiki.WikiMacroParameterClass[1]
-
- パラメーター名
-
... ... @@ -1,0 +1,1 @@ 1 +limit - パラメーターの説明
-
... ... @@ -1,0 +1,1 @@ 1 +Number of messages (1-20) - 必須のパラメーター
-
... ... @@ -1,0 +1,1 @@ 1 +いいえ - パラメーターの既定の値
-
... ... @@ -1,0 +1,1 @@ 1 +5
- XWiki.WikiMacroParameterClass[2]
-
- パラメーター名
-
... ... @@ -1,0 +1,1 @@ 1 +title - パラメーターの説明
-
... ... @@ -1,0 +1,1 @@ 1 +Heading text - 必須のパラメーター
-
... ... @@ -1,0 +1,1 @@ 1 +いいえ