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.

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:
    1
    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
     
  2. cPanelDavidN

    cPanelDavidN Integration Developer
    Staff Member

    Joined:
    Dec 17, 2009
    Messages:
    571
    Likes Received:
    1
    Trophy Points:
    18
    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
     
  3. admin0

    admin0 Active Member

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

    Cheers,
    Shashi
     
Loading...

Share This Page