Anatomy of a Package

Created by: spiderr, Last modification: 06 May 2009 (19:07 UTC) by Daniel Sutcliffe
The following files make up a bitweaver package. Your packages is free to do and act however it pleases. However, the following files are standardized and the core packages may look for these files in your packages.
Anatomy of a bitweaver Package
File Description
pkg/bit_setup_inc.phpThis is the only file required for a package. It registers information about the package during initial setup.
pkg/admin/schema_inc.php
pkg/admin/bit_schema_inc.php
If your package has any database information, the information is defined in this file. It will be scanned during install, and a few administration pages
pkg/admin/admin_pkg_inc.php
pkg/admin/bit_admin_inc.php
Administration page for the package, picked up by kernel/admin/index.php?page=pkg.
pkg/admin/upgrades/This directory contains files named with the form version.php that describe package versions and any code needed to upgrade data and tables when that version upgrade occurs.
pkg/modules/This directory contains the interfaces blocks that can be arranged in various layouts
pkg/templates/This directory contains the Smarty templates for the package pages
pkg/templates/admin_pkg.tpl
pkg/templates/bit_admin.tpl
Administration template for the package, picked up by kernel/admin/index.php?page=pkg.
pkg/templates/menu_pkg_admin.tpl
pkg/templates/bit_admin_menu.tpl
template for the package administration menu.
pkg/templates/menu_pkg.tpl
pkg/templates/menu.tpl
template for the package menu. Usually specified in pkg/bit_setup_inc.php.


The filenames specified in grey are my thoughts are what the file names could be migrated to with the aim of improving consistency and ease of understanding. The ideas being; that there is no point in package name repetition/redundancy in the file names and it is already discouraged in the CodingGuidelines, and that introducing a prefix of 'bit_' to files that are loaded just because of their names and location in a package would help indicate them as such files.

Related Items

Packages

A list of packages available for installation

  •    •    •    •    •    •    •    •    •    •    •    •    •    •    •  Anonymous  •  Anonymous

Documentation » Technical Documentation

Documentation geared towards developers and people who want to learn about the core processes of bitweaver

  •    •    •    •    •    •    •    •    •    •    •    •    •    •    •    •    •    •    •    •    •    •    •    •    •    •    •    •    •    •    •    •    •