PDA

View Full Version : Add-On Releases - Donations Progress Image (Wiki lookalike)


Mr Chad
01-22-2007, 10:00 PM
If you like it click
https://vborg.vbsupport.ru/external/2007/04/4.gif (https://vborg.vbsupport.ru/vborg_miscactions.php?do=installhack&threadid=137348)


Installation Time: <2 mins
Files: 2
Products: 1
VB Version: This actually works on 3.6.4 (not sure about 3.5)

Description:

THIS HACK IS AN ADDITION TO [PayPal Donations (https://vborg.vbsupport.ru/showthread.php?t=91567)]

This Hack will get your dontations stats (i.e. goal total, total donated and percentage) and write them to your Donations Image. It calls the stats from
your Database and writes them to an image called donations.jpg

This hack uses the PHP-GD Function, so be shure you have this enabled on your server. If you don?t be shure about this, ask your host or look in your PHP-Info.

Installation Instructions:

Upload donationsimage.php to your /includes/cron/ dir
Upload donations.jpg to your forum dir / (CHMOD 777 the donations.jpg)
Install the product and run the scheduled task called "Donations Image"
go to yourforum/donations.jpgExamples: http://www.beasttoast.com/forum/donations.jpg (http://beasttoast.com/forum/lndex.php) [Example of Use (http://beasttoast.com/forum/lndex.php)]
FAQ: N/A

If you like it click
https://vborg.vbsupport.ru/external/2007/04/4.gif (https://vborg.vbsupport.ru/vborg_miscactions.php?do=installhack&threadid=137348)


To add extra stats look in the signature.php for more info.

scan-pa
01-23-2007, 09:33 PM
Installed. Thank you very much, exactly what I was looking for.

Mr Chad
01-23-2007, 09:40 PM
lol no problem :D.

heres an example: http://beasttoast.com/forum/lndex.php

scan-pa
01-23-2007, 09:42 PM
Only problem is it is looking for a database table that does not exist.

Mr Chad
01-23-2007, 09:44 PM
did you install the hack its an addition to?

https://vborg.vbsupport.ru/showthread.php?t=91567

scan-pa
01-23-2007, 09:47 PM
did you install the hack its an addition to?

https://vborg.vbsupport.ru/editpost.php?do=editpost&p=1158602

your link is to edit a post. can we get a better URL please?

https://vborg.vbsupport.ru/editpost.php?do=editpost&p=1158602

Mr Chad
01-23-2007, 09:53 PM
lol my mistake...

https://vborg.vbsupport.ru/showthread.php?t=91567

scan-pa
01-23-2007, 09:56 PM
Does that donation hack work on 3.6.x? The link you posted is too a 3.5.x hack, but this hack here is listed as 3.6.x?

Mr Chad
01-23-2007, 10:05 PM
yes kirby made a mod umm i cant find his post .

scan-pa
01-23-2007, 11:22 PM
yes kirby made a mod umm i cant find his post .

Found it, and installed it.


Thanks for your help.

Mr Chad
01-23-2007, 11:32 PM
Found it, and installed it.


Thanks for your help.

could you post the link for others?

scan-pa
01-23-2007, 11:45 PM
could you post the link for others?

Page 84 onward of the topic you have the url for.

Mr Chad
01-24-2007, 12:11 AM
ok for future refrence you can download the donations 3.6.X version here:
https://vborg.vbsupport.ru/attachment.php?attachmentid=56828&d=1164680562

hugh_
01-24-2007, 05:56 AM
Has anyone tried this with vbulletin 3.5?

Mr Chad
01-24-2007, 06:14 AM
Has anyone tried this with vbulletin 3.5?
no i don't think so, but it shouldn't mess anything up. At worst it just wont make the image.

hugh_
01-24-2007, 07:57 AM
I'll try it later, thanks...

hugh_
01-24-2007, 10:07 AM
Will this work without Paypal Donations, I guess not eh?

bashy
01-24-2007, 03:15 PM
When installed does it look like the demo you showed us in the example?

bashy
01-24-2007, 03:20 PM
Ok, just installed and ran the scheduled task as per instructions and it gives error such as this...

The image “http://www.bashys-place.com/forums/admincp/cronadmin.php?do=runcron&cronid=61” cannot be displayed, because it contains errors.

Although it does work.... :)

Any advice please?

Also i would like it in UK pounds?
Ok, On my Donations page the percentage is 32% for the goal and is in UK pounds, yet this hack is in dollars, this is weird lol

is this hack a percentage of how much is collected towards the goal or is it the total amount in dollars?

Martin-TMGRS
01-24-2007, 04:41 PM
Great hack :) Could you tell me how to change the $ to ? please. do I just edit the jpg image ?

Snake
01-24-2007, 05:27 PM
Wow this is great!

bashy
01-24-2007, 05:44 PM
I too would like to know, Editing the jpg does not work...been there, tried that lol

Great hack :) Could you tell me how to change the $ to ? please. do I just edit the jpg image ?

scan-pa
01-24-2007, 06:35 PM
Thanks to Mr Chad for all of his help. I installed the hackslast night and already have had our Jan Goal met in less then 20 hours.

awsome job.

Mr Chad
01-24-2007, 06:54 PM
Ok, just installed and ran the scheduled task as per instructions and it gives error such as this...

The image “http://www.bashys-place.com/forums/admincp/cronadmin.php?do=runcron&cronid=61” cannot be displayed, because it contains errors.

Although it does work.... :)

Any advice please?

Also i would like it in UK pounds?
Ok, On my Donations page the percentage is 32% for the goal and is in UK pounds, yet this hack is in dollars, this is weird lol

is this hack a percentage of how much is collected towards the goal or is it the total amount in dollars?

ok that error is fine. also it is a percentage. amount divided by goal.



Great hack :) Could you tell me how to change the $ to ? please. do I just edit the jpg image ?
lol this is different than the signature stats image hack, this one uses 100% php to make the image.

edit the php file you uploaded. look for:
if ($p>.20){
imagestring($im, 3, 10, 0, '$' . $donations, $white);
} else {
imagestring($im, 3, 10, 0, '$' . $donations, $black);
}

imagestring($im, 3, 10, 0, '$' . $donations, $black);
just change the symbol inside of the quotes on both.



Thanks to Mr Chad for all of his help. I installed the hackslast night and already have had our Jan Goal met in less then 20 hours.

awsome job.

no problem. I also accept donations :P

Martin-TMGRS
01-24-2007, 07:19 PM
Thanks Mr Chad, works sweet thanks for your help :) I to also take donations (http://www.tmgrs.co.uk/boards/donate.php) ;) (LOL)

Mr Chad
01-24-2007, 09:42 PM
no problem.

bashy
01-25-2007, 05:15 AM
Thanks Mr Chad, Got it sorted now.... great idea! :)

Hornstar
01-25-2007, 06:27 AM
I will keep this in mind, sounds like it may help get more donations. looks good on your site.

bashy
01-25-2007, 07:45 PM
I got mine to look like the demo now, see the images ;)

code for peeps if needed...obviously you will need to change the urls to your own...

<center>
<table>
<td class="alt2" colspan="7" align="center">
<p align="center"><strong>This is the amount you have kindly donated this month<br><a href="http://bashys-place.com/forums/donate.php"><img src="http://bashys-place.com/forums/donations.jpg" border="0"></a><br>
Can you help us to keep the site running?
<a href="#top" onclick="return toggle_collapse('donations')">
[moreinfo]</a></strong></td>
</tr>
</tbody>
<tbody id="collapseobj_donations" style="display: none;">

<tr>
<td class="alt2" colspan="7" align="center">
<p align="center">You can donate [<a target="_blank" href="http://bashys-place.com/forums/donate.php">Here</a>]
and also view who has donated so far.<br>
<br>
<b>What do you get when donating other than good karma?</b></p>
<p align="left"><font color="#808000">You get a Donate image symbol next to your avatar</font><br>
<font color="#FF6600">If you donate
?20 or more you can have 1 years free web hosting</font><br>
<font color="#808000">Your help will go towards the upkeep and running of the forum, thank you!</font>.</p></td>
</table>
</center>

Mr Chad
01-25-2007, 08:32 PM
lol you just copied mine...

bashy
01-25-2007, 08:38 PM
i resent the implication /me runs and hides

Actually i looked at ya source code and changed to suit me :)
it bugged me for ages as to how yours revealed the More Info until
i saw ya code and realized it was as simple as collapse, it looks kinda
ajaxy lol, great hack though...well done, although it aint improved my
donations, perhaps my members arnt as well off as some lol

Notice the ? sign, yeah me neither, dont know why its looking like that lol

dutchbb
01-25-2007, 10:44 PM
Its great but why did you make it for a 3.5 donations hack? Can it be done for one of the newer ones?

Mr Chad
01-25-2007, 10:58 PM
because its one of the best... also you can get a 3.6.X version here:
https://vborg.vbsupport.ru/attachment.php?attachmentid=56828&d=1164680562

dutchbb
01-25-2007, 11:04 PM
I used it before and having troubles with the installer I stopped using it but I'll give the 3.6 a try then, thank you.

Mr Chad
01-25-2007, 11:51 PM
im running it on 3.6.3

Ricsca
01-26-2007, 12:52 AM
The meter of the offers does not work me...


http://www.tartaportal.it/forums/donate.php

Mr Chad
01-26-2007, 01:11 AM
did you attach the donate button to a goal?

Ricsca
01-26-2007, 08:03 AM
I did alone donations of test with the button "Add A New Donor"

Ahsin1
01-30-2007, 01:41 AM
Hey,

First of all thanks for such a nice hack but the problem is on my site i have 2 active goals when ever active 2nd one this hack dosent work picture shows 0$.

Please advice me some thing
Ahsin

Mr Chad
01-30-2007, 02:45 AM
can you export your donation_goals table and post it here

scan-pa
01-30-2007, 02:20 PM
Can anyone help do a vbA module for these 2 hacks? Or point me to the instructions.

TIA

scan-pa
01-30-2007, 04:37 PM
Can anyone help do a vbA module for these 2 hacks? Or point me to the instructions.

TIA

Never mind. I found it with a little more looking.

for anyone who wants to add the donation module to there vBadv portal, here is the link.

http://www.vbadvanced.com/forum/showthread.php?t=13222&highlight=donation+module


Works fine on vB 3.6.4

masons
01-30-2007, 05:38 PM
Hello everyone, it WORKS! great
http://www.novusordosaeculorum.com/index.php

But a question,

On the left site, under statistics, I like to add a small list with the latest donations, and I have no idea how to hack that! Can someone tell me or post the cut and paste and locations?

Thanks you?

masons
01-30-2007, 05:42 PM
Also, it says 53 dollars in donations, and I really dont have any! how can i fix this?

scan-pa
01-30-2007, 10:20 PM
Also, it says 53 dollars in donations, and I really dont have any! how can i fix this?

I noticd that my donation page says:

We have collected a total of $85.59 since Jan. 15, 2007

However the amount should say $110.00

everything else is working. I looked in the db to find the $85.59 but could not find it stored anywhere.

anyone know where this info is contained in the db?

Ahsin1
01-30-2007, 10:46 PM
can you export your donation_goals table and post it here

I dont knw how export them lol


Is tht wht u talking abut

<td colspan="2" class="alt1">$title - <if condition="$vboptions['base_currency'] == 'USD' OR $vboptions['base_currency'] == 'AUD' OR $vboptions['base_currency'] == 'CAD'">$<else /><if condition="$vboptions['base_currency'] == 'EUR'">?<else /><if condition="$vboptions['base_currency'] == 'GBP'">?<else /><if condition="$vboptions['base_currency'] == 'JPY'">?</if></if></if></if>$amount</td>
</tr>
<tr>
<td class="alt2" width="50%">$description</td>
<td class="alt2">
$vbphrase[we_have_collected] <if condition="$vboptions['base_currency'] == 'USD' OR $vboptions['base_currency'] == 'AUD' OR $vboptions['base_currency'] == 'CAD'">$<else /><if condition="$vboptions['base_currency'] == 'EUR'">?<else /><if condition="$vboptions['base_currency'] == 'GBP'">?<else /><if condition="$vboptions['base_currency'] == 'JPY'">?</if></if></if></if>$total_donated $vbphrase[in_donations_towards_our_goal_of] <if condition="$vboptions['base_currency'] == 'USD' OR $vboptions['base_currency'] == 'AUD' OR $vboptions['base_currency'] == 'CAD'">$<else /><if condition="$vboptions['base_currency'] == 'EUR'">?<else /><if condition="$vboptions['base_currency'] == 'GBP'">?<else /><if condition="$vboptions['base_currency'] == 'JPY'">?</if></if></if></if>$amount
<br />
<br />
<img src="$vboptions[bburl]/includes/pp_image.php?fill=$vboptions[bar_fill_color]&border=$vboptions[bar_border_color]&background=$vboptions[bar_background_color]&percentage=$percentage&width=200&height=9">
<br />
$vbphrase[we_have_collected] $percentage%
<br />
$vbphrase[thank_you]!
</td>
</tr>
$end

Mr Chad
01-30-2007, 11:01 PM
I dont knw how export them lol


Is tht wht u talking abut

<td colspan="2" class="alt1">$title - <if condition="$vboptions['base_currency'] == 'USD' OR $vboptions['base_currency'] == 'AUD' OR $vboptions['base_currency'] == 'CAD'">$<else /><if condition="$vboptions['base_currency'] == 'EUR'">?<else /><if condition="$vboptions['base_currency'] == 'GBP'">?<else /><if condition="$vboptions['base_currency'] == 'JPY'">?</if></if></if></if>$amount</td>
</tr>
<tr>
<td class="alt2" width="50%">$description</td>
<td class="alt2">
$vbphrase[we_have_collected] <if condition="$vboptions['base_currency'] == 'USD' OR $vboptions['base_currency'] == 'AUD' OR $vboptions['base_currency'] == 'CAD'">$<else /><if condition="$vboptions['base_currency'] == 'EUR'">?<else /><if condition="$vboptions['base_currency'] == 'GBP'">?<else /><if condition="$vboptions['base_currency'] == 'JPY'">?</if></if></if></if>$total_donated $vbphrase[in_donations_towards_our_goal_of] <if condition="$vboptions['base_currency'] == 'USD' OR $vboptions['base_currency'] == 'AUD' OR $vboptions['base_currency'] == 'CAD'">$<else /><if condition="$vboptions['base_currency'] == 'EUR'">?<else /><if condition="$vboptions['base_currency'] == 'GBP'">?<else /><if condition="$vboptions['base_currency'] == 'JPY'">?</if></if></if></if>$amount
<br />
<br />
<img src="$vboptions[bburl]/includes/pp_image.php?fill=$vboptions[bar_fill_color]&border=$vboptions[bar_border_color]&background=$vboptions[bar_background_color]&percentage=$percentage&width=200&height=9">
<br />
$vbphrase[we_have_collected] $percentage%
<br />
$vbphrase[thank_you]!
</td>
</tr>
$end
no lol. im talking about the values in your mysql database.

Ahsin1
01-31-2007, 01:19 AM
got it check attachment

Mr Chad
01-31-2007, 02:22 AM
ok in the php file find:
$query_goals = $vbulletin->db->query("SELECT * FROM ".TABLE_PREFIX."donation_goals WHERE active = '1' ORDER BY title ASC LIMIT 0,2");

and try changing the end ASC LIMIT 0,2");

try these 5 combos

0,0
0,1
1,1
1,2
2,2

Ahsin1
01-31-2007, 03:33 AM
I tried all of them dosent work

0,1 seems to work buh its only showing 1 goals ammount

Mr Chad
01-31-2007, 03:56 AM
you want both?

Ahsin1
01-31-2007, 03:59 AM
yeh i want both

Mr Chad
01-31-2007, 04:29 AM
find:
$query_goals = $vbulletin->db->query("SELECT * FROM ".TABLE_PREFIX."donation_goals WHERE active = '1' ORDER BY title ASC LIMIT 0,2");
while ($row = $vbulletin->db->fetch_array($query_goals)){
$amount = $row['amount'];
$amount_formatted = number_format($row['amount'], 2, '.', ',');
$goal_total = $row['total_donated'];
$goal_total_formatted = number_format($row['total_donated'], 2, '.', ',');
if ($row['amount'] > 0){
$percentage = round(($goal_total/$amount)*100, 2);
} else {
$percentage = '0';
}
}
replace with:
$amount = 0;
$goal_total = 0;
$query_goals = $vbulletin->db->query("SELECT * FROM ".TABLE_PREFIX."donation_goals WHERE active = '1' ORDER BY title ASC LIMIT 0,2");
while ($row = $vbulletin->db->fetch_array($query_goals)){
$amount = $amount + $row['amount'];
$amount_formatted = number_format($row['amount'], 2, '.', ',');
$goal_total = $goal_total + $row['total_donated'];
$goal_total_formatted = number_format($row['total_donated'], 2, '.', ',');
if ($row['amount'] > 0){
$percentage = round(($goal_total/$amount)*100, 2);
} else {
$percentage = '0';
}
}

i have not tested this so please respond with results.

Ahsin1
01-31-2007, 04:43 AM
Working Perfect Thanks a lot for ur help :)

Mr Chad
01-31-2007, 04:55 AM
Working Perfect Thanks a lot for ur help :)
glad to hear :D

masons
01-31-2007, 05:22 AM
can I pay someone to fix mine up a little bit? I dont know how to make it appear on the left site column instead of at the top without it messing up the column width.

Also why is it showing $53 when it should be $20?

Mr Chad
01-31-2007, 05:59 AM
can I pay someone to fix mine up a little bit? I dont know how to make it appear on the left site column instead of at the top without it messing up the column width.

Also why is it showing $53 when it should be $20?
can you export your donation_goals table and post it here (from your database).

masons
01-31-2007, 06:33 AM
Hi, Here it is!

-- phpMyAdmin SQL Dump
-- version 2.9.0.3
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Jan 31, 2007 at 01:32 AM
-- Server version: 5.0.24
-- PHP Version: 4.4.4
--
-- Database: `peter_mason`
--

-- --------------------------------------------------------

--
-- Table structure for table `donation_goals`
--

CREATE TABLE `donation_goals` (
`id` int(255) NOT NULL auto_increment,
`title` varchar(255) NOT NULL default '',
`description` text NOT NULL,
`amount` decimal(10,2) NOT NULL default '0.00',
`total_donated` decimal(10,2) NOT NULL default '0.00',
`active` tinyint(1) NOT NULL default '1',
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=3 ;

--
-- Dumping data for table `donation_goals`
--

INSERT INTO `donation_goals` (`id`, `title`, `description`, `amount`, `total_donated`, `active`) VALUES
(2, 'Running of servers', 'We like to think of this site as a community, as such we hope we can all share in the cost of running this.', '200.00', '0.00', 1);


Also, I really dont know how to make the information look better and placed in the left column, any advise is welcome!

Mr Chad
01-31-2007, 02:10 PM
hmm did you CHMOD the image 777 ? because there seems to be no donations so there is no reason for it to say any amount of money. also connect the donation buttons to your goal or it will not be recorded. I'm not sure what you mean abt your left column.

frandy
02-01-2007, 09:38 PM
Is it possible to change the color/style of the image? Like have a gradient in the background? change the positioning of the text etc?

Mr Chad
02-01-2007, 11:19 PM
Is it possible to change the color/style of the image? Like have a gradient in the background? change the positioning of the text etc?
yes, read the php source...

frandy
02-02-2007, 08:31 PM
heh, you dont happen to have a list of the colors do you? cuz I dont understand all that 0x33 stuff

Mr Chad
02-02-2007, 08:47 PM
well 0x33 is in HEX like 0x33,0x33,0x33 is the same as HEX #333333 or you can just use RGB and put the number values like 255,255,255

frandy
02-02-2007, 08:51 PM
Nice, nice thanks and also speedy response!

Mr Chad
02-02-2007, 10:11 PM
no problem.

GNDI
02-15-2007, 04:37 PM
When I run the shedule I'll get this error

Donations Image

Warning: Cannot modify header information - headers already sent by (output started at /includes/adminfunctions.php:283) in /includes/cron/donationsimage.php on line 28

Done

But I don't see the connections here

// print out the page header
echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">' . "\r\n";
echo "<html dir=\"$stylevar[textdirection]\" lang=\"$stylevar[languagecode]\"$htmlattributes>\r\n";
echo "<head>
<title>$titlestring</title>
<meta http-equiv=\"Content-Type\" content=\"text/html; charset=$stylevar[charset]\" />
<link rel=\"stylesheet\" type=\"text/css\" href=\"../cpstyles/" . $vbulletin->options['cpstylefolder'] . "/controlpanel.css\" />" . iif($headinsert != '', "
$headinsert") . "
<script type=\"text/javascript\">
<!--
var SESSIONHASH = \"" . $vbulletin->session->vars['sessionhash'] . "\";
function set_cp_title()

Mr Chad
02-16-2007, 01:36 AM
what the hells all that?

did it make an image?

T_Richardson
02-17-2007, 09:47 PM
I would like to have this bar for my website.

I see that you need the donation mod before installing this one. So, I downloaded the "donations.zip" you specified in this thread, and it seems to be missing the install files.

Attached is what I have. And I'm installing it on vB 3.6.4

Quantnet
03-09-2007, 08:04 AM
very nice.

So bad I have a different paypal donation mod which this image does not work with.

Would you be able to make this image read from some manually input amount and goal ?
Say I enter the amount and goal somewhere and have the code read from it and write to the image ?

thanks

blastup
04-06-2007, 09:24 PM
hey can you help me.. idk why.. my donations don't work.. http://indexspot.com/donate.php

blastup
04-06-2007, 09:25 PM
i added the donations. but.. it does not show..

blastup
04-06-2007, 09:26 PM
and when i tried to run the schedule task wiki image.. it does not work.. The image “http://www.indexspot.com/admincp/cronadmin.php?do=runcron&cronid=43” cannot be displayed, because it contains errors.