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!

How to have a plugin displayed in the right panel under whm?

Discussion in 'cPanel Developers' started by shazde, Mar 23, 2018.

  1. shazde

    shazde Active Member

    Joined:
    May 19, 2014
    Messages:
    25
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Hi,

    Sorry for another question but as you might have guessed I am assigned with the job to update our plugins to work with current whm versions.

    One of the problems that we face with the new version is that when we click on out plugin link under the plugin sections it opens a new window rather than just showing the content on the right panel as it used work before.

    I did some search and it seems there is a new option under appconfig config file for target which we should set it to _self.

    The problem here is that when we do that and register the plugin again, the plugin content still doesn't show on the right section. What happens this time is that it just overrides the current tab with the content which is not the desired outcome.

    I checked CageFS plugin which opens on the right panel without any problem and this is my finding:
    1. They use target=_self too
    2. The content that comes back from their plugin also includes the whm menus and everything. (I checked that by right clicking on the link and having it opened in a new tab)

    So my question is, is there something that is missing in the document? Are we supposed to send back the whole whm content as a part of our plugin output?
    And if yes how? (We use Golang for our CGI development)
     
    #1 shazde, Mar 23, 2018
    Last edited: Mar 23, 2018
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    43,711
    Likes Received:
    1,791
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    You can find information about this change referenced on the following post:

    Plugins Open In New Window v64

    We document information about how to ensure the plugin opens and displays correctly at:

    Guide to WHM Plugins - Developer Documentation - cPanel Documentation

    In particular, we document examples of how to ensure the plugin appears in the WHM user interface at:

    Guide to WHM Plugins - Interfaces - Developer Documentation - cPanel Documentation

    Can you review these documents and let us know if they help?

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. shazde

    shazde Active Member

    Joined:
    May 19, 2014
    Messages:
    25
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Thanks for the links.

    Unfortunately it only covers php and perl. How about other more generic option? For instance for us we have our CGI developed in Go.
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    43,711
    Likes Received:
    1,791
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. shazde

    shazde Active Member

    Joined:
    May 19, 2014
    Messages:
    25
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    I checked the links and I am probably missing something very obvious so sorry for silly question but those seem to all be perl related.
    Are we supposed to somehow integrate Template Engine into Golang?

    I guess the big question here is how to integrate your Perl template engine in other languages?
     
  6. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    43,711
    Likes Received:
    1,791
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    Essentially, you'd want to modify your existing plugin to utilize template toolkit. If you have not used Template Toolkit previously, we recommend that you start with template-toolkit.org's Template::Tutorial::Web tutorial.

    If you need more specific guidance with actual code, you could try reaching out directly to one of our Integration Developers by sending an email to integrationATcpanel.net.

    Thank you.
     
    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