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.

Adding rows to stat.html with data gathered by PHP script.

Discussion in 'cPanel Developers' started by bbhsoft, Feb 21, 2008.

  1. bbhsoft

    bbhsoft Member

    Joined:
    Feb 19, 2008
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    Hello, i'm working for a hosting company that uses cPanel, on creating a custom theme based on x3, and i would like to ask how can i do these changes.

    I want to add 2 rows, on the left site at stats (stat.html), the data will be gathered by php scripts. I just need when someone logins on his cpanel to see this data on the left side.
     
  2. bbhsoft

    bbhsoft Member

    Joined:
    Feb 19, 2008
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    I've added the rows from branding/index.html, but i can't include PHP files, they include but do not execute, is it possible to make those php files execute when they're included ?

    Thanks.
     
  3. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    I believe if you rename branding/index.html to something like branding/index.cpphp (.cpphp executes API tags before PHP) or branding/index.phpcp (executes PHP before API tags) and update your /index.html file appropriately, the PHP will execute.
     
  4. vinodwedhera

    vinodwedhera Registered

    Joined:
    Jul 7, 2009
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    cp rename index file


    i am trying to rename file through file manager.when i rename it a new index.html file is created.will u help me resolve this problem
     
  5. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    I'll look into this later today. Feel welcome to email sales@cpanel.net if you need a faster response.
     
  6. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    To insert PHP code into your index.html page and have it execute, I have done the following workaround:

    - Copy /usr/local/cpanel/base/frontend/x3/index.html to /usr/local/cpanel/base/frontend/x3/index.php

    On the server I am using, index.php takes precedence over index.html in the cPanel service (cpsrvd) that serves the cPanel interface pages. Since this is now an index.php page including your index.html page, any PHP code in the index.html page in the branding editor will be executed (no need to make that index.php as well).

    You can also use cpphp phpcp or livephp if you desire.
     
  7. bradcapo1

    bradcapo1 Registered

    Joined:
    Jul 20, 2009
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    I am not so knowledgeable about this matter. So i have to learn it. Thanks for the post.




    taux pret auto - taux pret auto differe selon la rise en compte ... calculent automatiquement le taux pour un prĂȘt automobile donne.
     
Loading...

Share This Page