I've been trying for the better part of a day to get a simple new plugin to register, but I've been unable to using the new plugin architecture stuff. I've been using the 'thold' plugin as a guide, but have been unable to get anything going.
Here is my current setup.php. Currently "Plugin Management" goes to a blank page. If I comment out the "plugin_nodeview_version" function, Plugin Management comes up just fine.
Code: Select all
<?php
/*
Stuff!
*/
function plugin_nodeview_install() {
api_plugin_register_hook('nodeview', 'top_header_tabs', 'nodeview_show_tab', 'setup.php');
api_plugin_register_hook('nodeview', 'top_graph_header_tabs', 'nodeview_show_tab', 'setup.php');
api_plugin_register_realm('nodeview', 'nodeview.php', 'View NodeView Tab', 1);
}
function plugin_nodeview_version() {
return array(
'name' => 'nodeview',
'version' => '0.0.1',
'longname' => 'NodeView',
'author' => 'Aaron Segura',
'homepage' => 'http://www.somedomain.com/',
'email' => 'my.email@domain.com',
'url' => 'http://www.somedomain.com/'
);
}
function plugin_nodeview_uninstall () {
// Do any extra Uninstall stuff here
return true;
}
function plugin_nodeview_check_config () {
// Here we will check to ensure everything is configured
// nodeview_check_upgrade ();
return true;
}
function nodeview_show_tab () {
global $config;
print '<a href="' . $config['url_path'] . 'plugins/nodeview/nodeview.php"><img src="' . $config['url_path'] . 'plugins/nodeview/images/NodeView_tab.png" alt="NodeView" align="absmiddle" border="0"></a>';
}
?>