Get started
Customize 101
Where the look of the app is actually controlled
Customize via Plugins
To ensure your customizations are preserved during updates, it’s recommended to create a custom private plugin instead of directly editing RKHM’s core files. Updates to RKHM might overwrite modified core files, resulting in lost changes.
How to Create a Plugin?
While full documentation for plugin development is not yet available, this guide covers the basic steps to create a plugin and add custom CSS/JS files to the front-end—a highly requested feature
Follow these 5 steps
You can alternatively download this zip file and extract it to be able to skip 1-4:
https://my.busyowl.co/files/custom_plugin.zip
1. Create a New Plugin Folder
- Navigate to the ~rkhm/plugins directory.
- Create a new folder named custom_plugin (or any unique name for your plugin).
2. Create the bof.php File
- Inside the custom_plugin folder, create a PHP file named bof.php.
- Add the following code to define basic information about your plugin
<?php
$Config = [
'version' => '1.0.0', // Required: Plugin version
// Add additional details if needed
];
?>3. Create the _handshake.php File
- In the same folder, create another PHP file named _handshake.php.
- Use this file to connect your plugin’s functionalities with RKHM. Add the following example code:
<?php
bof()->listen("theme", "get_after", function ($method_args, &$config) {
if (empty($config["assets"])) $config["assets"] = [];
if (empty($config["assets"]["js"])) $config["assets"]["js"] = [];
if (empty($config["assets"]["css"])) $config["assets"]["css"] = [];
$version = bof()->plug->read("plugin", "custom_plugin")["version"];;
$config["assets"]["js"][] = array(
"name" => "custom",
"path" => "custom.js" . "?bof_version=" . (!production ? "dont_cache" : $version),
"base" => web_address . "plugins/custom_plugin/assets/",
"dir" => false,
"version" => $version,
"skipNameCheck" => true
);
$config["assets"]["css"][] = array(
"name" => "custom",
"path" => "custom.css?bof_version=" . (!production ? "dont_cache" : $version),
"base" => web_address . "plugins/custom_plugin/assets/",
"dir" => false,
"version" => $version
);
});
?>4. Add Your Custom CSS/JS Files
- Inside the custom_plugin folder, create a subdirectory named assets.
- Create a file named custom.css for custom styles.
- Create a file named custom.js for custom JavaScript.
- Add your desired CSS and JS code to these files
5. Activate your plugin
- Make sure custom_plugin folder exists inside ~rkhm/plugins folder
- Open phpMyAdmin. Select RKHM's database and then _bof_setting table
- Search for `var=plugins.` Edit `val` and append ,custom_plugin to the list