Overview
This guide provides instructions on customizing the Enduser panel for Webuzo, allowing you to personalize both the icons and name as well as hide icons and info columns based on your preferences
Procedure
To achieve this you have to Make a new directory with the "hooks" name at the following path;
/usr/local/webuzo/
Subsequently, create a file named "filter.php" in the directory "/usr/local/webuzo/hooks/". The file path will look like this "/usr/local/webuzo/hooks/filter.php."
To customize icons and name
To customize the icons and name of the end-user panel, simply insert the provided content into the filter.php file located in the directory mentioned earlier.
<?php
add_filter('enduser_cats_icons', 'enduser_cats_icons');
function enduser_cats_icons($icons){
//To change the name and icons
$icons['category']['icons']['act_name']['name'] = 'customize_name';
$icons['category']['icons']['act_name']['icon'] = 'Icon Url';
// For the hide of act menu
unset($icons['category']['icons']['act_name']);
return $icons;
}
You can identify the act name by visiting the respective act page and extracting it from the URL.
Note: Please note that certain acts have distinct URLs, kindly refer the table below for their respective act names
Add Addon domain => 'addon_domain'
Subdoamin => 'sub_domain'
Current Databases => 'dbmanage'
Backup => 'webuzo_backup'
Apache Tomcat => 'apache_tomcat'
SVN Management => 'svn_manager'
Access Email => 'webuzo_rainloop'
WordPress Manager => 'wp_manager_cname'
Softaculous => 'softaculous'
eg. for the email account
To determine the act category, refer to the array of category sections below. Insert the corresponding category name into the designated category field;
For instance, use 'email' for the Email category.
Email => 'email'
Domain => 'domain'
Database => 'database'
SSL => 'ssl'
FTP => 'ftp'
Application => 'apps'
Configuration => 'configuration'
Security => 'security'
Server Utilities => 'serverUtilities'
Advanced settings => 'advancedSettings'
Server Info => 'serverInfo'
example:
Let's say I want to modify the name and icon of an email account act and hide email forwarder act, specifically both are located in the email section. To achieve this, I place "email" in the category field and "email_account" in the act_name field to change the name and icon, Provide a customized name for the act and include the icon link.
To hide the email forwarder act I place "email_forward" in the act name field in the unset section same email as a category field.
<?php
add_filter('enduser_cats_icons', 'enduser_cats_icons');
function enduser_cats_icons($icons){
// For change the name and icons
$icons['email']['icons']['email_account']['name'] = 'List of Email Account';
$icons['email']['icons']['email_account']['icon'] = 'https://www.logo.com/logo.png';
// For the hide of act menu
unset($icons['email']['icons']['email_forward']);
return $icons;
}
To Hide right info columns
To hide the right info menus in the Enduser panel, simply insert the provided content into the filter.php file located in the directory mentioned earlier.
<?php
add_filter('userindex_right_menu', 'enduser_right_menu');
function enduser_right_menu($right_menu){
unset($right_menu['key value of right info column']);
return $right_menu;
}
The following table describe the names of the respective right columns and their corresponding keys.
Bandwidth Statistics => 'bandwidth_statistics'
Server Status => 'server_status'
Info Panel => 'info_panel'
Monthly Chart => 'info_panel'
Example:
Suppose you want hide bandwidth statistics column then just insert the corresponding key value.
Like unset($right_menu['bandwidth_statistics']); It will hide the Bandwidth Statistics column.