Place here the Plugins you want to add to RosarioSIS.
Note: if you wish to add menu entries, please create a module instead.
Activate them via: School > Configuration > Plugins
functions.php
: required. Contains the functions to be automatically loaded by RosarioSIS.install.sql
: optional. Contains the PostgreSQL queries run on plugin activation: configuration, plugin tables, data, etc.install_mysql.sql
: optional. Contains the MySQL queries run on plugin activation: configuration, plugin tables, data, etc.install_[2 letters locale code].sql
: optional. Contains the SQL queries run on plugin activation to translate texts: templates, etc. For example, to translate to French:install_fr.sql
. Since RosarioSIS 7.3.config.inc.php
: optional. Included by themodules/School_Setup/includes/Plugins.inc.php
file when the Configuration link in the plugin listing is clicked.
You can base your work or reuse any existing plugin. The list of available plugins can be found at https://www.rosariosis.org/add-ons/
You typically want to register your functions to be hooked on certain actions. The list of actions is available in the functions/Actions.php
file.
For example, to load a specific JS or CSS file in the HTML <head>
use this code:
// Add our MyPluginHeadLoadJSCSS() function to the Warehouse.php|header_head action.
add_action( 'Warehouse.php|header_head', 'MyPluginHeadLoadJSCSS' );
/**
* Load JS and CSS in HTML head
* Load mystylesheet.css & myjavascriptfile.js files.
*
* @uses Warehouse.php|header_head action hook
*/
function MyPluginHeadLoadJSCSS()
{
echo '<link rel="stylesheet" href="plugins/MyPlugin/css/mystylesheet.css" />';
echo '<script src="plugins/MyPlugin/js/myjavascriptfile.js"></script>';
}