Rah's Post Versions

Store and revive old versions of articles, categories, sections, forms and pages. Rah_post_versions embeds revision control to Textpattern’s admin interface. The plugin monitors changes made thru the web-based admin interface and stores the versions to repository.


Version 0.9 Jun 18, 2011
Other versions...

A cup of coffee
via PayPal

List of features

  • Tracks changes made via Textpattern’s interface.
  • By default the plugin tracks edits and saves of articles, pages, forms, preferences, categories, sections, styles, discussion and links. The plugin’s tracking can be extended to other areas from the plugin’s preferences.
  • Ability to revert edits to a previous revision.

Basic concept

The rah_post_versions tracks the changes made via Textpattern’s interface. Instead it tracking the database, it tracks the data sent by your browser and received by the server. After it has collected the appropriate data and filtered it to be valid, it starts identifying process. After it has the exact info what the change is and where it should go, it stores the information to the revision control, threaded under appropriate item.


Rah_post_versions’ minimum requirements:

  • Textpattern 4.0.7+


  • Textpattern 4.4.1+
  • Optional:
    • jQuery (bundled with TXP)
    • JavaScript supporting client browser


The general behavior stands:

  1. Go to your Textpattern installation’s admin panel.
  2. Navigate to Admin / Plugins.
  3. Download and open the plugin code.
  4. Copy the plugin code to the install plugin box.
  5. Click install and go thru the automated installation process.
  6. After installation find the plugin from the plugin list and click Activate.
  7. Now the plugin is installed and ready to be used. The plugin’s interface can be now found from Extensions/Post Versions.


After a successful installation you can find rah_post_versions’ interface under Extensions/Post Versions. The interface is divided to two main areas; Subversion repository browser, that is the main tab, and Preferences.

The Main area, repository browser

When you open the Main area you will see the default view; a list of items. The list consists the items that have been modified or saved, and revisioned. When you click one of these items, the item’s changeset will expand, and you will see the list of individual changes made to that specific item. The changes can be viewed too.

Preferences panel

Preferences panel lets the user change some of the common settings. These include: exclude form fields from tracking, exclude changes made by specific authors, set which pages, or events, to track, send email notification about changes, and set identification code. When you open the Preferences panel, you will see that the identification code is small PHP snippet. It will generate the required identification for a posted change. Without proper ID, a change can not be threaded to correct set of changes.


There are some limitations, because the way the plugin works is what it is. Most obvious is that it will only track the form submits. If some interface doesn’t use form submits, or works outside your browser (desktop client or similar), it won’t track it. Neither the plugin is informed about deletations, and renaming forms, or pages, will start an new set of changes under a new name.


Version 0.9

  • Fixed: Doesn’t spit out extra content to the top of the page if JavaScript is disabled.
  • Fixed: Error in condition that chose if JavaScript should be added to the page or not.
  • Added: Now informs the user if removing items from the database failed.
  • Added: Uninstaller that is ran when plugin is deleted. Drops plugin specific tables.
  • Changed: New database tables get UTF-8 as their charset by default instead of using server default.
  • Changed: Make sure selection isn’t empty.
  • Changed: Improved JavaScript based multi-edit script.
  • Now compatible with Textpattern 4.4.1 and newer; supports CSRF protection added in 4.4.1, from now on doesn’t store tokens and uses tokens when reverting to older version.

Version 0.8

  • Added tool-tips to the pagination’s jump links (Go to the first page and Go to the last page).
  • Removed username from showing up in the mails.
  • Unified conditional statements; now all use || and && operators instead of synonym mashmixmess.

Version 0.7

  • Fix/change: Diff tool shows/compares array data as blocks. Array’s are imploded and values are separated with line breaks.

Version 0.6

  • Fixed: instances of missing HTML escaping (POST keys).
  • Fixed: now the plugin checks if the revisioned data contains an array (<input name="foo[bar]" /> etc) and shows it correctly. Thank you for reporting, TJ.

Version 0.5

  • Removed twice presented conditional.

Version 0.4

  • Added diff tool. The feature is found from the list view’s multiedit: check two revisions and select “Diff” from the drop-down. The diff feature uses Paul Butler’s Simple Diff Algorithm.
  • Added Are you sure? checks to the multiedit.

Version 0.3

Version 0.2

  • Updated original installer to add more monitored pages. Thank you for re-posting, Dale. Current users can add to the field following code: article:edit, article:create, article:publish, article:save, page:page_create, page:page_edit, page:page_save, form:form_create, form:form_edit, form:form_save, prefs:prefs_save, prefs:advanced_prefs_save, category:cat_article_create, category:cat_image_create, category:cat_file_create, category:cat_link_create, category:cat_article_save, category:cat_image_save, category:cat_file_save, category:cat_link_save, section:section_create, section:section_save, link:link_post, link:link_save, discuss:discuss_save, image:image_save, file:file_save, css:css_save

Version 0.1

  • Initial release.