SmallMart supports outside development of mods. Mods let you add features without editing the core.
json
{
"id": "hello-world",
"name": "Hello World Banner",
"version": "1.0.0",
"description": "Adds a banner on the homepage",
"author": "Your Name",
"entry": "main.php",
"enabled_by_default": true
}
`main.php` example:
php
<?php
function init() {
if (!class_exists('SmallMartModAPI')) return;
SmallMartModAPI::addHook('home_before_content', function () {
echo '<div class="alert alert-success">Hello from a mod!</div>';
}, 10);
}