Exemplo n.º 1
0
 public function __construct()
 {
     $matrix = new TheMatrix();
     $this->globals = $matrix->getGlobals();
 }
Exemplo n.º 2
0
# requires
require_once GSPLUGINPATH . $thisfile . '/php/functions.php';
require_once GSPLUGINPATH . $thisfile . '/php/classes/sql4array.php';
require_once GSPLUGINPATH . $thisfile . '/php/classes/array2xml.php';
require_once GSPLUGINPATH . $thisfile . '/php/classes/xml2array.php';
require_once GSPLUGINPATH . $thisfile . '/php/classes/parser.php';
require_once GSPLUGINPATH . $thisfile . '/php/classes/options.php';
require_once GSPLUGINPATH . $thisfile . '/php/classes/imageresize.php';
require_once GSPLUGINPATH . $thisfile . '/php/classes/imageupload.php';
require_once GSPLUGINPATH . $thisfile . '/php/classes/fields.display.php';
require_once GSPLUGINPATH . $thisfile . '/php/classes/fields.manipulate.php';
require_once GSPLUGINPATH . $thisfile . '/php/classes/matrix.php';
require_once GSPLUGINPATH . $thisfile . '/php/classes/search.php';
require_once GSPLUGINPATH . $thisfile . '/php/classes/extended.php';
# initialize matrix
$matrix = new TheMatrix();
# register plugin
register_plugin($matrix->pluginInfo('id'), $matrix->pluginInfo('name'), $matrix->pluginInfo('version'), $matrix->pluginInfo('author'), $matrix->pluginInfo('url'), $matrix->pluginInfo('description'), $matrix->pluginInfo('page'), array($matrix, 'admin'));
# actions & filters
# front-end
queue_script('jquery', GSFRONT);
add_action('error-404', array($matrix, 'doRoute'), array(0));
# back-end
# tab
add_action('nav-tab', 'createNavTab', array($thisfile, $thisfile, i18n_r($thisfile . '/PLUGIN_TITLE'), 'tables'));
# sidebar
add_action($thisfile . '-sidebar', 'createSideMenu', array($thisfile, i18n_r($thisfile . '/TABLES'), 'tables'));
if (isset($_GET['table']) && !empty($_GET['table'])) {
    add_action($thisfile . '-sidebar', 'createSideMenu', array($thisfile, strtoupper($_GET['table']), 'table'));
}
add_action($thisfile . '-sidebar', 'createSideMenu', array($thisfile, i18n_r($thisfile . '/ABOUT'), 'about'));