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

shazde

Active Member
May 19, 2014
31
0
56
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)
 
Last edited:

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,268
463
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.
 

shazde

Active Member
May 19, 2014
31
0
56
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.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,268
463

shazde

Active Member
May 19, 2014
31
0
56
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?
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,268
463
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.