Extension:OCExtensions

'''NOTICE: This page is a work in progress. I have not actually set up any means of downloading these extensions yet. Please check back later. Thanks!'''

= Outreach Connections Extensions =

This is the main page for a suite of extensions that were originally written for Outreach Connections: Native Health Information (aka OC). The intended audience of Outreach Connections has very little technical experience and thus finds wiki text very cumbersome and daunting. These extensions were written to improve usability for users that are intimidated by wiki text. They were also designed to integrate well with FCK Editor and the CategoryTree extension.

'''BEWARE: These extensions may require significant modification to suit your wiki. I have tried to make them as abstract as possible, and as easy to customize as possible, in order to benefit the open source community, so hopefully you won't have many problems... BUT, just in case, you should be aware that you may need to dive in deep to order to get them working according to your needs.'''

BY DEFAULT, THIS LIBRARY WILL REMOVE THE "SHOW CHANGES" BUTTON THAT APPEARS AT THE BOTTOM WHEN EDITING A PAGE. (The complexity of integrating these extensions with FCK Editor made me decide to nix the "Show Changes" option. You can re-enable it if you wish, but if you are using FCK Editor you will probably run into bugs.)

Details
In my experience, average non-technical users find wiki text very intimidating. They are accustomed to using word processors such as Microsoft Word or Open Office. FCK Editor helps smooth the transition for these users, but the use of templates still requires wiki text, and it is very confusing to a lot of users.

Let's say you have a site-wide template, which should appear on every page in the main namespace, and it requires the user to enter parameters, such as:

To make it easier for non-technical users to add this template to their page, the OC extensions contain a PHP class that will help you add a user-friendly form. This is the core functionality of the OC extensions, although they do add other functionality. (To be documented.)

= Usage =

The core of the OC Extensions is OC-Common, which doesn't really do much on its own. It contains a PHP class called OCInfo, as well as javascript functions, all of which are required by the other OC extensions that generate forms. So, if you want to create a custom form that will convert its inputs into wiki text (for a template), you can create as many of your own OC extensions as you want by placing each one in, and then extend the OCInfo class. (Details to come.) You can study OCContactInfo and OCProjectInfo for examples on how to do this.

Installation
Each extension within the OC suite is a fully independent extension (aside from the OCInfo class in OC-Common, which most of them depend on). To install them, add the following to LocalSettings.php:

Note that we add  to the   array manually, in LocalSettings.php. I could have just made the OC-Common extension itself do this, but the OC-Common extension performs a few minor utility functions on the site that you may want to disable by removing it from the  array.

Here is what the OC-Common extension itself will do (feel free to disable it):


 * Adds a CSS class to the HTML table displayed at special:allpages.
 * Adds a permanent sandbox header to the sandbox page (assuming you have a template called  and a sandbox located at  ). The reason for doing this (in an extension, rather than on the sandbox page in the wiki itself) is to prevent new users from being confused when they see a line that says,  . New, non-technical users do not understand what this is there for, and why this does not show when the page renders. It also creates an ugly template icon if using FCKeditor, which new users are likely to delete accidentally.