Difference between revisions of "Contribution convention"

From WHMCS Documentation

(After creation)
 
(9 intermediate revisions by 2 users not shown)
Line 1: Line 1:
__NOTOC__
+
So, you want to release and document your WHMCS module/modification/enhancement/template on the wiki? Follow these guidelines to get up and running and ''thank you'' for sharing!
So, you want to release and document your WHMCS module/modification/enhancement/template on the wiki? Follow these guidelines to get up and running.
 
  
 +
Confused about something on this page? Not sure what to do? Ask on the [[Talk:Contribution convention|talk page]].
 +
__TOC__
 
== Naming your page ==
 
== Naming your page ==
 
Your new page should be named accordingly:
 
Your new page should be named accordingly:
 
Contribution:ModificationName
 
Contribution:ModificationName
  
I.E. If you're the creator of 'MyAwesomeModule', head along: [[Contribution:MyAwesomeModule]]!
+
I.E. If you're the creator of 'MyAwesomeModule', head along: <nowiki>[[Contribution:MyAwesomeModule]]</nowiki>!
  
 
== Page content ==
 
== Page content ==
Line 22: Line 23:
 
  <nowiki>}}</nowiki>
 
  <nowiki>}}</nowiki>
  
Your new page will be automatically formatted and added to the appropriate categories. Step-by-step:
+
This calls the [[Template:Contribution|contribution template]] with various options, meaning your new page will be automatically formatted and added to the appropriate categories.
 +
 
 +
=== Parameter editing and explanation ===
 
  <nowiki>{{Contribution|</nowiki>
 
  <nowiki>{{Contribution|</nowiki>
This line should be left as it is
+
:This line should be left as it is - this is the name of the template being called.
  
  
 
  | name = MyAwesomeModule
 
  | name = MyAwesomeModule
Your module's name
+
:Your module's name
  
  
 
  | author = Your name / wiki username
 
  | author = Your name / wiki username
Take credit for your work!
+
:Take credit for your work! If you are registered on the wiki use your username - it will then automatically link to your userpage. Contributions will be automatically added to the category ''Category:Contributions/Authorname'' (which will also be linked to on the contribution's page).
  
  
Line 38: Line 41:
 
  | user = yes
 
  | user = yes
 
  | theme = yes
 
  | theme = yes
These specify the type of modification. Admin-side, user-side or a new theme/template. Remove all those that don't apply to your contribution. Your page will be automatically categorised based upon these lines.
+
:These specify the type of modification. Admin-side, user-side or a new theme/template. Remove all those that don't apply to your contribution. Your page will be automatically categorised based upon these lines.
  
  
 
  | desc = A short summary of your project
 
  | desc = A short summary of your project
Let people know exactly what your modification does.
+
:Let people know exactly what your modification does. Don't go mad, you can add a features section later, this should just be a short intro.
  
  
 
  | version = Current version number
 
  | version = Current version number
1.0 is a good starting place.
+
:1.0 is always a good starting place.
  
  
 
  | zip = <nowiki>http://mydomain/link/to/download.zip</nowiki>
 
  | zip = <nowiki>http://mydomain/link/to/download.zip</nowiki>
 
  | targz = <nowiki>http://mydomain/link/to/download.tar.gz</nowiki>
 
  | targz = <nowiki>http://mydomain/link/to/download.tar.gz</nowiki>
Use both, or either. Specify the URL to download your modification from as either a .tar.gz or .zip file. If your download is neither format or you want to link to a different page, use 'link' and 'linkname' instead:
+
:Specify the URL to download your modification from as either a .tar.gz or .zip file. You may use both formats, or either (See [[#Optional parameters|Optional parameters]] below if you don't want to use downloads). If your download is neither format or you want to link to a different page, use 'link' and 'linkname' instead:
 
  | link = <nowiki>http://link/to/another/site/</nowiki>
 
  | link = <nowiki>http://link/to/another/site/</nowiki>
 
  | linkname = Download here
 
  | linkname = Download here
 +
 +
=== Optional parameters ===
 +
 +
| nofeatures = yes
 +
:Add this if you don't want to display a list of features. <nowiki>''E.G. [[User:Matt|Matt]]'s [[Contribution:Banned Emails|Banned Emails]] addon.''</nowiki>
 +
 +
 +
| nochangelog = yes
 +
:Add this if you don't want to maintain a project changelog. <nowiki>''E.G. [[User:Matt|Matt]]'s [[Contribution:Banned Emails|Banned Emails]] addon.''</nowiki>
  
  
If your modification is just a small one and doesn't require a download don't supply download links, instead use this parameter:
 
 
  | code = yes
 
  | code = yes
This will instead allow you to insert code changes onto the page.
+
:Add this to display the necessary code changes to make to install this contribution instead of showing download links. Code changes are stored in sub-pages (see below).
 +
:Note: If you supply download links they will be squashed by this option
  
 
== After creation ==
 
== After creation ==
Line 69: Line 81:
 
* Contribution:MyAwesomeModule/Changelog
 
* Contribution:MyAwesomeModule/Changelog
 
* Contribution:MyAwesomeModule/Code
 
* Contribution:MyAwesomeModule/Code
 +
 +
=== Creating the changelog ===
 +
# Click the link placed on your contribution's page to create your changelog page - you'll be brought to a new page edit screen.
 +
# To create your first version header use '''<nowiki>{{CL version|1.0}}</nowiki>''', where 1.0 is your starting version number.
 +
# Add your first (or only, this is the first release after all!) item with: '''<nowiki>{{CL item|type|Description}}</nowiki>''' - 'type' should be one of the following:
 +
#* new
 +
#* fix
 +
#* change
 +
#* update
 +
 +
=== Creating the features page ===
 +
Simply follow the link provided on your contribution's page to create the features sub-page and write your list of features there. Preferably each item should be on a newline preceded by an asterisk ('''*'''), but there is no fixed format for this section.
 +
 +
== Maintaining your contribution ==
 +
 +
=== Maintaining the changelog ===
 +
With each update you make to your contribution you should add a corresponding changelog entry. The steps for adding to the changelog are largely the same as steps 2-3 above, with one minor difference. Instead of '''<nowiki>{{CL version|1.0}}</nowiki>''' you should use '''<nowiki>{{CL version|1.2|1.1}}</nowiki>''', where '1.2' represents the new version number, and 1.1 represents the previous version number.
 +
 +
=== Finding your sub pages again ===
 +
There are two methods of finding your sub-pages:
 +
# Simply add '/Features', '/Changelog' or '/Code' to the end of the URI in your browser's address bar when viewing your contribution's page.
 +
# Click the edit link for your contribution's page, scroll down to the bottom of the page and click the appropriate link under the ''Templates used in this page:'' section.
  
 
{{contribs}}
 
{{contribs}}

Latest revision as of 20:53, 14 October 2021

So, you want to release and document your WHMCS module/modification/enhancement/template on the wiki? Follow these guidelines to get up and running and thank you for sharing!

Confused about something on this page? Not sure what to do? Ask on the talk page.

Naming your page

Your new page should be named accordingly: Contribution:ModificationName

I.E. If you're the creator of 'MyAwesomeModule', head along: [[Contribution:MyAwesomeModule]]!

Page content

Once you're there place the following on your new page:

{{Contribution|
| name = MyAwesomeModule
| author = Your name / wiki username
| admin = yes
| user = yes
| theme = yes
| desc = A short summary of your project
| version = Current version number
| zip = http://mydomain/link/to/download.zip
| targz = http://mydomain/link/to/download.tar.gz
}}

This calls the contribution template with various options, meaning your new page will be automatically formatted and added to the appropriate categories.

Parameter editing and explanation

{{Contribution|
This line should be left as it is - this is the name of the template being called.


| name = MyAwesomeModule
Your module's name


| author = Your name / wiki username
Take credit for your work! If you are registered on the wiki use your username - it will then automatically link to your userpage. Contributions will be automatically added to the category Category:Contributions/Authorname (which will also be linked to on the contribution's page).


| admin = yes
| user = yes
| theme = yes
These specify the type of modification. Admin-side, user-side or a new theme/template. Remove all those that don't apply to your contribution. Your page will be automatically categorised based upon these lines.


| desc = A short summary of your project
Let people know exactly what your modification does. Don't go mad, you can add a features section later, this should just be a short intro.


| version = Current version number
1.0 is always a good starting place.


| zip = http://mydomain/link/to/download.zip
| targz = http://mydomain/link/to/download.tar.gz
Specify the URL to download your modification from as either a .tar.gz or .zip file. You may use both formats, or either (See Optional parameters below if you don't want to use downloads). If your download is neither format or you want to link to a different page, use 'link' and 'linkname' instead:
| link = http://link/to/another/site/
| linkname = Download here

Optional parameters

| nofeatures = yes
Add this if you don't want to display a list of features. ''E.G. [[User:Matt|Matt]]'s [[Contribution:Banned Emails|Banned Emails]] addon.''


| nochangelog = yes
Add this if you don't want to maintain a project changelog. ''E.G. [[User:Matt|Matt]]'s [[Contribution:Banned Emails|Banned Emails]] addon.''


| code = yes
Add this to display the necessary code changes to make to install this contribution instead of showing download links. Code changes are stored in sub-pages (see below).
Note: If you supply download links they will be squashed by this option

After creation

After you click save you'll be presented with your contribution's page. As the description option above should only be a short introduction you can create a features sub-page for listing all that your contribution has to offer which will be automatically included in the appropriate place on the module page. A second sub-page can also be used to maintain a changelog. A link to both of these sub-pages are automatically included on your contribution's page, this link will disappear to be replaced with the page's content when the page exists.

A third sub-page can be created to display code changes to make instead of linking to installation files, though this will only be automatically included if the Contribution template is called with the code parameter set to 'yes'.

The sub-page names take the form of:

  • Contribution:MyAwesomeModule/Features
  • Contribution:MyAwesomeModule/Changelog
  • Contribution:MyAwesomeModule/Code

Creating the changelog

  1. Click the link placed on your contribution's page to create your changelog page - you'll be brought to a new page edit screen.
  2. To create your first version header use {{CL version|1.0}}, where 1.0 is your starting version number.
  3. Add your first (or only, this is the first release after all!) item with: {{CL item|type|Description}} - 'type' should be one of the following:
    • new
    • fix
    • change
    • update

Creating the features page

Simply follow the link provided on your contribution's page to create the features sub-page and write your list of features there. Preferably each item should be on a newline preceded by an asterisk (*), but there is no fixed format for this section.

Maintaining your contribution

Maintaining the changelog

With each update you make to your contribution you should add a corresponding changelog entry. The steps for adding to the changelog are largely the same as steps 2-3 above, with one minor difference. Instead of {{CL version|1.0}} you should use {{CL version|1.2|1.1}}, where '1.2' represents the new version number, and 1.1 represents the previous version number.

Finding your sub pages again

There are two methods of finding your sub-pages:

  1. Simply add '/Features', '/Changelog' or '/Code' to the end of the URI in your browser's address bar when viewing your contribution's page.
  2. Click the edit link for your contribution's page, scroll down to the bottom of the page and click the appropriate link under the Templates used in this page: section.