MindTouch deki publish recent changes in a feed, but it's complex to display this feed on a wiki page (forum post) if you have the wiki on a secure server (https) with global authentication system.
Solution: create a dekiscript in order to extract last pages edited and display them in a table
Note: this works better with Fiesta Pro skin due to a better table css layout, it is compatible with dekiwiki 8.05 or later because require wiki.getsearch
Instruction: you can modify search results using wiki.getsearch parameters, note that first and last parameters use the power lucene syntax
http://wiki.developer.mindtouch.com/...s_in_a_page%3f
Solution 1 - Dekiscript
You can use this script in a template and include it anywhere in the wiki with wiki.template()
You can pass a parameter called path in order to restrict the pages listed to a specific section of the wiki
Code
<table block="
var number = (args.number ?? 20);
var msg=(#args.path!=0 ? 'Ultime modifiche nella sezione '..args.path : 'ultime modifiche della wiki');
var path=(#args.path!=0 ? 'path:'..args.path..'/*':'');path;
var result = wiki.getsearch('type:wiki OR type:document OR type:image', number, '-date',path);" width="100%" border="1" cellpadding="4" cellspacing="0" class="feedtable">
<tbody>
<tr>
<td valign="top" colspan="4" bgcolor="#cccccc" style="text-align: center; "><strong>{{msg}}</strong></td>
</tr>
<tr>
<td bgcolor="#cccccc"><strong>Pagina</strong></td>
<td bgcolor="#cccccc"><strong>Data</strong></td>
<td bgcolor="#cccccc"><strong>Autore</strong></td>
<td bgcolor="#cccccc"><strong>Sommario</strong></td>
</tr>
<tr foreach="var pa in result" class="{{__count % 2 == 0 ? 'feedroweven' : 'feedrowodd'}}">
<td if="pa.uri!=nil" style="WORD-BREAK:BREAK-ALL" width="50%">{{pa.id ? web.link(pa.uri, pa.path):web.html("File "..web.link(pa.uri, pa.name).." in "..web.link(pa.page.uri,pa.page.path).."")}}</td>
<td nowrap="" if="pa.uri!=nil"><small>{{date.format(pa.date,"dd/MM/yy - HH:mm")}}</small></td>
<td if="pa.uri!=nil"><small>{{web.link("/Special:Contributions?target="..pa.author.name, pa.author.name)}}</small></td>
<td if="pa.uri!=nil"><small>{{ pa.id? web.link('/index.php?title='..uri.encode(pa.path)..'&action=history',pa.editsummary):''}}</small></td>
</tr>
<tr>
<td valign="top" style="word-break: break-all; text-align: center; " colspan="4"><a title="/Special:Recentchanges" class="internal" href="mks://localhost/Special:Recentchanges">Ultime modifiche di tutta la wiki</a> </td>
</tr>
</tbody>
</table>
Example
| ultime modifiche della wiki |
| Pagina | Data | Autore | Sommario |
| User:maurizio_brasiello | 29/08/10 - 00:57 | wikiadmin | pagina creata, 16 parole aggiunte |
| User:Lucky | 17/08/10 - 11:46 | wikiadmin | pagina creata, 16 parole aggiunte |
| User:nicola | 17/08/10 - 09:43 | wikiadmin | pagina creata, 16 parole aggiunte |
| User:Claudio | 16/08/10 - 22:37 | wikiadmin | pagina creata, 16 parole aggiunte |
| Template:XsysMySqlDisplayRecord | 24/07/10 - 07:09 | wikiadmin | 2 parole aggiunte, 2 parole cancellate |
| Template:XeleMySqlElenco | 24/07/10 - 07:08 | wikiadmin | 2 parole aggiunte, 2 parole cancellate |
| Applicazioni/Rubrica/Persone/Sabena_-_Gianluca | 22/07/10 - 13:41 | wikiadmin | nessun cambiamento visibile; Nome pagina ripristinato |
| Template:XsysPrintSection | 22/07/10 - 13:39 | wikiadmin | 4 parole aggiunte, 14 parole cancellate |
| User:ares | 22/07/10 - 12:35 | ares | nessun cambiamento al testo |
| http://mindtouch.intertesto.com/@api/deki/files/238/=prova.txt | 22/07/10 - 12:33 | ares | /content/body/div[1]/div[2]/table/tbody/tr[3]/td[4]/small/span, function 'uri.encode' failed (click for details)MindTouch.Deki.Script.DekiScriptInvokeException: function 'uri.encode' failed ---> System.ArgumentException: missing value for parameter 'text' (index 0)
at MindTouch.Deki.DekiScriptFunction+DekiScriptInvokeDelegateWrapper.Invoke (MindTouch.Deki.Script.DekiScriptLiteral arguments) [0x00000]
at MindTouch.Deki.DekiScriptFunctionNative.Invoke (MindTouch.Deki.Script.DekiScriptLiteral arguments) [0x00000]
at MindTouch.Deki.Script.DekiScriptRuntime+<Invoke>d__0.MoveNext () [0x00000]
--- End of inner exception stack trace ---
at MindTouch.Deki.Script.DekiScriptRuntime+<Invoke>d__0.MoveNext () [0x00000]
at MindTouch.Tasking.Coroutine.Invoke (System.Func`1 invocation) [0x00000]
--- End of exception stack trace ---
at MindTouch.Deki.Script.DekiScriptRuntime.Invoke(XUri uri, DekiScriptLiteral args, DekiScriptEnv env, Result`1 result)
at MindTouch.Deki.DekiWikiService.GetPageContents(DreamContext context, DreamMessage request, Result`1 response)
--- End of coroutine stack trace --- |
| Applicazioni/Rubrica/Stampa_elenco_persone | 22/07/10 - 11:23 | wikiadmin | 1 parole aggiunte, 1 parole cancellate |
| Web/Xsys/SkinBottom | 19/07/10 - 16:22 | wikiadmin | 1 parole aggiunte, 5 parole cancellate |
| Applicazioni | 19/07/10 - 16:12 | wikiadmin | 46 parole aggiunte |
| Web/Xsys/SkinTop | 19/07/10 - 16:10 | wikiadmin | 27 parole aggiunte, 9 parole cancellate |
| Applicazioni/Statistiche | 19/07/10 - 11:21 | wikiadmin | 11 parole cancellate |
| Applicazioni/Contwik | 19/07/10 - 10:22 | wikiadmin | 76 parole aggiunte, 104 parole cancellate |
| http://mindtouch.intertesto.com/@api/deki/files/237/=Picture%2b11.png | 19/07/10 - 09:48 | wikiadmin | /content/body/div[1]/div[2]/table/tbody/tr[3]/td[4]/small/span, function 'uri.encode' failed (click for details)MindTouch.Deki.Script.DekiScriptInvokeException: function 'uri.encode' failed ---> System.ArgumentException: missing value for parameter 'text' (index 0)
at MindTouch.Deki.DekiScriptFunction+DekiScriptInvokeDelegateWrapper.Invoke (MindTouch.Deki.Script.DekiScriptLiteral arguments) [0x00000]
at MindTouch.Deki.DekiScriptFunctionNative.Invoke (MindTouch.Deki.Script.DekiScriptLiteral arguments) [0x00000]
at MindTouch.Deki.Script.DekiScriptRuntime+<Invoke>d__0.MoveNext () [0x00000]
--- End of inner exception stack trace ---
at MindTouch.Deki.Script.DekiScriptRuntime+<Invoke>d__0.MoveNext () [0x00000]
at MindTouch.Tasking.Coroutine.Invoke (System.Func`1 invocation) [0x00000]
--- End of exception stack trace ---
at MindTouch.Deki.Script.DekiScriptRuntime.Invoke(XUri uri, DekiScriptLiteral args, DekiScriptEnv env, Result`1 result)
at MindTouch.Deki.DekiWikiService.GetPageContents(DreamContext context, DreamMessage request, Result`1 response)
--- End of coroutine stack trace --- |
| User:wikiadmin/Titolo_Pagina | 11/07/10 - 14:55 | wikiadmin | 6 parole aggiunte, 2 parole cancellate |
| Prova | 01/07/10 - 20:23 | aleon | 211 parole cancellate |
| User:aleon | 01/07/10 - 20:20 | wikiadmin | pagina creata, 8 parole aggiunte |
| Ultime modifiche di tutta la wiki |
Solution 2 - feed.table or feed.list
It is possible to feed rss url with feed.table or feed.list function
Code
feed.list('http://www.intertesto.com/@api/deki/site/feed', 10)
Example
/content/body/div[2]/div[2]/pre, function 'List' failed (click for details)MindTouch.Deki.Script.DekiScriptInvokeException: function 'List' failed ---> System.InvalidProgramException: Invalid IL code in (wrapper runtime-invoke) MindTouch.Deki.Services.FeedService:runtime_invoke_IEnumerator`1<IYield>__this___XUri_Nullable`1<int>_Result`1<XDoc> (object,intptr,intptr,intptr): IL_0031: call 0x00000006
at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (object,object[],System.Exception&)
at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000]
--- End of exception stack trace ---
at MindTouch.Deki.Script.DekiScriptRuntime.Invoke(XUri uri, DekiScriptLiteral args, DekiScriptEnv env, Result`1 result)
at MindTouch.Deki.DekiWikiService.GetPageContents(DreamContext context, DreamMessage request, Result`1 response)
--- End of coroutine stack trace ---
--- End of inner exception stack trace ---
at MindTouch.Deki.Script.DekiScriptRuntime+<Invoke>d__0.MoveNext () [0x00000]
at MindTouch.Tasking.Coroutine.Invoke (System.Func`1 invocation) [0x00000]
--- End of exception stack trace ---
at MindTouch.Deki.Script.DekiScriptRuntime.Invoke(XUri uri, DekiScriptLiteral args, DekiScriptEnv env, Result`1 result)
at MindTouch.Deki.DekiWikiService.GetPageContents(DreamContext context, DreamMessage request, Result`1 response)
--- End of coroutine stack trace ---
Commenti