From 39cb5f5a45b7cdacd486402f04dc04cc30933243 Mon Sep 17 00:00:00 2001 From: "mkanat%bugzilla.org" <> Date: Mon, 30 Nov 2009 23:58:37 +0000 Subject: Bug 531988: Add information about templates to Bugzilla::Extension's POD and port over Bugzilla:Writing_Extensions Patch by Max Kanat-Alexander (module owner) a=mkanat --- Bugzilla/Extension.pm | 203 +++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 193 insertions(+), 10 deletions(-) (limited to 'Bugzilla/Extension.pm') diff --git a/Bugzilla/Extension.pm b/Bugzilla/Extension.pm index 8e603c5d4..fa1c1f52e 100644 --- a/Bugzilla/Extension.pm +++ b/Bugzilla/Extension.pm @@ -246,6 +246,20 @@ The L above gives a pretty good overview of what's basically required to write an extension. This section gives more information on exactly how extensions work and how you write them. +=head2 Using F + +There is a script, L, that will set up the framework +of a new extension for you. To use it, pick a name for your extension +and, in the base bugzilla directory, do: + +C + +But replace C with the name you picked for your extension. That +will create a new directory in the F directory with the name +of your extension. The directory will contain a full framework for +a new extension, with helpful comments in each file describing things +about them. + =head2 Example Extension There is a sample extension in F that demonstrates @@ -341,6 +355,23 @@ as CGI arguments to the current script, or what arguments were passed to the current WebService method. You can get that data via . +=head3 Adding New Hooks To Bugzilla + +If you need a new hook for your extension and you want that hook to be +added to Bugzilla itself, see our development process at +L. + +In order for a new hook to be accepted into Bugzilla, it has to work, +it must have documentation in L, and it must have example +code in F. + +One question that is often asked about new hooks is, "Is this the most +flexible way to implement this hook?" That is, the more power extension +authors get from a hook, the more likely it is to be accepted into Bugzilla. +Hooks that only hook a very specific part of Bugzilla will not be accepted +if their functionality can be accomplished equally well with a more generic +hook. + =head2 If Your Extension Requires Certain Perl Modules If there are certain Perl modules that your extension requires in order @@ -410,16 +441,6 @@ your extension is a single file named C. If any of this is confusing, just look at the code of the Example extension. It uses this method to specify requirements. -=head2 Templates - -Extensions store templates in a C