How to show plugin custom field on the account plans using the "feature_limits_input" function?

I am creating a new plugin that will automatically install CMS per plan uppon a new virtualhost creation.

  1. I try the following code but its not returning anything in plan, if i make a mistake in code it does show an error in the plan edit page.

     sub feature_limits_input
     {
     my ($d) = @_;
     return &ui_table_row("Maximum My plugin databases",
       &ui_opt_textbox($input_name."limit", $d->{$module_name."limit"},
                   4, "Unlimited", "At most"));
     }
    
  2. What is the correct way/code for creating DB and user for virtualhost in plugin?

After many times re-reading the phrase in documentation:

“…Plugins can define fields that will appear on the owner limits page

I found the new field added here:
administration options > edit owner limits

It didn’t make much sense as i was expecting the new field to be set on the account plans page (if i can edit it under owner limits, then i must set it somewhere like account plan)

On other documentation page i found this:

Limits from plans can be changed on a per-virtual-server basis using the Edit Owner Limits page, under the Administration Options menu category. These will remain in effect until the virtual server’s plan is changed, at which time the new plan settings will override any customization you make here.

So would custom fields appear on the account plans?
Or is there other way for defining a per plan limit for the new plugin?

Thank you very much in advanced for your reply.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.