Custom Admin

You can create custom admin pages and functions for an easy administration for your project.
For this, just include some files inside Admin folder.


The menu.php file will be looked for into Admin folder for displaying the list of options inside Magrathea Admin.
menu.php sample:

	<li><a href="add_object.php"><i class="fa fa-plus-circle"></i> Add Object</a></li>
	<li><a href="list_object.php"><i class="fa fa-bars"></i> List objects</a></li>
The files related on the link should be inside Admin folder as well.


You don't need to load default configuration for any file loaded on Magrathea Admin.
Everything should already be locked and loaded, just start your objects:

	$objects = ObjectControl::GetAll();

Easy as that!

Javascript calls

Any page called inside MagratheaAdmin should be done via Ajax using Magrathea's Admin own function:

function MagratheaPost(page, data, callback){
	/* magic code here */

		callback = function(data){
		url: url, type: "POST", data: data,
		success: callback
The parameters to be sent are:
Any other javascript for the page should be added inside <script> tags in the pages inside Admin.

If dropbox plugin is included in custom admin, you can as well call some of the adapted ColorBox functions:

function ColorBox(page, options){
	/* magic code here */

	options.href = page;
function ColorBoxDo(action){
		case "close":
The parameters for ColorBox are:

And the actions so far available in ColorBoxDo is only "close".

More information on Colorbox plugin, as well as options, are available at:

Magrathea Admin

Lots of possibilities can be done with the MagratheaAdmin object.
From it, you can include Magrathea Plugins in the code, include custom CSS, define titles and vars and create more complex administration systems.