|
#1
|
|||
|
|||
Donation Bar [Tweaked]
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; Code:
$htmlout = $doctype."<head> 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> 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> 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> |
The Following User Says Thank You to BamBam0077 For This Useful Post: | ||
nicukent (30th January 2015)
|
#2
|
|||
|
|||
round edges are the bomb dot com :D
no more square.. :D and also some css3. we are in 2015, not '97 this is the only things it's missing :D and $totalneeded = 1000; can easily be adapted to $VARIABLE['needfunds'] = xyz; in config.php :) everyone can tweak it as they like.
__________________
Need HELP!? I can install:
|
The Following User Says Thank You to DND For This Useful Post: | ||
nicukent (30th January 2015)
|
#3
|
|||
|
|||
Quote:
|
The Following User Says Thank You to BamBam0077 For This Useful Post: | ||
nicukent (30th January 2015)
|
#4
|
|||
|
|||
no no, it's good, just saying a few options.. maybe someone will actually use it like in my vision :P
__________________
Need HELP!? I can install:
|
The Following 2 Users Say Thank You to DND For This Useful Post: | ||
BamBam0077 (29th January 2015),
nicukent (30th January 2015)
|
#5
|
|||
|
|||
oh, sorry bro misunderstood.
Bump: Safe from SQL injection Bump: Non Memcache PHP Code:
|
The Following User Says Thank You to BamBam0077 For This Useful Post: | ||
nicukent (30th January 2015)
|
Tags |
bar , donation , tweaked |
|
|