Bravo List
Register
Go Back   > Bravo List > Source Code > Archived Trackers > Project U-232
Reply
  #1  
Old 29th January 2015, 16:31
BamBam0077 BamBam0077 is offline
Banned
 
Join Date: Jul 2013
P2P
Posts: 410
Default 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;
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 :

Click the image to open in full size.


OR

Click the image to open in full size.

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!
Reply With Quote
The Following User Says Thank You to BamBam0077 For This Useful Post:
nicukent (30th January 2015)
  #2  
Old 29th January 2015, 16:40
DND DND is online now
VIP
 
Join Date: Dec 2008
Posts: 1,241
Default
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:

  1. Server/VPS (Debian,CentOS,Ubuntu,Fedora, FreeBSD) Optimization and ... + Modules
  2. Webserver Windows/Linux (Apache/Lighttpd/Nginx/Mysql/PhpMyAdmin/SSL) Optimization and ... + Modules
  3. Seedbox Windows/Linux (uTorrent,rTorrent,libTorrent,ruTorrent) + Modules
  4. Multiple source code engines
  5. Linux Server Administration (security, cryptography/encryption, proxy, load balancer, custom ddos firewall)
Reply With Quote
The Following User Says Thank You to DND For This Useful Post:
nicukent (30th January 2015)
  #3  
Old 29th January 2015, 16:41
BamBam0077 BamBam0077 is offline
Banned
 
Join Date: Jul 2013
P2P
Posts: 410
Default
Quote:
meh upto you to test and use and edit to your appeal. Good Luck!
Reply With Quote
The Following User Says Thank You to BamBam0077 For This Useful Post:
nicukent (30th January 2015)
  #4  
Old 29th January 2015, 16:43
DND DND is online now
VIP
 
Join Date: Dec 2008
Posts: 1,241
Default
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:

  1. Server/VPS (Debian,CentOS,Ubuntu,Fedora, FreeBSD) Optimization and ... + Modules
  2. Webserver Windows/Linux (Apache/Lighttpd/Nginx/Mysql/PhpMyAdmin/SSL) Optimization and ... + Modules
  3. Seedbox Windows/Linux (uTorrent,rTorrent,libTorrent,ruTorrent) + Modules
  4. Multiple source code engines
  5. Linux Server Administration (security, cryptography/encryption, proxy, load balancer, custom ddos firewall)
Reply With Quote
The Following 2 Users Say Thank You to DND For This Useful Post:
BamBam0077 (29th January 2015), nicukent (30th January 2015)
  #5  
Old 29th January 2015, 16:45
BamBam0077 BamBam0077 is offline
Banned
 
Join Date: Jul 2013
P2P
Posts: 410
Default
oh, sorry bro misunderstood.

Bump: Safe from SQL injection

Bump: Non Memcache
PHP Code:
    $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 1001);
    if(
$Progress_so_far >= 100)
    
$Progress_so_far 100;
then 
Reply With Quote
The Following User Says Thank You to BamBam0077 For This Useful Post:
nicukent (30th January 2015)
Reply

Tags
bar , donation , tweaked

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



All times are GMT +2. The time now is 19:25. vBulletin skin by ForumMonkeys. Powered by vBulletin® Version 3.8.11 Beta 3
Copyright ©2000 - 2024, vBulletin Solutions Inc.