Extension:ContributionTracking
|
ContributionTracking Release status: unknown |
|||
|---|---|---|---|
| Implementation | Special page | ||
| Description | Contribution tracking for the Wikimedia fundraiser | ||
| Author(s) | David Strauss, Katie Horn (Khorn (WMF)Talk) | ||
| Last version | SVN | ||
| License | No license specified | ||
| Download |
Download snapshot (Git master)
Git [?]: repo summary • tree • code changes SVN [?]: checkout-url • tree • code changes |
||
|
|||
|
Check usage (experimental) |
|||
ContributionTracking provides contribution tracking for the Wikimedia fundraiser.
It includes two unlisted special pages: Special:ContributionTracking and Special:ContributionTrackingTester (sysop only).
It supports two payment gateways, w:PayPal and w:Moneybookers (largely deprecated).
[edit] API
The purpose of the ContributionTracking API is to remove the interstitial page between the user-facing donate button, and the remote gateway. Instead of posting the whole transaction to a page, the form data is sent to the API via ajax. The API records the tracking data, and returns a json object that can be used to build a hidden form, and immediately repost that hidden form to the remote gateway.
For a working end-to-end demonstration of this technique, see Special:ContributionTrackingTester. The available form fields are pulled dynamically from the API's AllowedParams, so it will always show all available field options. (Note: Any additional fields posted to the API will be summarily ignored)
As on the ContributionTrackingTester page, all that is necessary to use the API to remove the interstitial page between a gateway form and the remote gateway, are the two following changes: To add the jquery.contributionTracking module which handles the ajax and hidden repost form, add the following line to the php form's execute method:
$wgOut->addModules( 'jquery.contributionTracking' );
Then, add the class "ajax_me" to the relevant form's submit button. Once that is done, the button's parent form will be under the control of the included jquery.contributionTracking module.
[edit] See also
|
|
This extension is being used on one or more of Wikimedia's wikis. This means that the extension is stable and works well enough to be used by such high traffic websites. A full list of the extensions installed on a particular wiki can be seen on the wiki's Special:Version page. |