Github: https://github.com/Venipa/Cochlea-Library
Code:
/**
* Author: Venipa <[email protected]>
* Type: MyBB Extension Plugin Library
* Description: This is a Plugin Library used by other Plugins, note: this plugin does not need to be registered
* Disclaimer: This Plugin can be used by everyone, you just need to add me to your credit page or just mention the use of this Script
* Usage:
* - `composer install` - installs dependencies
* - `require "chochlea-library/core.php"` - make sure to adjust the path to this file
*
* License: Gnu GPL3 <https://www.gnu.org/licenses/gpl-3.0.de.html>
* Website: https://venipa.net
*/
its my first lib for mybb which i made while i was doing my first plugin
Some examples:
Code:
// user must be authed by mybb
$this->setAuthXHRHook('actionName', function(...$args) {
// return data or just void it
});
$this->setXHRHook('actionName', function(...$args) {
// return data or just void it
});
$this->addHook('global_start', function() {
// do something?
});