Featured Posts

Using DKIM with Exim and cPanel Similar to the intentions of SPF records and DomainKeys, DKIM is intended to authenticate a sender by using a public/private key pair to digitally sign email, therefore increasing deliverability. At this...

Readmore

Copy Outgoing Email on a cPanel Server with Exim A common request we get is how a user can automatically BCC outgoing email to another address. This is most often requested by law firms that need to be able to retain copies of communication. Forwarding...

Readmore

Do You Care About Your Customers' Data? I was working a case last week for a new client that's been hosting local business websites for over three years. As with all of my case studies, I did a short survey of the client's infrastructure, processes,...

Readmore

Tips to Reduce Your Customer Support Costs When hosting websites, whether as a mainstream hosting provider, a hobby, or to supplement another service, it's your job to make sure your customers have access to technical support in case they need...

Readmore

Roundcube: MySQL or SQLite? cPanel 11.25 introduces a new feature: The ability to have RoundCube use SQLite instead of MySQL. After benchmarking resource usage and performance, I've come to the conclusion that SQLite is definitely...

Readmore

The cPanel Admin Rss

Adding New Feature Groups for a cPanel Theme

Posted by Vanessa | Tagged under ,, | Posted on August 24, 2010

0

You’ll probably often see hosts that have a ton of extra icons in their cPanel for various items. When you’re customizing cPanel, it’s useful to be able to be able to add icon groups for features that either need to be grouped together, or that don’t fit into other categories.  cPanel 11 makes it very easy to customize how icons are presented.

Create the Group

First, you’ll want to create your icon group.  The group will contain features/plugins that you create and assign to the group. Here’s a very basic example of a Twitter plugin that was created as part of a separate group called “Extras”:

First, we’re going to create the “Extras” group:

If you’re using the x3 theme, go into /usr/local/cpanel/base/frontend/x3/dynamicui . Create a file based on your new menu, prefaced with dynamicui, and ending in .conf. For example, I’m creating a group of icons that I want to be under a group called “extras”, so the file I create will be called dynamicui_extras.conf .

In the dynamicui_extras.conf file, all on one line, I’ll add the properties for my group, making sure everything is on one line:

groupdesc=>Extras,description=>extra icons,grouporder=>-100,group=>extras_menu,
imgtype=>icon,subtype=>img,type=>image,file=>extras,height=>32,width=>32

*Above info may be wrapped for display purposes, but in the file it should all be on one line

The settings here should be fairly self-explanatory, but here are the main elements:

  • groupdesc: The label that will show up in cPanel for the group heading
  • description: Describes the group (not shown in cPanel)
  • grouporder: Where the group will show up in the cPanel interface (accepts negative values, lowest number is highest up)
  • group: The name of the group, used when generating cPanel plugins

The rest of the values should be inputted as above, and just put the file value as the name of the group.  Now, save the file and reload cPanel. If you have active feature in this group, you should see the group and its icons appear when loading cPanel. If you don't see it, it means that either you don't have any features as part of the group, or your features are not configured correctly. So let's do that now!

Create Plugins (Features)

Cpanel plugins are basically items in cPanel that add functionality, and are enabled/disabled in WHM's Feature Manager. To create a plugin, simply use the cPanel Plugin Generator.  Notice that in the form, there's an option for Display Group - you can choose any of those for now, since you're just going to change it later.

Once you've generated and downloaded the plugin, open the plugin file and edit the group line.  This should reflect the value you put as group for the group you created earlier, so in my example, the line should read:

group:extras_menu

To install the plugin, copy the file to /usr/local/cpanel/bin and run:

/usr/local/cpanel/bin/register_cpanelplugin /usr/local/cpanel/bin/<pluginfilename>

You should now see the icon and group in cPanel. If you don't, you can try rebuilding the sprites:

/usr/local/cpanel/bin/rebuild_sprites

Resources:

cPanel Documentation: Installing Plugins

cPanel Documentation: Adding Icons and Groups

Liking this article? Share it and spread the word!
  • Print
  • PDF
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • DZone
  • LinkedIn
  • Live
  • MySpace
  • RSS
  • Reddit
  • Slashdot
  • StumbleUpon
  • Technorati
  • Twitter

Related posts:

Write a comment