Has anyone figured out a way to make a "goal thermometer" that will interface with this?
vagrant - January 9, 2009 - 16:25
| Project: | Donation |
| Version: | 6.x-1.x-dev |
| Component: | Miscellaneous |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed |
Description
Has anyone figured out a way to make a "goal thermometer" that will interface with this?
It would be a cool feature to graphically show the donations on a meter of some kind.
Thanks for any input

#1
Hello,
I used donations thermometer (http://drupal.org/project/donations_thermometer) and modified the donations module to set the donations_thermometer_amount everytime a donation was updated/inserted using:
variable_set('donations_thermometer_amount', donation_total());and added a function to get the total of the donations.
function donation_total() {$sql = 'SELECT SUM(d.Amount) FROM {donations} d WHERE d.status=1';
$result = db_result(db_query($sql));
$result = check_plain(sprintf('%.2f',$result));
return $result;
}
I don't know enough about Drupal development to officially do this as a patch etc.
Thanks
Mark
#2
Can you please submit your changes as a patch, and make it configurable?
This would be useful to others.
We also need to document it.
#3
I really don't know enough about Drupal coding yet to be able to supply a patch but will do some reading on it and see if I can figure it out.
#4
Start reading here http://drupal.org/patch
It may be overwhelming at first, but give it a shot.
#5
Okay this is the first patch I've ever created, so apologies if I've not done it correctly.
#6
#7
Committed.
Thanks.
#8
Automatically closed -- issue fixed for 2 weeks with no activity.