The BitOwl Application Suit langauge was made to allow extensions to be installed and uninstalled. To use it create install.txt or upgrade-from version #.txt in your extension directory. It is a vary simple language and does not allow whitespace. As of this writing, BOASL also requires that you escape backslashes (\). The unistallation could cause an error after the execution because Replace uses the code found in the Find: block, as there is no way of tracking where it failed before.
BitOwl Application Suit Language does allow a form of commenting. You can place "#" as the first character of a line, or you can place anything after a function or command as seen below.
#This is a comment open("index.php") This is also a comment
All Functions and Commands are case sensitive.
Function | Description |
---|---|
open(str filename) commands |
Opens the file specified to write to. File name is based off of the scripts root directory (./). |
new(str filename) code |
Creates a new file in the specified path. File name is based off of the scripts root directory(./). |
requirement(str extensionname) | Checks to see if an extension is installed. Will terminate execution of script and output an extension not found error. |
version(str BOASLversion) | Checks the version of BOASL the script uses and attempts to use the proper interpreter. This must be the first line else it will be ignored and it will assume the latest. |
extension(str version, bool cp, bool init, bool config, bool uninst) | This adds your extension to the users database. Version is the version of the currently installed extension, you can use any form of numbering you like. Cp should be set to true if we want to draw a tab for the CP. Init should be true if you have extra init instructions. Config should be set to true if you add to the config file. And unist should be true if you want to allow users to uninstall your extension through the BOASL interpretor. |
update(str configvariable, mixed value) | Sets the specified config variable to value. The first argument starts with extension/ or config/. extension/ edits a value in extensions.php, config/ edits a value in the extension's config.php. After the slash, if using config/, you specify the keys for the config array. For example config/version would edit $_extensionname["version"]. If using extension/ you name one key used in extensions.php. For example extensions/version will edit $extension["extensionname"]["version"]. |
run(str filename) | Terminates BOASL and runs the specified file in the extension's directory. |
Command | Description |
---|---|
Find: code |
Attempts to find the specified code in the opened file. You must write the whole line of code you are searching for otherwise it will not find the block. |
Find If Failed: code |
Attempts to find the specified code if the first command failed. (Note: Find must be used before this.) You must write the whole line of code you are searching for otherwise it will not find the block. |
Add: code |
Adds the specified code after the selected block of code if used after the find or find if failed command. Else it will add to the end of the file. |
Insert: code |
Inserts the specified code before the selected block if used after the find or find if failed command. Else it will add to the beginning of the file |
Replace: code |
Replaces the selected block with the specified code if used after the find command. Else it will rewrite the whole file. Do not continue editing a file after using this as it may disrupt the outcome, make this the last command. |
Adding a new global function to the Control Panel
open("index.php") Find: function include_body($part) //This function does the main cp stucture { Insert: function return_true() { return true; }
Adding a new file for a user to include in their website (example viewpoll.php)
new("viewextension.php") <?php include "$path/extensions/myextension/db.php"; echo "This script is under development!"; ?>