Hey guys & girls,
not sure if many people would like this addon / tweak but I thought why not share it with you as I just wanted to be nice today and share it with you.
ok I ripped the code out donations.php
Code:
$progress='';
$totalfunds_cache = $mc1->get_value('totalfunds_');
if ($totalfunds_cache === false) {
$totalfunds_cache = mysql_fetch_assoc(sql_query("SELECT sum(cash) as total_funds FROM funds"))/* or sqlerr(__FILE__, __LINE__)*/;
$totalfunds_cache["total_funds"] = (int)$totalfunds_cache["total_funds"];
$mc1->cache_value('totalfunds_', $totalfunds_cache, $INSTALLER09['expires']['total_funds']);
}
$funds_so_far = (int)$totalfunds_cache["total_funds"];
$totalneeded = 1000; //=== set this to your monthly wanted amount
$funds_difference = $totalneeded - $funds_so_far;
$Progress_so_far = number_format($funds_so_far / $totalneeded * 100, 1);
if($Progress_so_far >= 100)
$Progress_so_far = 100;
then added it above the first $htmlout variable
Code:
$htmlout = $doctype."<head>
Then I ripped the rest out that I needed from donations.php
Code:
<table align='center' width='140' style='height: 20%;' border='2'><tr>
<td bgcolor='transparent' align='center' valign='middle' width='$Progress_so_far%'>$Progress_so_far%</td><td bgcolor='grey' align='center' valign='middle'></td></tr></table>
then I added it after the <body>:
Code:
<div style='margin-left: 1023px;'>
<table width='140' style='height: 20%;' border='2'><tr>
<td bgcolor='transparent' align='center' valign='middle' width='$Progress_so_far%'><br /></td><td bgcolor='grey' align='center' valign='middle'></td></tr>
</table></div><div style='margin-left: 1040px;color: #FFFFFF;'>
<strong>Donation Goal: $Progress_so_far%</strong>
</div>
Then appears like this :
OR
Code:
<div style='margin-left: 1023px;'>
<table width='140' style='height: 20%;' border='2'><tr>
<td bgcolor='#F70D1A' align='center' valign='middle' width='$Progress_so_far%'><br /></td><td bgcolor='#121212' align='center' valign='middle'></td></tr>
</table></div><div style='margin-left: 1040px;color: #FFFFFF;'>
<strong>Donation Goal: $Progress_so_far%</strong>
</div>
I hope you like it I know you could just use the default u-232 donation script but I have seen/herd to many ask about making like the way I done it so meh upto you to test and use and edit to your appeal. Good Luck!