Cacti (home)ForumsRepositoryDocumentation
Cacti: offical forums and support
It is currently Tue Sep 23, 2014 11:27 pm

All times are UTC - 5 hours




Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: Validation error, when instaling my own personal plugin
PostPosted: Wed Oct 13, 2010 8:22 pm 
Offline
User avatar

Joined: Wed Oct 13, 2010 8:06 pm
Posts: 4
Hi everyone, im using the lastest release of cacti and PA.
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=install&id=hector_test".

The setup.php of my plugin is this:
Code:
<?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>';
}

?>


Can anybody tell me what im forgotten? ]
Thanks in advice.


Last edited by h3ct0r on Fri Aug 05, 2011 2:53 pm, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: Validation error, when instaling my own personal plugin
PostPosted: Thu Oct 14, 2010 12:55 am 
Offline
User avatar

Joined: Wed Oct 13, 2010 8:06 pm
Posts: 4
When i use the old function plugin_init_hector_test(), it works!
But what im doing wrong with the new metod ?

Thanks in advice


Top
 Profile  
 
 Post subject: Re: Validation error, when instaling my own personal plugin
PostPosted: Thu Oct 14, 2010 8:19 am 
Offline
Developer
User avatar

Joined: Tue May 14, 2002 5:08 pm
Posts: 14861
Location: MI, USA
Maybe it's the underscore in the plugin name. What are your cacti versions and PIA versions?

TheWitness

_________________
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of MacTrack, Boost, CLog, SpikeKill, Platform RTM, DSStats, maintainer of Spine, lot's of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
Gandalfs Official Debugging Help
Central Plugin Repository
Central Templates Repository


Top
 Profile  
 
 Post subject: Re: Validation error, when instaling my own personal plugin
PostPosted: Thu Oct 14, 2010 2:48 pm 
Offline
User avatar

Joined: Wed Oct 13, 2010 8:06 pm
Posts: 4
Hi TheWitness, thanks for the fast reply, the versions are :
Cacti Version: 0.8.7g, Plugin Architecture Version: 2.8!


Top
 Profile  
 
 Post subject: Re: Validation error, when instaling my own personal plugin
PostPosted: Thu Oct 14, 2010 5:18 pm 
Offline
Developer
User avatar

Joined: Tue May 14, 2002 5:08 pm
Posts: 14861
Location: MI, USA
Send along the plugin, and ill see what's goofy.

TheWitness

_________________
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of MacTrack, Boost, CLog, SpikeKill, Platform RTM, DSStats, maintainer of Spine, lot's of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
Gandalfs Official Debugging Help
Central Plugin Repository
Central Templates Repository


Top
 Profile  
 
 Post subject: Re: Validation error, when instaling my own personal plugin
PostPosted: Sat Oct 16, 2010 2:12 pm 
Offline
User avatar

Joined: Wed Oct 13, 2010 8:06 pm
Posts: 4
Hi TheWitness, thanks for reply!
I did found the error ... i didnt registrer the realm!!!
This code work for me:

Quote:
api_plugin_register_realm('hector_test', 'hector_test.php', 'View hector_test plugin', 1);


Thanks for the help!


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Protected by Anti-Spam ACP Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group