Welcome

BoltWire is a content management system developed by Dan Vis.

Welcome Tour
Documentation
Mailing List



Popular Posts

Version 5.11 Released
May 26, 2016

Big Changes Coming Soon...
April 28, 2016

Catching Up
April 6, 2016



Other Sites

Here's some other sites by Dan Vis:

Alexa Echoes
Join my adventures developing for Amazons exciting new voice platform.

Firefly Spot
Personal rambling about new gadgets, technology news, and space travel.

FAST Missions
My ministry hub, with news and updates about our online school.

You can follow him at www.danvis.info.

Webhooks

Documentation > Concepts > Webhooks

BoltWire provides a number of webhooks to developers who wish to modify how the engine works. Using these webhooks rather than hacking the core code directly keeps your changes from being overwritten when you upgrade.

Suppose you wanted to change how the report engine works. You simply create a custom function called myBOLTdisplay and put it in your config.php file (or a plugin), and BoltWire will call your function rather than the system function BOLTdisplay.

Available Webhooks

Listed below are the available webhooks:

myBOLTchooseSkin();
Changes how skin selection is made. Found in engine.php and replaces about four lines of code. Must return a skin name, and set $BOLTskin as a global variable.

myBOLTmakePage($out);
Changes how the skin is constructed. Also found in engine.php and replaces about 15 lines of code. Returns a pretty much finished html output.

myBOLTdisplay($outarray, $args, $zone);
This is the main function in BoltWire's report engine for list and search functions.

myBOLTmarkupRules($page, $zone, $out, $rules);
This allows you to dynamically change what rules are used in certain situations.

myBOLTexists($page, $dir);
Change how BoltWire checks to see if a page exists. Could be helpful if you store and retrieve pages in alternative ways, such as a database.

myBOLTfolders($page, $htaccess);
Change how BoltWire assigns pages to subfolders

myBOLTgetlink($type, $start, $page);
Change how BoltWire decides what page goes in each zone. Basically this hierarchical nature of page names.

myBOLTgetzones($zone);
Control how individual zones get constructed. Can override it for specific zones if you want--perhaps using html caching for performance boost or something similar.

myBOLTindexAuto($pages);
Change how BoltWire indexes pages.

myBOLTloadpage($page, $dir, $data, $auth);
Changes how BoltWire retrieves page information. Use to hook BoltWire up to a database or something similar.

myBOLTfuncOutput($value, $args);
Change how BoltWire can modify the output of functions/commands using parameters like output=html.

myBOLTpageshortcuts($link, $basepage);
Change the page name shortcut system in BoltWire.

myBOLTsavepage($page, $newcontent, $newdata, $conflict);
Changes how BoltWire stores page information. Use to hook BoltWire up to a database or something similar.

myBOLTsearchResults($outarray, $args);
This function is used to refine raw pagelists generated by the search function, using parameters like count and sort, etc.

myBOLTsecureForm($field, $value, $args);
You can modify how BoltWire processes user values submitted in form input fields.

myBOLTtranslate($text, $language, $reverse);
Come up with your own translation engine.

myBOLTMlinks($link, $defaultAttr, $attr, $label, $missingPage);
This function uses the normal links markup to parse the basic link, but then allows you to customize the final result just before returning it to the page.

More Options

To create new commands, functions, or conditions simply create a new function called BOLTXnewcommand, BOLTFnewfunction, BOLTCnewcondition. Model it on existing code or create something entirely new from scratch--and store it in config.php or a plugin. Just make sure you have the correct inputs and return the correct value. Call it using the name assigned to the function.

See the ToolMapping tutorial for information about how to overwrite any of the system commands, functions and conditions.

See the tutorial on the markup table for information about how to rewrite BoltWire's default markup table.

To leave a comment, please login using your Facebook account: