zem_dropcash documentation

Dropcash donation campaign plugin (0.3)

zem_dropcash displays the progress of a Dropcash campaign.

Simple usage is like this:

<txp:zem_dropcash url="http://www.dropcash.com/campaign/example/my_campaign/" />

Available attributes are:

  • url – Dropcash campaign URL, e.g. “http://www.dropcash.com/campaign/example/my_campaign/”. Make sure it includes the leading “http://” and trailing slash.
  • refresh – Maximum cache age in seconds. Default is 900.

“url” is the only required attribute. The tag will use a default layout for the text and graph if <txp:zem_dropcash /> is used as a self-closing tag.

Alternatively, you can style your own layout like this:


<txp:zem_dropcash url="http://www.dropcash.com/campaign/example/my_campaign/">
<b><txp:zem_dropcash_title /></b>
<txp:zem_dropcash_graph color="#f00" />
$<txp:zem_dropcash_collected /> of $<txp:zem_dropcash_goal /><br />
<txp:zem_dropcash_link text="donate now" />
</txp:zem_dropcash>

Tags available within <txp:zem_dropcash></txp:zem_dropcash> are:

<txp:zem_dropcash_title />
The campaign title. No attributes.

<txp:zem_dropcash_graph />
The graph. Attributes:

  • color – Graph bar color. Default is ”#f00”
  • backgroundcolor – Graph background color. Default is ”#fff”
  • width – Graph width, in pixels. Default is ‘100’.
  • border – Border style. Default is ‘1px solid #000’
  • padding – Padding. Default is ‘2px’

<txp:zem_dropcash_collected />
Amount collected sofar. No attributes.

<txp:zem_dropcash_goal />
Goal amount. No attributes.

<txp:zem_dropcash_percentage />
Percentage collected sofar. No attributes.

<txp:zem_dropcash_link />
Donation link. Attributes:

  • text – Link text. Default is “donate now”
  • goal – Link text to be displayed after the target has been reached. Default is “Goal has been reached!”

<txp:zem_dropcash_if url="http://www.dropcash.com/campaign/example/my_campaign/">content</txp:zem_dropcash_if>
Displays the enclosed content if and only if donations have reached a percentage range. Content may include Textpattern tags. The tag may be used inside a <txp:zem_dropcash> enclosure, or elsewhere by specifying the campaign url. Attributes:

  • url – campaign URL. Required, unless used inside <txp:zem_dropcash> </txp:zem_dropcash> tags.
  • min – Target percentage minimum. Optional, default is “100”.
  • max – Target percentage maximum. Optional, default is “100”.

Examples of the min and max attributes:


<txp:zem_dropcash_if url="http://www.dropcash.com/campaign/example/my_campaign/" min=50 max=94>Half way!</txp:zem_dropcash_if>
<txp:zem_dropcash_if url="http://www.dropcash.com/campaign/example/my_campaign/" min=95 max=99>Almost there!</txp:zem_dropcash_if>
<txp:zem_dropcash_if url="http://www.dropcash.com/campaign/example/my_campaign/">We made it!</txp:zem_dropcash_if>


Commenting is closed for this article.