changeDotOrg 1.0.1-beta1

changeDotOrg 1.0.1-beta1

Released Oct 25, 2013 by sepiariver

Seamlessly integrate your MODX site with Change.org's API. This snippet will retrieve and display almost any field from the Signatures, Reasons, Updates and Targets API resources.

Download 34kb (793 downloads)
Downloads: 793
License: GPLv2
Requires Revolution 2.2.x or greater
Supports mysql

Initial content. Added instructions to snippet comments.

Installation Instructions

Install via Package Manager. Get a Change.org API key here: https://www.change.org/developers/api-key

Then enter your API key and Petition URL in the respective System Settings and you're ready to call the Snippet into your content or template, like this:

[[changeDotOrg]] » returns the signature count by default, and caches for 2 hours (you can change cache expires in System Settings)

[[changeDotOrg? &from=`reasons` &offset=`2` &limit=`3`]] » returns the 3rd - 5th most recent "Reasons" posted by signers.

[[changeDotOrg? &from=`reasons` &random=`1` &tpl=`reasonTpl`]] » returns one reason object randomly selected from the API response data, output via the Chunk.

3 default chunks are included. They should be duplicated and defined in the Snippet properties to customize the output.

Find out more here: http://www.sepiariver.ca/blog/modx-web/modx-and-the-change.org-api

Initial content