Im developing a plugin for my thesis and i cant install it. the error that cacti is showing me is, on a blanc page "Validation error.". The url of this page is "http://localhost/cacti/plugins.php?mode ... ector_test".
The setup.php of my plugin is this:
Code: Select all
<?php
//function plugin_init_hector_test() {
// global $plugin_hooks;
// $plugin_hooks['top_header_tabs']['hector_test'] = 'hector_test_show_tab';
//}
function plugin_hector_test_install () {
global $config;
api_plugin_register_hook('hector_test', 'top_header_tabs', 'hector_test_show_tab', 'setup.php');
api_plugin_register_hook('hector_test', 'top_graph_header_tabs', 'hector_test_show_tab', 'setup.php');
}
function plugin_thold_uninstall () {
// Do any extra Uninstall stuff here
}
function hector_test_version () {
return plugin_hector_test_version();
}
function plugin_hector_test_version () {
return array(
'name' => 'hector_test',
'version' => '0.0.1',
'longname' => 'hector_test',
'author' => 'Hector AZP',
'homepage' => 'hector_test',
'email' => 'xxxxxxx@gmail.com',
'url' => 'hector_test'
);
}
function plugin_hector_test_check_config () {
return true;
}
function hector_test_show_tab () {
global $config;
$cp = false;
if (basename($_SERVER['PHP_SELF']) == 'index.php' || basename($_SERVER['PHP_SELF']) == 'setup.php'){
$cp = true;}
print '<a href="' . $config['url_path'] . 'plugins/hector_test/setup.php"><img src="' . $config['url_path'] . 'plugins/hector_test/imagenes/tab_hector_test' . ($cp ? '_down': '') . '.gif" alt="hector_test" align="absmiddle" border="0"></a>';
}
?>
Thanks in advice.