PubKit package contents and system requirements
PubKit has been developed for MODx Evolution 1.0.5 on a Windows PC running Apache 2 with PHP 5.3.1, and tested on a Linux server running Apache with PHP 5.3.2. It makes extensive use of PHP classes, so you will probably have problems if you try it with PHP 4.
The essential PubKit package contains two zipped folders, install and assets, a guide to usage, a set of screenshots and a changelog. Unzip and save these to your site root (no standard files are overwritten), open the config.inc.php file for writing, then go to <your site>/install, just like doing a MODx upgrade. Be sure to back up your site before you begin!
- The install folder is a modified version of the MODx 1.0.4 installer. It adds the following to your site:
- PubKit main and auxiliary snippets, example chunks, templates and template variables, in a category named PubKit.
- A module to import a sample PubKit application as a sub-tree of your root, including (optionally) a database table for
-
- in the assets/snippets/pubKit folder, pubKit.inc.php and pubKit.record.inc.php contain the main logic for creating, re-editing and deleting items. One handles operations on MODx resources, the other deals with custom database table records.
- both the above use functions from included file pubKit.functions.php.
- the classes subfolder contains class definitions:
- optionsbuilder.class.inc.php, with functions for creating HTML code for radio buttons, checkboxes and dropdown selection lists in conjunction with template variables;
- resource.class.inc.php and record.class.inc.php, which provide common low-level functions and properties for resource and record-based item types;
- document.class.inc.php, used by the Resource class and by the ImportCSV module to create resources in the standard site content table;
- post.class.inc.php and event.class.inc.php, which define standard item types you can use for news, blog and event-listing items;
- newsitem.class.inc.php, demonstrating addition of a field to an item definition;
- player.class.inc.php, an example of an item based on a custom database table.