|
From: Bill M. <bm...@ud...> - 2008-02-07 14:01:25
|
> If you are implementing this as Virtualmin plugin (with a > virtual_feature.pl file), you can have your own input fields added to the > mailbox user form by defining the mailbox_inputs function in > virtual_feature.pl . This is the recommended method, as it removes the > need to modify the core Virtualmin code, and so will continue to work even > after an upgrade. > > For details on writing plugins, go to > http://www.virtualmin.com/documentation/ and then to the plugin > developer's documentation. Jamie, you're right. I didn't know about the mailbox_inputs function in the docs. Thanks, that solves that problem. Also, we'd like to inject into the user creation email a variable containing a link to the activation page. Looking through the docs and the source, I don't see any way that plugins can change the substitution hash for template emails. If such a thing doesn't exist, maybe there could be another function in the virtual_feature.pl api such as mailbox_email_substitutions which returns a hash of additional email substitution variables and is called by send_template_email. I can see how potentially other plugins might want to be able to do this as well, but you might not agree that it's important enough to warrant changing the core. The only solution I can see without such a function is to have mailbox_save actually insert the link directly into the template email, but that's bad because there's no (I think) guarantee that the save will be called before the email is sent, and it's just an ugly solution. |