RenderRecentChanges
renders a list of recent changes in a web

%REVINFO{ " $date - $hour:$min " rev=" IF{ "%NATMAXREV%!=%CURREV%" then="%CURREV%" }: Syntax error in '%NATMAXREV%!=%CURREV%' at '%NATMAXREV%!=%CURREV%' " topic="Applications.RenderRecentChanges" }% | Version 1 |

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: 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="%LIMIT{default="20"}%"
  PAGE="%PAGE{default="0"}%"
  THEWEB="%THEWEB{default="%BASEWEB%"}%"
  FILTER="%FILTER{default="TopicType!~'\bTopicStub\b'"}%"
}%
</div>
<div class="jqInfiniteScrollNavi foswikiHidden">
  <a href="%SCRIPTURLPATH{"view"}%/%WEB%/%TOPIC%?page=1&section=backend&skin=text&template=view&web=%THEWEB{default="%BASEWEB%"}%&filter=%ENCODE{"%FILTER{default="TopicType!~'\bTopicStub\b'"}%"}%&limit=%LIMIT{default="20"}%" class='jqInfiniteScrollNext'>More</a>
</div>
<literal><style>
.recentChanges {
  overflow-x:hidden;
  overflow-y:auto;
  padding-right:1em;
  height:%HEIGHT{default="40em"}%;
}
</style></literal>
<!-- %JQREQUIRE{"infinitescroll" warn="off"}% -->%STOPINCLUDE%

Backend

%STARTSECTION{"backend"}%<noautolink>%DBQUERY{
  "%URLPARAM{"filter" default="%FILTER{default="TopicType!~'\bTopicStub\b'"}%"}%"
   exclude="^(WebLexicon|WebChanges|WebPreferences|WebStatistics|WebTopicList|WebIndex|WebNotify|WebHome|WebLinks|TopCategory|Category|ClassifiedTopic|TopicType|WebTopicEditTemplate|WebAtom|WebRss|WebLeftBar|WebSearch.*|WebTagList|CategoryBrowser|UntaggedTopics|UncategorizedTopics)$"
  webs="%URLPARAM{"web" default="%THEWEB{default="%BASEWEB%"}%"}%"
  skip="%CALCULATE{"$EVAL(%URLPARAM{"page" default="%PAGE{default="0"}%"}%*%URLPARAM{"limit" default="%LIMIT{default="20"}%"}%)"}%"
  limit="%URLPARAM{"limit" default="%LIMIT{default="20"}%"}%" 
  sort="modified"
  reverse="on"
  format="$percntDBCALL{\"$web.$topic->RenderIndexItem\"}$percnt"
  separator="$n"
}%</noautolink>%ENDSECTION{"backend"}%

Test

TopicStub 
a placeholder topic pointing to another one
02 May 2019 - 09:18 | ProjectContributor
TopicTypeEditTemplate 
Editor for TopicTypes
02 May 2019 - 09:18 | ProjectContributor
RenderIndexItem 
Fallback to render a summary for WikiTopic that does not have a type specific version of to render an index item
02 May 2019 - 09:18 | ProjectContributor
TopicFunctionTemplate 
Template to create TopicFunctions
02 May 2019 - 09:18 | ProjectContributor
nobody.png RenderImageSelector 
Renders a widget to select an image attached to a topic
02 May 2019 - 09:18 | ProjectContributor
TopicTypeTemplate 
Template to create TopicTypes
02 May 2019 - 09:18 | ProjectContributor
TopicViewTemplate 
Template for TopicViews
02 May 2019 - 09:18 | ProjectContributor
WikiTopicEditTemplate 
TopicView to edit a WikiTopic
02 May 2019 - 09:18 | ProjectContributor
TopicStubViewTemplate 
02 May 2019 - 09:18 | ProjectContributor
RenderRss 
default implementation of an rss view of a single topic
02 May 2019 - 09:18 | ProjectContributor
RenderWikiTopicView 
02 May 2019 - 09:18 | ProjectContributor
RenderSimpleTopicCreator 
TopicFunction to display a simple form to create a new topic
02 May 2019 - 09:18 | ProjectContributor
RenderTopicsOfType 
Display a table of topcis of a given type
02 May 2019 - 09:18 | ProjectContributor
ApplicationLicense 
a license for wiki applications
02 May 2019 - 09:18 | ProjectContributor
DataFormAttribute 
value definition for formfields in a DataForm
02 May 2019 - 09:18 | ProjectContributor
WikiTopic 
a base topic for wiki content
02 May 2019 - 09:18 | ProjectContributor
DataFormAttributeTemplate 
Template to create DataFormAttributes
02 May 2019 - 09:18 | ProjectContributor
DataFormTemplate 
Template to create DataForm topics
02 May 2019 - 09:18 | ProjectContributor
WikiApplicationTemplate 
TopicTemplate to generate a WikiApplication topic
02 May 2019 - 09:18 | ProjectContributor
CompleteDocumentation 
WikiApplication to develop WikiApplications
02 May 2019 - 09:18 | ProjectContributor

Copyright

© 2006-2019 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.
This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Foswiki? Send feedback