midcom.admin.content
Administrative Interface System, or AIS is the MidCOM subsystem providing an administrative interface for all MidCOM components.
AIS gives you the ability to manage the content trees registered with the system. It uses the administration interface classes of components to achieve this.
Navigation is handled through NAP, displaying both approved and unapproved content. The content administator handles creation, movement and deletion of topics.
The AIS itself is implemented using Standard MidCOM Components, though the more basic of them (the Content Manager for example) have access to the internals of MidCOM to be able to work their magic.
AIS Namespace
The AIS Namespace starts at midcom.admin.* and looks roughly like the component tree shown in figure.

Infrastructure
Each component has to provide three interface classes. Apart from the one that is responsible for the content output, two more are required: One for content administration and one for navigational information.
Calling Sequence
The first thing that happens, is that MidCOM loads the AIS component in action.
The content administrator (midcom.admin.content) determines which topic you want to administer, and initiates the whole system to use that point. It uses the Admin mode of NAP to build up the navigation tree for that.
Layout Guidelines
Opposing the regular content output, the AIS generated pages must not use the Advanced Style Engine. This would add unneccessary complexity to the administrative sites, both on runtime and during implementation.
Instead, you have to incorporate the neccessary HTML code within your admin code. Follow these guidelines which are mandatory for official [MidCOM components]:
- Use only browser independent XHTML to ensure maximum cross-platform portability.
- You may use JavaScript/JScript, again only if it is browser independent.
- Do not use XHTML Font markup (FONT, COLOR tags etc.), use CSS if you want to modify the appearance of an Administration site. Use only basic constructs for that because:
- Admin Site customization is done through applying a CSS to the whole admin site through the accociated style.
Each Administration Site has an accociated style which can be used to control the appearance of the whole thing.
Basic Idea:
- Define the style
- Define the available/required CSS Elements
- Perhaps modify the style engine to work in this context.
Content Administration
Each component is responsible for the contents of its assigned folder.
The required navigation tree is built by using the NAP System. To let NAP know that we are working in adminstrative mode, the method NAP::set_object() receives TRUE as the second parameter.
From that point everything is identical to a normal MidCOM run. The can_handle and handle phases execute, after which either an MidCOM Error Page or a regular output runs.
Component Administration
Each component must provide a way to configure the component itself. This is especially interesting if we are talking about default values for component operation.
The component configuration interface can be provided as a Datamanager schema registered as a handler in the administrative interface class:
// Configuration
$this->_request_switch= Array
(
'handler' => 'config_dm',
'fixed_args' => Array('config'),
'schemadb' => 'file:/net/example/component/config/schemadb_config.inc',
'schema' => 'config',
'disable_return_to_topic' => false
);
