Documentation

This uses solr and infintescroll to create a frontpage widget.

Parameters
  • HEIGHT: height of scroll container, defaults to 40em
  • LIMIT: number of rows to render, defaults to 20
  • PAGE: from which page to start rendering
  • THEWEB: the web to render recent changes for
  • FILTER: lucene filter to be added to the search query

Implementation

%STARTINCLUDE%<!-- -->
<div class="jqInfiniteScroll recentChanges {itemSelector:'.clsIndexItem', localMode:true, bufferPx:200}">
%DBCALL{"%WEB%.%TOPIC%" 
  section="backend" 
  LIMIT="%IF{"defined LIMIT" then="%LIMIT%" else="20"}%"
  PAGE="%IF{"defined PAGE" then="%PAGE%" else="0"}%"
  THEWEB="%IF{"defined THEWEB" then="%THEWEB%" else="%BASEWEB%"}%"
  FILTER="%IF{"defined FILTER" then="%FILTER%"}%"
}%
</div>
<div class="jqInfiniteScrollNavi foswikiHidden">
  <a href="%SCRIPTURLPATH{"view"}%/%WEB%/%TOPIC%?page=1;section=backend;skin=text;web=%IF{"defined THEWEB" then="%THEWEB%" else="%BASEWEB%"}%;filter=%IF{"defined FILTER" then="%FILTER%"}%;limit=%IF{"defined LIMIT" then="%LIMIT%" else="50"}%" class='jqInfiniteScrollNext'>More</a>
</div>
<literal><style>
.recentChanges {
  overflow-y:auto;
  padding-right:1em;
  height:%IF{"defined HEIGHT" then="%HEIGHT%" else="40em"}%;
}
</style></literal>
<!-- %JQREQUIRE{"infinitescroll"}% -->%STOPINCLUDE%

Backend

%STARTSECTION{"backend"}%<noautolink>
%DBQUERY{
  "%URLPARAM{"filter" default="%FILTER%"}%"
  exclude="^(WebChanges|WebPreferences|WebTopicLinks|WebIndex|WebNotify|WebHome|WebLinks|TopCategory|Category|ClassifiedTopic|TopicType|WebTopicEditTemplate|WebAtom|WebRss|WebLeftBar|WebSearch.*)$"
  web="%URLPARAM{"web" default="%THEWEB%"}%"
  skip="%CALC{"$EVAL(%URLPARAM{"page" default="%PAGE%"}%*%URLPARAM{"limit" default="%LIMIT%"}%)"}%"
  limit="%URLPARAM{"limit" default="%LIMIT%"}%" 
  sort="modified"
  reverse="on"
  format="$percntDBCALL{\"$web.$topic->RenderIndexItem\"}$percnt"
  separator="$n"
}%
</noautolink>%ENDSECTION{"backend"}%

Test

WikiTopicViewTemplate %REDDOT{"Applications.WikiTopicViewTemplate"}%
Generic topic view, 04 Nov 2013 - 12:13, AdminUser
WikiTopicEditTemplate %REDDOT{"Applications.WikiTopicEditTemplate"}%
TopicView to edit a WikiTopic, 04 Nov 2013 - 12:13, AdminUser
WikiTopic %REDDOT{"Applications.WikiTopic"}%
A normal topic for Foswiki, 04 Nov 2013 - 12:13, AdminUser
WikiApplicationViewTemplate %REDDOT{"Applications.WikiApplicationViewTemplate"}%
TopicView for WikiApplications, 04 Nov 2013 - 12:13, AdminUser
WikiApplicationTemplate %REDDOT{"Applications.WikiApplicationTemplate"}%
TopicTemplate to generate a WikiApplication topic, 04 Nov 2013 - 12:13, AdminUser
WikiApplicationEditTemplate %REDDOT{"Applications.WikiApplicationEditTemplate"}%
Editor for WikiApplications, 04 Nov 2013 - 12:13, AdminUser
WikiApplication %REDDOT{"Applications.WikiApplication"}%
TopicType of a WikiApplication, 04 Nov 2013 - 12:13, AdminUser
WebTopicList %REDDOT{"Applications.WebTopicList"}%
04 Nov 2013 - 12:13, AdminUser
WebTool %REDDOT{"Applications.WebTool"}%
TopicType for topics on the administrative level, 04 Nov 2013 - 12:13, AdminUser
TopicView %REDDOT{"Applications.TopicView"}%
Views and editors, 04 Nov 2013 - 12:12, AdminUser
TopicViewTemplate %REDDOT{"Applications.TopicViewTemplate"}%
Template to create TopicViews, 04 Nov 2013 - 12:12, AdminUser
TopicTypeTemplate %REDDOT{"Applications.TopicTypeTemplate"}%
Template to create TopicTypes, 04 Nov 2013 - 12:12, AdminUser
TopicTypeViewTemplate %REDDOT{"Applications.TopicTypeViewTemplate"}%
TopicView for TopicTypes, 04 Nov 2013 - 12:12, AdminUser
TopicTypeEditTemplate %REDDOT{"Applications.TopicTypeEditTemplate"}%
Editor for TopicTypes, 04 Nov 2013 - 12:12, AdminUser
TopicTemplateTemplate %REDDOT{"Applications.TopicTemplateTemplate"}%
Template to create a TopicTemplate, 04 Nov 2013 - 12:12, AdminUser
TopicTemplate %REDDOT{"Applications.TopicTemplate"}%
Blueprints for wiki topics, 04 Nov 2013 - 12:12, AdminUser
TopicStubTemplate %REDDOT{"Applications.TopicStubTemplate"}%
Template for TopicStubs, 04 Nov 2013 - 12:12, AdminUser
TopicStubViewTemplate %REDDOT{"Applications.TopicStubViewTemplate"}%
TopicView for TopicStubs, 04 Nov 2013 - 12:12, AdminUser
TopicStub %REDDOT{"Applications.TopicStub"}%
A placeholder or redirect topic, 04 Nov 2013 - 12:12, AdminUser
TopicStubEditTemplate %REDDOT{"Applications.TopicStubEditTemplate"}%
Editor for TopicStubs, 04 Nov 2013 - 12:12, AdminUser

Copyright

©2006-2013 Michael Daum http://michaeldaumconsulting.com

This file is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. For more details read the LICENSE.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY, to the extent permitted by law; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

ApplicationTopic edit

TopicType DocuTopic, TopicFunction
TopicTitle
Summary renders a list of recent changes in a web
WikiApplication none
Topic revision: r1 - 04 May 2013, micha
 

Das Urheberrecht © liegt bei den mitwirkenden Autoren. Alle Inhalte dieser Kollaborations-Plattform sind Eigentum der Autoren.