trouble with custom plugin

I am trying to make my first plugin. I have added it to plugins and features and account plan… But haven’t been able to make it show up in the virtualmin menu. It shows up in webmin modules but not in menu. Ant help will be appreciated.


Is there any chance you could post the contents of your plugin?



Seemed like it shouldn’t be too hard… Just have to launch the php script to connect to the simplescript interface. But I have never tried, and it is probably over my head.

desc=A Plugin to enable SimpleScripts

use WebminCore;
&foreign_require(“virtual-server”, “”);

do ‘’;

sub feature_name
return “A Plug-In to enable SimpleScripts with Virtualmin.”;

sub feature_label
return “Enable the Simple Scripts plugin”;

sub feature_setup
my ($d) = @_;
&$virtual_server::first_print(“Setting up My plugin…”);
my $ex = system("/usr/bin/php launch-simplescripts --add $d->{‘dom’} >/dev/null 2>&1");
if ($ex) {
&$virtual_server::second_print("… failed!");
return 1;
else {
&$virtual_server::second_print("… done");
return 1;

sub feature_links
local ($d) = @_;
return ( { ‘mod’ => $virtualmin-simplescripts,
‘desc’ => “Manage My plugin”,
‘page’ => ‘launch-simplescripts.php?dom=’.$d->{‘dom’},
‘cat’ => ‘services’,
} );


<?php /* Sample Code for the SimpleScripts Client Login API. */ //Gather all the necessary client information into one place. //START EDITING HERE. $my_request = array( "host_key" => "PNMvDB8TDa0M", "host_api_key" => "FST1qvMpbx8348sRXUz7PXlCmy45Yba9", "user_unique" => "****", "user_domain" => "", "user_ip" => "", "user_email" => "", "user_username" => "****", "user_password" => "*****", "user_cptype" => "virtualmin", ); //STOP EDITING HERE. //build the query. $my_request_str = ""; foreach ($my_request as $key => $value) { $my_request_str.= $key."=".urlencode($value)."&"; } //cPanel (and maybe other panels) come with a gutted version of PHP that does not //include the standard CURL libraries. If your panel supports them, you can use those instead. ob_start(); passthru('curl -k --data "'.rtrim($my_request_str,"& ").'" --max-time 60'); $response = ob_get_contents(); ob_end_clean(); //Take apart the response. First part is the success/failure bit (1/0, respectively), //and the second is either a link to redirect to, or a failure message for debugging. $parts = explode("|",$response); if ($parts[0] == "0") { die("Something went wrong!
\n".$parts[1]); } else { header("Location: ".$parts[1]); } ?>