=== Plugin Name ===
Contributors: Michael Lapkin
Tags: progress bar, fundraiser
Requires at least: 4.7
Tested up to: 4.7
Stable tag: 1.0
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html

Bandaid is shortcode plugin "progress bar" to display current progress toward a fundraising goal.

== Description ==

Bandaid is a implemented using the shortcode: `[bandaid]`. 
Bandaid displays the goal, total amount collected, and the number of contributions, and can display static data (entered manually), or active data (retrieved from a database table).

== Configuration ==

- STATIC -
The following attributes are required to run Bandaid in static mode:
* "goal" : the unformatted amount of the fundraiser goal (i.e. for $40,000, just enter 40000)
* "current" : the unformatted current amount (i.e. for $40,000, just enter 40000)
Example: 
`[bandaid goal="4000" current="2000" ]`

- ACTIVE - 
The following attributes are required to run Bandaid in active mode:
* "goal" : the unformatted amount of the fundraiser goal (i.e. for $40,000, just enter 40000)
* "table" : the name of the table which stores fundraising donations
* "column" : the column name containing the amount of each donation
Example: 
`[bandaid goal="24000" table ="Donations" column="Amount" ]`

- OPTIONAL -
The folllowing attributes are optional:

* title_text: Display a title
`title_text="2020-21 Fundraiser"`

* goal_text: Display custom text with goal amount.  Goal amount will be appended to this string, or will replace "%d" token in string)
`goal_text="Help us get to %d!"`

* show_count: Display number of donations. Set to "true"
`show_count="true"

* count_text: Display custom text with current count of donations and/or amount  Tokens in string will be replaced by values. "%c" = count; "%d" = current total.
`count_text="We've received %c donations, for a total of %d!"`

* current_offset: adjust the total value returned from db.  Enter unformated dollar value.  
`current_offset="4500"`

* count_offset: adjust the total number of donations returned from db.  Enter unformated value.  
`count_offset="23"`

* colors: specify color scheme.  Value is a list of HEX/RGB CSS color values, separated by "|".  
Six values must be defined: [title, goal, bar1, bar2, current total, count]
`colors="rgb(40,40,40)|rgb(20, 108, 195)|rgb(20, 108, 195)|rgb(119, 195, 236)|rgb(20, 108, 195)|rgb(40,40,40)"`

DEFAULT: colors="rgb(40,40,40)|rgb(20, 108, 195)|rgb(20, 108, 195)|rgb(119, 195, 236)|rgb(20, 108, 195)|rgb(40,40,40)"
RED: colors="rgb(40,40,40)|rgb(241, 58, 58)|rgb(255, 50, 50)|rgb(250, 50, 50,.2)|rgb(110, 107, 107)|rgb(110, 107, 107)"


Visit [demo page](http://michael.lapkin.net/fundraiser "Bandaid Demo") page for sample usage


Note:  Multiple bandaids may be independently configured on each page.

== Installation ==

1. Uncompress `band-aid.zip` to the `/wp-content/plugins/` directory
2. Activate the plugin through the 'Plugins' menu in WordPress
3. Place `[bandaid]` shortcode in your posts & specify required attributes
