Results 1 to 2 of 2

Thread: Customising CPanel interface Statsbar.pm

  1. #1
    Registered User
    Join Date
    Sep 2011
    Posts
    3
    cPanel/WHM Access Level

    Root Administrator

    Default Customising CPanel interface Statsbar.pm

    Hello,

    I am trying to make some small modifications the the Stats Panel on the cpanel main menu. (The expandable box that contains Lastlogin, disk usage, number of email accounts etc)

    Looking around I found the file /usr/local/cpanel/Cpanel/StatsBar.pm which seems to be what I am looking for. I have added an entry for the number of Inods for a particualr user but no changes are appearing in the actual cpanel account when I log in.

    Am I editing the right file? Is there something else I should be doing?

    Any advise would be appricated.

    Regards,
    Colin

  2. #2
    Member
    Join Date
    Oct 2009
    Posts
    12
    cPanel/WHM Access Level

    Root Administrator

    Default Re: Customising CPanel interface Statsbar.pm

    Hello Colin,

    If you added new function to StatsBar.pm file you need to use the function in the theme:

    /usr/local/cpanel/base/frontend/x3/branding/index.html (cPanel's guys suggest using Branding Editor)

    Find this code:
    Code:
                    <?cp StatsBar::stat(
                            [tr class="row-%"]
                                    [td class="stats_left"]%[/td]
                                    [td class="stats_right"]
                                            % / %[br /]
                                            [div class="stats_progress_bar"]
                                                    [div class="cpanel_widget_progress_bar_percent" style="display\{colon}none"]%[/div]
                                            [/div]
                                    [/td]
                            [/tr]
                    ,rowtype,item,count,max,percent) display=lvecpu|lvemem|lvemep|diskusage|bandwidthusage,infinitylang=true,rowcounter=mainstats ?>
    and add your custom function, something like this:
    Code:
    display=lvecpu|lvemem|lvemep|diskusage|inodes|bandwidthusage,infinitylang=true,rowcounter=mainstats ?>
    Don't forget that StatsBar.pm file can be replaced after upcp, as well as index.html file if you changed it via CLI.

Similar Threads

  1. StatsBar::stat
    By morissette in forum cPanel Developers
    Replies: 1
    Last Post: 11-09-2011, 10:04 PM
  2. StatsBar::stat JSON Error
    By higherlogic in forum cPanel Developers
    Replies: 1
    Last Post: 07-15-2010, 06:33 PM
  3. x3mail theme statsbar
    By Brandonm in forum Themes and Branding
    Replies: 10
    Last Post: 07-15-2009, 02:31 PM
  4. cphulk customising?
    By 10101 in forum cPanel & WHM Discussions
    Replies: 0
    Last Post: 01-14-2008, 07:29 AM
  5. customising webmail
    By Ash-Group in forum cPanel & WHM Discussions
    Replies: 4
    Last Post: 07-04-2005, 04:22 AM