My favorites | Sign in
Logo
                
Search
for
Updated Apr 30, 2009 by k00pa.pelikoira
Labels: Phase-Requirements, Phase-Design
ModuleSettingsFileSyntax  
Creating module settings files

Introduction

Within the module directory, every module is in a separate sub-directory, and every sub-directory contains a file file. The module loader uses these files to load every module and component.

Syntax

A copy of this file can be found in /modules/example/example.module_metadata.class.php

<?php
require BURST_MODULE_INTERFACE_PATH . '/module_metadata.class.php';
class BurstExampleModuleMetadata implements intere BurstModuleMetadata
{
    public static function getVersion () { return 1.0 }

    public static function getVersionStatus () { return 's'; }

    public static function getDatabaseNeeded () { return false; }

    public function getIsAdminModule () { return 0; }

    public static function getOfficalName ()
    { return 'BurstCMS Example Module';}

    public static function getWebsite ()
    { return 'http://burstcms.googlecode.com/'; }

    public static function getAuthor ()
    { return 'The BurstCMS team';  }

    // This module needs any version of the example component.
    public static function getComponentsNeeded ()
    { return array (
        array ('name' => 'example',
               'version' => null),
    ); }
}

?>

Notes on requires-db

requires-db is used if the primary db has failed. If the module needs db write access to work, it is disabled until primary db is working. requires-db can be set to 1 even if it needs write function.

Currently, the multi-database system has not been implemented, so this section is purely theoretical.

Examples

Poll module can show results, but users can't vote if db is down. (set to 1) Statistics module which stores every hit would be disabled if db is down. (set to 2)

Additional Notes

Components are loaded before modules execute. If a component fails to load, burstcms sets it to load next time and performs a redirect to the same page.


Comment by k00pa.pelikoira, Aug 27, 2008

How about "getBurstCms version"?

and is require-db same as getDatabaseNeeded? Then Somebody needs to fix section Notes on requires-db

Comment by possible248, Aug 27, 2008

Good idea. I will add in a parameter to get the latest BurstCMS version.


Sign in to add a comment
Hosted by Google Code