Question
When using e.g.
DatabasePlugin or having lots of pages with aggregated information (i.e. uses ), sometimes it would be a nice feature, if it was possible to see what the search or other dynamic content provider produced at an earlier time.
But I haven't seen this kind of feature in any plugin or addon yet - or am I just not opening my eyes?
Automated, scheduled or just implemented as "Snapshot this page now"-button style - all would work mighty fine.
Hints appreciated!
Environment
--
SteffenPoulsen - 15 Mar 2005
Answer
You could use the
PublishAddOn to do static snapshots of the topics/webs you are interested in.
--
FranzJosefSilli - 15 Mar 2005
I'll add another line to the requirement part
I'm thinking towards a concept where a topic can have a number of snapshots. One idea is to simply have a <TOPICNAME>Snapshots topic generated first time <TOPICNAME> has a snapshot taken.
Next snapshots would simply replace the contents of the snapshots page, automatically pushing earlier snapshots into revision history for the topic.
PublishAddOn is for a point-in-time static snapshot only - that's not what I was after, sorry for the vagueness
--
SteffenPoulsen - 15 Mar 2005
This sounds like a new
SnapShotPlugin. This Plugin would add a [Take snapshot] button when it sees a
%SNAPSHOT% variable. Clicking on it would trigger the snapshot action.
You could leverage some code from the
VarCachePlugin that evaluates and caches all
%VARIABLES% (but not
TWikiML to HTML). The cache result wold be the text to store in the snapshot topic.
Do not introduce a new script, better to handle all in a the Plugin, similar to how the
EditTablePlugin works.
Example text:
%SNAPSHOT{ snapshotaction="%URLPARAM{snapshotaction}%" }%
If
action parameter is not set, the Plugin expands that to:
<form name="snapshot" action="%SCRIPTURL%/viewauth%SCRIPTSUFFIX%/%WEB%/%TOPIC%">
<input type="hidden" name="snapshotaction" value="take" />
<input type="submit" name="formaction" id="take" value="Take snapshot" />
</form>
The
viewauth script makes sure the user is authenticated, which is needed for the snapshot save action. Submitting the form will result in this text:
%SNAPSHOT{ snapshotaction="take" }%
The
snapshotaction="take" will trigger a snapshot and save action.
--
PeterThoeny - 19 Mar 2005