Hi -
I’m trying to make a tool in virtualmin that allows a domain owner to work with the databases they own. To start, I’m trying display a list of databases in the index.cgi. I’ve seen that you can pass a domain to the CGI using feature_links like this:
sub feature_links
{
local ($d) = @_;
open FILE, ">>", "/tmp/plugin_debug.txt" or die $!;
print FILE "Called Feature links\n";
close FILE;
return ( { 'mod' => $module_name,
'desc' => "My module",
'page' => 'index.cgi?dom='.$d->{'dom'},
'cat' => 'services',
} );
}
but feature_links isn’t being called for me, even after deleting and re-adding a domain. (same thing for feature_setup) When does feature_links and feature_setup get called?
My questions is, how do you get information about the domain, the user, (and the databases they own) over to the CGI? I looked through the module API, and I can’t find the functions for pulling that information out. I see how it’s available to the callbacks in virtual-feature.pl, but it seems that’s separate from the CGIs
feature_webmin is successfully being called to make sure this module is available to all domains.
Thanks!!
-Mike