Content last modified Tuesday 24 August 2021
hop to #bottom
Categories:
Author:
Current version:
0.1.4
About It:
Get it:
Rate it:
  • Helpful?
  • 7 Yes
  • 0 No
Flag it:

If you'd like to provide updated information and do not have access to directly edit, please contact the site admin; thanks!

cnk_versioning

This plugin exports your pages, forms and styles to a specified folder and autoloads modified files into the database on a front-end page refresh. Autoloading is only enabled when Production Status is not LIVE.

Please use this with care! Your pages/forms/css will be deleted from the database, when you delete the corresponding files.

Before installation, you have to create a php-writable “forms”, “pages” and a “css” directory in the textpattern root directory.

On a Unix server, you may have to make the directory “world writable” by setting its permissions to 777, but before you do this, always consult your webhost, because 777 permissions are a serious security risk on shared webhosts and frowned upon in other hosting setups, so it’s safer to first try 700 or (if that fails) 711 or 755 permissions.

Then go to “presentation” > “versioning” and click install. After that just click “write pages and forms to files”.

Everytime a front-end page is viewed with production_status != ‘live’, the plugin loads all files to the database, which have a modification timestamp greater than the one stored in the database. Deleted files will also delete forms/pages/css from database. New files will create new pages/forms/css.

The filename-pattern works as following:

for forms: ..txp
pages: .txp
styles: .css

You can change the output folder and file extension by altering the globals ($CNK_VER_OUTPUT_PATH, $CNK_VER_EXT and $CNK_VER_EXT_CSS) in the source code.

Download version 0.1.6 .

Have fun with it!

Note:

Users updating from 0.1.2 have to alter either the global $CNK_VER_EXT_CSS or the css file extension from .txp to .css, otherwise styles will be deleted from the db!

Article Request Count:
Keywords/tags:
Initially released:
15.06.2008
Posted here:
03 Jul 2008

You know you want to visit the Archives.
Published with Textpattern