E. What About Other Modules?

First let me point out that this module does not support the Categories module because I don't use it and have no idea how to make it work.

This module does support "sticky-encoded" node weighting, such as provided by the Weight< module and my own Site Notes< and generic content type< modules.

I have made a lot of effort [using t('xxx')<] to enable translations< with the Locale< module. A translation template (".pot" file) is provided as a basis for this.

I don't know much about 18n< support. I did use FROM {tablename} x< in my queries because I had an i18n collision on a previous module, so hopefully this is avoided.

One of the things that was suggested on the groups about this kind of function was to include a hook so that modules could provide module-specific information to include in the listing. I'm not sure if I satisfied that part, but here's what I came up with:

Hook_sitedoc

Any module may include this hook. If it is enabled in the module, the Site Documentation module will invoke it at run time. The returned information will be formated and included in the report.

A currently planned feature is to allow administrators to see which modules implement selected hooks. This will also use hook_sitedoc to get a list of invoked hooks from contributed modules.

I'm still designing this part. Any input you might offer will be welcome. What would a module developer want to highlight? In what format should it be returned?

Calling Parameters

Hook type:

  • Hooks - This queries the module to supply a list of hooks that the module invokes. The administrator may choose to show which modules implement those hooks.
  • Info - This is to gather information from the module that is important for the administrator to track.

Return

The module may return the following arrays of information:

Hooks

This is a list of hook names that the module invokes.

Settings

Virtually all modules have settings. Even though most modules store their settings in system variables, which are already dumped in the display, the developer may want to emphasize the settings by including this hook. This will generate a separate section in the report that carries a title indicating which module is reporting them. There may be additional information displayed with the setting. return array('settings' => array('name' => 'setting1', 'value' => 'value1', 'more' => 'more info1', 'name' => 'setting2', 'value' => 'value2', 'more' => 'more info2', ..., 'name' => 'settingn', 'value' => 'valuen', 'more' => 'more infon', ); <

Other

For any other information the called module may wish to display in the report, you may return an array of text lines. Note: it is the called module's responsibility to ensure that the text is "safe" to display.

return array('other' => array('line1' => 'text1', 'line2' => 'text2', ..., 'linen' => 'textn')); <

The sitedoc module will display these values line by line as they appear.