Building a pluggin for your vcPanel
From VcPanel Enterprise : VPS Control Panel
You can develop vcPanel admin and end user plugins. It is a full featured plugin system. No other vps control panels have plugin features. From the vcPanel admin panel you can add /Manage/remove plugin. After uploading and enabling the plugin it will be available under the Plugins menu. For adding your own plugins you need to follow the procedures given below,
- Develop a plugin
- Install plugin
Contents |
Develop a plugin
Admin Plugin files initialization
You may need to initialize each php files for admin plugin with the following code < br />
<?php
//////////////////////////////////////////////////////////
session_start();
include ("../../../include/file40.php");
$lang_code=$_SESSION[lang_code];
include("../../../languages/".$lang_code.".inc.php");
include_once("../../../config.php");
include_once("../../../include/file51.php");
//////////////////////////////////////////////////////////
$filename="lang/".$lang_code.".inc.php";
if(file_exists($filename)){
include($filename);
}
else
{
include('lang/en.inc.php');
}
/////////////////////////////////////////////////////////
?>
User Plugin files initialization
You may need to initialize each php files for user plugin with the following code
<?php
//////////////////////////////////////////////////////////
session_start();
include ("../../../include/file70.php");
$lang_code=$_SESSION[lang_code];
$userid=$_SESSION[uid];
include("../../../languages/".$lang_code.".inc.php");
include_once("../../../config.php");
include_once("../../../include/file51.php");
//////////////////////////////////////////////////////////
$filename="lang/".$lang_code.".inc.php";
if(file_exists($filename)){
include($filename);
}
else
{
include('lang/en.inc.php');
}
//////////////////////////////////////////////////////////
?>
Install Plugin
You need to upload the plugin folder for admin and user into two different folders.
- To upload vcPanel admin plugin , please upload the plugin folder to /usr/local/vcpanel/htdocs/vadmin/plugin/
- To upload vcPanel end user plugin, please upload the plugin folder to /usr/local/vcpanel/htdocs/vclient/plugin/
After that login to vcPanel admin panel vcPanel : VPS Control Panel >> Plugin Management and enable the plugin.

