Anatomy of info.php Files - xenocrat/chyrp-lite GitHub Wiki

Authors of themes, feathers, and modules are encouraged to put an info.php file in the extension's folder. This file is used to store attribution, version, and other information that is presented to blog administrators. Chyrp Lite will include info.php files when scanning extensions in the administration console. The return value is an array containing the extension metadata.

At the discretion of the extension author, metadata strings can be localised using the __() helper function. Chyrp Lite will attempt to load an appropriate translator from the extension's locale folder prior to scanning.

Modules

Here is an example info.php file for modules:

<?php
return array(
    "name"          => __("My Module", "my_module"),
    "url"           => "http://example.com/",
    "version"       => "2023.01",
    "description"   => __("Lorem ipsum dolor sit amet, consectetuer adipiscing elit.", "my_module"),
    "author"        => array(
        "name"      => "Anonymous Coward",
        "url"       => "http://example.org/"
    ),
    "conflicts"     => array(
                       "his_module"
    ),
    "dependencies"  => array(
                       "my_other_module"
    ),
    "notifications" => array(
                       __("This message is shown when they enable my module.", "my_module"),
                       __("So is this.", "my_module")
    ),
    "confirm"       => __("Do you want to delete all the whatnot that My Module created?", "my_module"),
    "uploader"      => true
);

The items notifications, conflicts, dependencies, confirm, and uploader are all optional. conflicts is an array of modules (based on their directory name) that this module conflicts with. The user will be warned on the Extend page about conflicts a module has with any enabled modules. dependencies is an array of modules that must be installed and enabled for this module to function. Set uploader to true if your module offers a file upload facility.

Feathers

Here is an example info.php file for feathers:

<?php
return array(
    "name"          => __("Snufflupugus", "my_feather"),
    "url"           => "http://example.com/",
    "version"       => "2023.01",
    "description"   => __("Lorem ipsum dolor sit amet, consectetuer adipiscing elit.", "my_feather"),
    "author"        => array(
        "name"      => "Anonymous Coward",
        "url"       => "http://example.org/"
    ),
    "notifications" => array(
                       __("This message is shown when they enable my feather.", "my_feather"),
                       __("So is this.", "my_feather")
    ),
    "confirm"       => __("Do you want to delete all the whatnot the Snufflupugus feather created?", "my_feather"),
    "uploader"      => true
);

The items notifications, confirm, and uploader are optional. Set uploader to true if your feather offers a file upload facility.

Themes

Here is an example info.php file for themes:

<?php
return array(
    "name"        	=> __("Awesome!", "my_awesome_theme"),
    "url"         	=> "http://example.com/",
    "version"     	=> "2023.01",
    "description" 	=> __("My awesome theme for Chyrp Lite.", "my_awesome_theme"),
    "author"      	=> array(
        "name"    	=> "Anonymous Coward",
        "url"     	=> "http://example.org/"
    )
);