Mod Names and Title
Please refer to the cPanel Mod Sturcture for file locations below.
Below, we are going to change the names of the directories that are visible to users.
This is not required. However, as with any cPanel mod, these names will appear in the url when the mod is clicked on.
To change the directory names, follow the steps below.
In our example, we will be replacing the visable directories from the default "coffeecp_" id with a new id; "myjavahosting_".
We will also be changing the cPanel section name from "Java Tools" to "My Java Hosting"
1. SSH to your server as root
2. Change to to the paper_lantern directory at /usr/local/cpanel/base/frontend/paper_lantern/
cd /usr/local/cpanel/base/frontend/paper_lantern
3. Use the copy (cp) command to copy the directories with their new names
cp coffeecp_version myhosting_verion
cp coffeecp_manage myhosting_manage
cp coffeecp_jdk myhosting_jdk
cp coffeecp_mapping myhosting_mapping
4. Edit the /coffeecp_master/install.json file to reflect new ids and title
[
{
"order" : 7,
"name" : "My Java Hosting",
"type" : "group",
"id" : "coffeecp_modplugins"
},
{
"icon" : "version.png",
"group_id" : "coffeecp_modplugins",
"order" : 1,
"name" : "Version",
"type" : "link",
"id" : "myhosting_version",
"uri" : "myhosting_version/index.php"
},
{
"icon" : "power.png",
"group_id" : "coffeecp_modplugins",
"order" : 2,
"name" : "Power",
"type" : "link",
"id" : "myhosting_manage",
"uri" : "myhosting_manage/index.php"
},
{
"icon" : "mapping.png",
"group_id" : "coffeecp_modplugins",
"order" : 3,
"name" : "Mappings",
"type" : "link",
"id" : "myhosting_mapping",
"uri" : "myhosting_mapping/index.php"
},
{
"icon" : "jdk.png",
"group_id" : "coffeecp_modplugins",
"order" : 4,
"name" : "JDK",
"type" : "link",
"id" : "myhosting_jdk",
"uri" : "myhosting_jdk/index.php"
}
]
Finally, to register the changes, we need to run the required mod commands.
As root, change to the /usr/local/cpanel/base/frontend/paper_lantern/ directory:
cd /usr/local/cpanel/base/frontend/paper_lantern/
Issue the following:
tar cfj coffeecp_master.tar.bz2 coffeecp_master
/usr/local/cpanel/scripts/install_plugin /usr/local/cpanel/base/frontend/paper_lantern/coffeecp_master.tar.bz2
The above creates a new coffeecp_master archive and then registers it with cPanel.
Your new directory structure will now look as below:
-
/usr/local/cpanel/base/frontend/paper_lanterncpanel mod directory
-
coffeecp_mastermaster mod directory
- jdk.pngjdk module icon
- mapping.pngmapping module icon
- power.pngpower module icon
- version.pngversion module icon
- install.jsoncontains names and images
-
myhosting_versionmain version directory
- index.live.phpmain version page
- install.live.phpmain app install file
- version.pngversion icon
-
myhosting_managemain version directory
- index.live.phpmain stop/start/resart page
- power.pngversion icon
-
myhosting_mappingmain mapping module
- index.live.phpmain page
- mappath.phpmain mapping file
- exmappath.phpmain mapping file
- mapping.pngmapping icon
-
myhosting_jdkjdk selection module
- index.live.phpjdk selection page
- jdk.pngjdk icon
-
coffeecp_staticDo NOT Change Name. Any changes in this folder will break installation
- Coffeecp_Manage.php.phpmanagement functions
- Coffeecp_Map.phpmapping functions
- Coffeecp_Server.phpserver functions
- twg_users.phpjava admin config
- phpseclib1.0.4secure ssh library
-
coffeecp_mastermaster mod directory