Skip to main content

Show or hide group of cPanel plugin based on package option

Comments

5 comments

  • cPanelLauren
    HI @CloudNexus The documentation on Package Extensions Data Behavior and Changes seems to address this, have you removed the package extensions from one of the packages and tested that way? Guide to Package Extensions - Data Behavior and Changes - Developer Documentation - cPanel Documentation
    0
  • CloudNexus
    HI @CloudNexus The documentation on Package Extensions Data Behavior and Changes seems to address this, have you removed the package extensions from one of the packages and tested that way? Guide to Package Extensions - Default Settings Files - Developer Documentation - cPanel Documentation). The package extension shows up properly and works during account creation and WMH users can fill in the fields I require. My issue that I need this package variable should enable/disable a cPanel icon group on the FRONTEND side of things (so not in cPanel). This cPAnel group is my own (part of my product). If the feature hasn't been enabled for the user, the plugin shouldn't be visible for users. I think the best comparison would be this - my use case is nearly the same in a matter of speech. During account creation in WHM I "Disable" mysql for a given account as a package extension (note: I don't set it to 0 databases, I disable it completely). When I disable mysql for a given account (through his hosting package) I want to REMOVE the cPanel plugin group that is shown below from cPanel completely - the user doesn't have access to this feature, so it doesn't make sense to show this block of options if MySQL is disadbled for an account. 52919 I hope I cleared up my question.
    0
  • cPanelLauren
    Hi @CloudNexus The solution to removing the databases section is to remove all associated features in the feature manager. I removed MySQL, PHPMyAdmin, PostgreSQL, PHPPGAdmin from the feature list associated with my account. As you can see in the screenshot the group no longer exists within the cPanel account. 52923 Once creating your plugin and installing it with cPanel is the option for it not added to the feature manager? If it is added to the feature manager, to clarify does deselecting it from the feature list not remove it from the package? Like the rest of cPanel's features removing the associated features should remove the group though I am not aware of a function that will remove the entire group.
    0
  • CloudNexus
    Hi there Lauren. You are very right (of course you are) - I copy pasted the default sample of the install.json script where the 'featuremanager = false' was defined. So it never showed up in feature lists, and I never thought about this. You just fixed this for me...again! Thank you so much!
    0
  • cPanelLauren
    Hi @CloudNexus Awesome, you're very welcome! I'm so glad I was able to help! Thank you for letting us know what you did to resolve it as well :)
    0

Please sign in to leave a comment.