You are able to create your own PHP and/or HTML/JS Pages to be loaded in the tab's module.
Setup
To achieve this, you need to create a page file named anything you want inside the pages folder in the data folder. The data folder is located in the root folder of Organizr.
Once you have created a blank page, you may paste this skeleton code to get you started:
<?php
/*
* Make sure to edit "name_here" with your page name - i.e. custom_code_presentation
* You will edit on both "$GLOBALS['organizrPages'][] = 'name_here';" and "function get_page_name_here($Organizr)"
*/
$GLOBALS['organizrPages'][] = 'name_here';
function get_page_name_here($Organizr)
{
if (!$Organizr) {
$Organizr = new Organizr();
}
/*
* Take this out if you dont care if DB has been created
*/
if ((!$Organizr->hasDB())) {
return false;
}
/*
* Take this out if you dont want to be for admin only
*/
if (!$Organizr->qualifyRequest(1, true)) {
return false;
}
return '
<script>
// Custom JS here
</script>
<div class="">
<div class="col-lg-12">
<div class="panel bg-org panel-info">
<div class="panel-heading">
<span lang="en">Template</span>
</div>
<div class="panel-wrapper collapse in" aria-expanded="true">
<div class="panel-body bg-org">Ayyy.... yooo...!
</div>
</div>
</div>
</div>
</div>
';
}
You need to change the first instance of name_here on the GLOBALS variable.
Also make the change on the function name.
They need to be the exact same words.
If you need DB Access, keep the if statement that has the hasDB method.
If you need to check access by group, leave or change the first parameter in the qualifyRequest method to the cooresponding group ID
Make the changes to the return with your code.
Accessing Tab
Once you have the code setup, you may access it via API or via Tab Editor.