NP_Revision.php

Everytime you make a change to a story, the older version will be lost forever. This plugin will change this. If you make a change to a story a new revision of that story will be created and that revision will be the default revision that is shown to visitors, but all the other revisions must still be available. You are able to quickly and easily see the changes between revisions and are able to revert back to an older revision in case you do not like one of the changes you have made.

General Plugin info
Current Version: 0.7
Download: NP_Revision.zip [15Kb]
Forum Thread: http://forum.nucleuscms.org/viewtopic.php?t=6716
Author: Rakaz

Installing

  1. Unzip the file and upload the contents to your plugin directory
  2. Install the plugin…

How to use the plugin

Every time you make a change to a story it will store that change and assign a revision number to that change. For example, the first draft you create for a story will have the revision number of 0.1, the next time you make a change the number will be increased to 0.2, then to 0.3 and so on. If you publish your draft the revision number will be increased to 1.0 and once again, every additional change will increase the revision number. The beauty of this system is that every older revision will still be available.

Additional information is available on Rakaz' weblog.

Available SkinVars and/or TemplateVars

  • <%Revision(current)%>
    Insert the revision number of the revision that is shown at this moment. This is the last revision by default, but if the user is viewing an older revision that revision number is shown.
  • <%Revision(currentdate)%>
    Insert the creation date of the revision that is shown at this moment.
  • <%Revision(currenturl)%>
    Insert the URL which can be used to view the current revision. This is basically a permanent link to what the reader is currently seeing.
  • <%Revision(currentdiff)%>
    Insert the URL which can be used to open the diff window with the current revision already pre-selected.
  • <%Revision(last)%>
    Insert the revision number of the last revision.
  • <%Revision(lastdate)%>
    Insert the date on which the last revision was created.
  • <%Revision(lasturl)%>
    Insert the URL which will always point to the latest revision of this item.
  • <%Revision(lastdiff)%>
    Insert the URL which can be used to open the diff window with the last revision already pre-selected.

History

  • [Version 0.7, released 2005-05-12]
    • Bugfix: Fixed PHP warning when viewing a diff for an item which does not have any revision history.
  • [Version 0.6, released 2005-04-19]
    • Bugfix: The plugin now issues a notification to other plugins after a revert, so they could modify the new content.
  • [Version 0.5, released 2005-04-18]
    • Initial public release

Plugin review

NP_Revision version 0.7 works with Nucleus CMS 3.31 - 2007-10-29 admun

revision.txt · Last modified: 2007/10/29 16:46 (external edit)
 
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Noncommercial-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki