Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

small plugin help.

Discussion in 'cPanel Developers' started by admin0, Apr 22, 2012.

  1. admin0

    admin0 Active Member

    Joined:
    Aug 11, 2002
    Messages:
    29
    Likes Received:
    0
    Trophy Points:
    151
    Hi,

    I wrote a custom plugin for cpanel and got it working the way I wanted it work.
    There is however a small issue. When I click the home link, it tries to take me to the current folder index.html and not the index.html a folder above (..)

    The code starts with
    $cpanel =& new CPANEL();
    $res = $cpanel->api1('Branding', 'include', array('stdheader.html'));
    print $res['cpanelresult']['data']['result'];

    How do I set such that the HOME points to ../index.html and not the current index.html ?

    Thanks
    Shashi
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  2. cPanelDavidN

    cPanelDavidN Integration Developer
    Staff Member

    Joined:
    Dec 17, 2009
    Messages:
    571
    Likes Received:
    3
    Trophy Points:
    68
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    Make a call to 'setvar' with a 'dprefix' argument before you do the branding include call:
    PHP:
    $cpanel->api1'setvar''', array("dprefix=../") );
    'setvar' is a special API1 style call

    Regards,
    -DavidN
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. admin0

    admin0 Active Member

    Joined:
    Aug 11, 2002
    Messages:
    29
    Likes Received:
    0
    Trophy Points:
    151
    Thank You David.

    Cheers,
    Shashi
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice