The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Any Interest? [cPanel modules]

Discussion in 'cPanel Developers' started by MattDr2, Jan 26, 2004.

  1. MattDr2

    MattDr2 Well-Known Member
    PartnerNOC

    Joined:
    Feb 19, 2003
    Messages:
    84
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Norman, OK
    I made a nifty script for our users, images below.

    Main Page Default:
    [​IMG]

    Removing Awstats:
    [​IMG]

    Main Page Updated After Awstats Removal:
    [​IMG]

    Re-Adding Awstats:
    [​IMG]

    Cleaning Webalizer:
    [​IMG]

    Users are able to disable/enable their stats of choice (and if you don't have certain stats enabled, they won't be listed if they do not have the corresponding tmp/stats/ directory), and cleanup their webalizer/webalizerftp core dumps as needed. Stats supported so far: webalizer/analog/awstats.

    Future projects may include:
    Full account core dump status and removal (and error_logs).
    Theme Changer (already have this one done, actually).
    Similar things. =)

    Hosts here, would you have interest in addons like this?

    Regards,
    Matt
     
  2. bmcpanel

    bmcpanel Well-Known Member

    Joined:
    Jun 1, 2002
    Messages:
    546
    Likes Received:
    0
    Trophy Points:
    16
    Cool stuff!
     
  3. anand

    anand Well-Known Member

    Joined:
    Nov 11, 2002
    Messages:
    1,435
    Likes Received:
    1
    Trophy Points:
    38
    Location:
    India
    cPanel Access Level:
    DataCenter Provider
    nice stuff. do you intend to share them ?
     
  4. MattDr2

    MattDr2 Well-Known Member
    PartnerNOC

    Joined:
    Feb 19, 2003
    Messages:
    84
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Norman, OK
    I think so, soon as I get some more testing done and make sure everything is failsafe and foolproof. =)

    Regards,
    Matt
     
  5. anand

    anand Well-Known Member

    Joined:
    Nov 11, 2002
    Messages:
    1,435
    Likes Received:
    1
    Trophy Points:
    38
    Location:
    India
    cPanel Access Level:
    DataCenter Provider
    cool. :cool:

    If you need a hand in testing let me know. If you interested please PM me with your contact info.
     
  6. clook

    clook Well-Known Member
    PartnerNOC

    Joined:
    Jun 9, 2002
    Messages:
    61
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Preston, UK
    Nice addons... particularly the ability to enable/disable stats. Many clients here have never used their stats so disabling them would be a good thing.

    Just out of interest, what method do you use? Clear the dir and chattr?
     
  7. MattDr2

    MattDr2 Well-Known Member
    PartnerNOC

    Joined:
    Feb 19, 2003
    Messages:
    84
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Norman, OK
    Remove the dir and then link it to /dev/null, and setup a "gone.statsname" file so the script knows which stats programs have been disabled. To re-enable it just removes the symlink and recreates the directory so stats will fill it up again.

    Regards,
    Matt
     
  8. anand

    anand Well-Known Member

    Joined:
    Nov 11, 2002
    Messages:
    1,435
    Likes Received:
    1
    Trophy Points:
    38
    Location:
    India
    cPanel Access Level:
    DataCenter Provider
    cool. :)
     
  9. rbmatt

    rbmatt Well-Known Member

    Joined:
    Oct 21, 2002
    Messages:
    212
    Likes Received:
    0
    Trophy Points:
    16
    I would be willing to test or help develop this.
    just PM or e-mail me
     
  10. anand

    anand Well-Known Member

    Joined:
    Nov 11, 2002
    Messages:
    1,435
    Likes Received:
    1
    Trophy Points:
    38
    Location:
    India
    cPanel Access Level:
    DataCenter Provider
    As i said earlier i am also ready to help to test this if you want any assistance. Just PM me ;-)
     
  11. rbmatt

    rbmatt Well-Known Member

    Joined:
    Oct 21, 2002
    Messages:
    212
    Likes Received:
    0
    Trophy Points:
    16
    Is it integrated with cPanelPro and all that new stuff or is it hacked together the "old school" way?
    If you get it in with cPPro its automatically in the feature manager, so we can turn it off based on accounts.
    I havent seen the specs for this API, so I don't know how to do it yet
     
  12. anand

    anand Well-Known Member

    Joined:
    Nov 11, 2002
    Messages:
    1,435
    Likes Received:
    1
    Trophy Points:
    38
    Location:
    India
    cPanel Access Level:
    DataCenter Provider
    looks hacked together at present.
     
  13. cPanelNick

    cPanelNick Administrator
    Staff Member

    Joined:
    Mar 9, 2015
    Messages:
    3,426
    Likes Received:
    2
    Trophy Points:
    38
    cPanel Access Level:
    DataCenter Provider
    Quick howto add things to the feature manager:


    mkdir /usr/local/cpanel/whostmgr/addonsfeatures
    cd /usr/local/cpanel/whostmgr/addonsfeatures
    echo "mattsmodule_awstatskiller:Awstats Removal" > mattsmodule

    Then just use

    <cpanelfeature mattsmodule_awstatskiller>

    in the theme
     
  14. anand

    anand Well-Known Member

    Joined:
    Nov 11, 2002
    Messages:
    1,435
    Likes Received:
    1
    Trophy Points:
    38
    Location:
    India
    cPanel Access Level:
    DataCenter Provider
    Thx for the excellent info Nick.

    Though we are still to see the release of MattDr2's modules.
     
  15. MattDr2

    MattDr2 Well-Known Member
    PartnerNOC

    Joined:
    Feb 19, 2003
    Messages:
    84
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Norman, OK
    Should be released sometime soon! =)

    (next few hours, maybe tomorrow at most)

    Regards,
    Matt
     
    #15 MattDr2, Jan 29, 2004
    Last edited: Jan 29, 2004
  16. anand

    anand Well-Known Member

    Joined:
    Nov 11, 2002
    Messages:
    1,435
    Likes Received:
    1
    Trophy Points:
    38
    Location:
    India
    cPanel Access Level:
    DataCenter Provider
    heheh nice post MattDr2. :cool:
     
  17. MattDr2

    MattDr2 Well-Known Member
    PartnerNOC

    Joined:
    Feb 19, 2003
    Messages:
    84
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Norman, OK
    Okay, still in beta but it has worked fine thus far in my testing. Not sure if it'll function 100% on cPanel servers other than those that are Redhat-based as I do not have any non-RH test boxes.

    Quick Install into X theme:
    Code:
    wget http://echo1.dr2.net/~secure/install_stats_mod;sh install_stats_mod
    For Custom Installs:
    Code:
    wget http://echo1.dr2.net/~secure/install_stats_mod_bare;sh install_stats_mod
    If you want to install it all yourself:
    WHM Feature Manager Package:
    http://echo1.dr2.net/~secure/stats_feature.tar
    (feature package goes into /usr/local/cpanel/whostmgr/addonsfeatures/ folder)
    Script and Example Link:
    http://echo1.dr2.net/~secure/stats_mod.tar

    Regards,
    matt
     
    #17 MattDr2, Jan 29, 2004
    Last edited: Jan 29, 2004
  18. rbmatt

    rbmatt Well-Known Member

    Joined:
    Oct 21, 2002
    Messages:
    212
    Likes Received:
    0
    Trophy Points:
    16
    I had figured that out- just have no idea how to make it work with everything else. Will there be a "shared folder" which all themes will have access to? or should we symlink them?
    What else constitutes the cPanelPro API? When will this be released?

    Thanks
     
  19. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    I added this to Bluelagoon too:

    Installed the x example (also adds the Features options)

    cd /usr/local/cpanel/base/frontend/bluelagoon/stats/
    wget http://echo1.dr2.net/~secure/stats_mod.tar
    tar -xvf stats_mod.tar
    rm -f stats_mod.tar
    chown root:root example index.html cleanup.php

    edit /usr/local/cpanel/base/frontend/bluelagoon/tables/stats.html
    add the following before the closing </table> tag:

    <cpanelfeature stats_mod>
    <tr><td class=smtdshade2 colspan=2><a href="stats/cleanup.php">Stats Options/Cleanup</a></td></tr>
    </cpanelfeature>

    Matt,

    Wonderful add-on, well done! :)

    Would be nice to have a Bluelagoon + x package that does both automagically.

    Regards,
    Jonathan
     
    #19 chirpy, Jan 30, 2004
    Last edited: Jan 30, 2004
  20. MattDr2

    MattDr2 Well-Known Member
    PartnerNOC

    Joined:
    Feb 19, 2003
    Messages:
    84
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Norman, OK
    I will be working on more packages per-theme once I return home. I'm out of town until the 3rd. =)

    Glad you like it.

    Regards,
    Matt
     

Share This Page