Midge system
From AffiliateBang Wiki
Contents |
Using Midge
Midge is a scriptlet language that acts as a layer between user HTML and the internal workings of AffiliateBang's PHP. Allowing easy layout and content alterations that interface with AffiliateBang without the hassle of using PHP. Midge is not to be confused with Themes which are define the design of your page, Midge is used to define the layout and appearance of categories, items, and pages. Where Themes define the appearance for the site as a whole.
Midge can be used in the Edit Templates, Edit Pages, and Edit Content Boxes sections of the administration panel. Midge is designed to be fully mixable with HTML, so conversion from a static HTML template to a template usable with AffiliateBang is easy. Midge is split into commands called directive which consists of the start which consist of an opening bracket followed by a pound character followed by whichever directive you're calling, additional arguments to the directive are split by commas.
Example of a simple statement: [#add,counter,1]
Adds 1 to the PHP global variable counter.
Extending Midge
It is possible to override the behavior of existing directives or create new ones through the use of Plugins
