MyBB Codes
Easy donation bar - Printable Version

+- MyBB Codes (http://www.mybbcodes.com)
+-- Forum: Mods Database (/forumdisplay.php?fid=4)
+--- Forum: Requests (/forumdisplay.php?fid=16)
+--- Thread: Easy donation bar (/showthread.php?tid=1058)


Easy donation bar - atomjani - 05-04-2010 11:47 AM

When we're healthy, then you can, please. A lot of my request will not be.
A very simple bar would be the case, which would be in the header. I would like to specify how much money would be needed and how it is. The currency is not $, but it would be Ft.
A short text on its own would be above or below the bar. The display would be like this:
[Image: donation_drive_progress.png]
I do not want to use PayPal, the values I want to give. But if you want, then you will do it for the rest of the paypal version as well. Or a combination of both.


RE: Easy donation bar - exdiogene - 05-04-2010 01:04 PM

This could be an easy plugin to do, but it depends on how you will feed the plugin with the new values?

You would need a way to update the actual value somehow, if you have a PayPal API system then it could be modified to update the bar settings directly. Otherwise you could adjust the settings yourself manually in the AdminCP settings section...


RE: Easy donation bar - exdiogene - 05-04-2010 01:06 PM

P.S. It would be even easier if you do not need the round corners of the light grey bar, this way you could adjust the colors of each elements and be compatible to all kind of browsers.


RE: Easy donation bar - atomjani - 05-04-2010 01:44 PM

I like add all value in Admin Panel. De seperate is not ",", we like " " seperate in number. Example 1 800 Ft.
The picture is ok. I needn't round corners.


RE: Easy donation bar - exdiogene - 05-04-2010 02:00 PM

I could put this bar under the logo, to the right of the logo, under the header or under the footer by just adding this item to an already existing plugin named "Header/footer manager" that i did not published already.

Maximum and actual values of the bar would be text settings that you could put whatever you want in it...

I will keep this in my ToDo list also...


RE: Easy donation bar - Chainzs - 10-31-2012 10:00 AM

hey Rej ! Its been a while UHH)
Have you ever released that plugin ?

I am looking for a donation bar like that but I would like mine to have a setting that would allow me to put the bar in a certain post itself. We are trying to raise money for one of our member and we don't want him to know about it so a donation bar on the index page wouldn't be useful for us.

It doesn't need to be integrated with paypal at all, I could add the numbers to the bar myself.

thanks


RE: Easy donation bar - exdiogene - 10-31-2012 07:38 PM

This could also be easily achieved with a simple MyCode like this :
PHP Code:[Highlight]
\[bar=(.*?)\]([0-9]+)(.*?)\[/bar\] 

PHP Code:[Highlight]
<div style="background-color:#ff0000;border:1px #ff0000 solid;width:$1"><div style="background-color:#00ff00; width:$2$3; text-align:center;">$2</div></div

With something like this "[bar=200px]40%[/bar]" you will see a bar of 200 pixels wide and 40% of it filled.

<div style="background-color:#ff0000;border:1px #ff0000 solid;width:200px"><div style="background-color:#00ff00; width:40%; text-align:center;">40</div></div>

With something like this "[bar=50%]160px[/bar]" you will see a bar 50% wide and 160 pixels of it filled.

<div style="background-color:#ff0000;border:1px #ff0000 solid;width:50%"><div style="background-color:#00ff00; width:160px; text-align:center;">160</div></div>

So for donation you would use someting like "[bar=500px]160px[/bar]" to indicate an actual 160$ over the 500$ expected :

Actual donation for the 500$
<div style="background-color:#ff0000;border:1px #ff0000 solid;width:500px"><div style="background-color:#00ff00; width:160px; text-align:center;">160</div></div>