Content last modified Monday 6 March 2017
hop to #bottom
Categories:
Author:
Current version:
0.1.4
About It:
Get it:
Rate it:
  • Helpful?
  • 7 Yes
  • 0 No
Flag it:
Contact Reason [ ? ]

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
Article modified:
08 Jul 2008

You may want to leave your comments/questions at the Forum thread for quicker feedback. Otherwise, comment away:

Your comment will NOT be submitted until you click the 'Submit' button on the next pageload.

Subscribe to this article's comments RSS feed. [ ? ]   View Recent Comments across the site.

You know you want to visit the Archives.

Browse

Categories


Articles

There are also tag clouds, 'cause those are fun.
Published with Textpattern