cssfreakie Posted March 10, 2011 Share Posted March 10, 2011 Hi all, I sometimes see on a website, a little meter that says, we raised 1 million and our goal is 1 billion (or anything lower than that i was wondering on how someone would achieve that (besides the probably GD library), is that done real time? or does someone need to adjust it on a daily bases depending on the donations. If it is done real time, may I assume that it would be pretty risky to connect to the account to fetch results right? Hmm if anyone knows an idea i would love to know. I never worked with pay-pal, and i am playing around with it in case i might need to work with it. Quote Link to comment Share on other sites More sharing options...
Philip Posted March 10, 2011 Share Posted March 10, 2011 A couple of ways it could be done: Like you said, manual updating... although tedious When a donation is made it adds to a running total in a database, flat file, etc. When a donation is made, a full new row is made in the database - from there you can see more stats (who made the largest donation, average donation amount, etc) Also, you can do this via CSS with a little bit of trickery instead of doing GD Quote Link to comment Share on other sites More sharing options...
cssfreakie Posted March 10, 2011 Author Share Posted March 10, 2011 Thanks Philip! May I assume the script that is updating that would be run on a external (non paypal) redirect script or something after the payment was successful? that css thing would require some javascript i bet or some inline style imported from a database, to set the width or height of an element. Thanks for the input! Quote Link to comment Share on other sites More sharing options...
Philip Posted March 10, 2011 Share Posted March 10, 2011 After the payment was successful. For example, with Paypal you should use IPN to grab the payment info (or parse via email, etc.) No JS required, the CSS would either have an inline styling with lets say width % or a class that is set for width %. Example for being 55% to your goal: <div id="donation_bar"><div class="progress" style="width:55%;"> </div></div> <div id="donation_bar"><div class="progress 55"> </div></div> Of course this is a very basic example, but you catch my drift Quote Link to comment Share on other sites More sharing options...
cssfreakie Posted March 10, 2011 Author Share Posted March 10, 2011 Cool! The css I get The IPN i should have a look in never worked with digital money Thanks m8 i consider this one solved ! cssfreakie Quote Link to comment Share on other sites More sharing options...
ohdang888 Posted March 10, 2011 Share Posted March 10, 2011 May I assume the script that is updating that would be run on a external (non paypal) redirect script or something after the payment was successful? this is done at check out though paypal's IPN, they'll notify you at a dedicated page to let you know a purchase has occured, how much, by who, etc. https://www.paypal.com/ipn Though people will tell you its relatively simple process, you need to have a strong php/mysql experience to really get it going. Quote Link to comment Share on other sites More sharing options...
cssfreakie Posted March 10, 2011 Author Share Posted March 10, 2011 Thanks ohdang888, Ill have a look in to that, cheers! css freakie Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.