Login
Username: Password:
Remember me

[Sign Up] / [Recover Password]

Theme / Language

Popular
New Torrents
new name
Size: 18.40 MB
Most active
new name
S: 74 L: 3
New Posters
Basic Donation Addon
Controls ·  Search New posts · Mark unread

You are in: Forum / Forum / v2.08 / v2.08 Mods Completed

Unknown User
2012-04-08 21:47:20
Here is an very basic!!!!!!!!!!!!!!!!!!!!!!!!!!!! donation addon that should work fine in 2.08

Original credit for donate,php and paypal.php goes to BigMax1.

I just modified it to be correct for just about any site and fixed some formatting.

1st: sql: add the following sql into your db with what ever you use to edit the db.

[url="http://devscorner.xyz/applications/core/interface/file/attachment.php?id=5729"]tt_donation.rar[/url] New Update 05/05/2012



Show Donor Info In Account-Details And Account.php

in account-details

find 1st


[url="http://devscorner.xyz/applications/core/interface/file/attachment.php?id=6194"]donate.php[/url]



Cleanup code to remove the donor status once it expires.

in bottom of cleanup.php before



DROP TABLE IF EXISTS `funds`;

CREATE TABLE IF NOT EXISTS `funds` (

`id` int(10) unsigned NOT NULL auto_increment,

`cash` decimal(8,2) NOT NULL default '0.00',

`user` int(10) unsigned NOT NULL default '0',

`added` datetime NOT NULL default '0000-00-00 00:00:00',

`month` varchar(10) default NULL,

`year` varchar(10) NOT NULL default '',

PRIMARY KEY (`id`)

) ENGINE=MyISAM DEFAULT CHARSET=latin1;




2nd:

extract the enclosed zip file into the root of your site with folders and all.

New Update

http://devscorner.xyz/uploads/post-33545-0-28392100-1333921513.pnghttp://devscorner.xyz/uploads/post-33545-0-05794400-1333921524.png

3rd: edit backend/funds_config.php





$DONATEMAIL = 'change_this_email@change.this'; //Your Paypal email address here.




Edit: I fixed some issues if people try and donate if not logged in, in that case the person would have to pm someone to get the status set right.



List Of Most Reg Currencys





// List Of Most Reg Currencys

// Euro € EUR

// British Pound £ GBP

// Canadian Dollar $ CAD

// Polish Zloty $ PLN

// U.S. Dollar $ USD




Seems bigmax1 original post for entries that dont exist..

anyway:

in what ever you use to edit the db





ALTER TABLE `users` ADD `donoruntil` datetime NOT NULL default '0000-00-00 00:00:00';

ALTER TABLE `users` ADD `donor` enum('yes','no') NOT NULL default 'no';

ALTER TABLE `users` ADD `total_donated` int(10) unsigned NOT NULL default '0';




if ($user["privacy"] != "strong" || ($CURUSER["control_panel"] == "yes")) {




after add







//Donor count down

if ($user[donor] == 'yes' && ($CURUSER[id] == $user[id] || $CURUSER["class"] >= 6)) {

$donoruntil = $user['donoruntil'];

if ($donoruntil != '0000-00-00 00:00:00') {

print("<b><p>Donated Status Until - $donoruntil");

if ($CURUSER["class"] < 6)

print(" [ " . mkprettytime(strtotime($donoruntil) - gmtime()) . " ] to go...</b><font size="-2"> to re-new donation click <a class=altlink href=donate.php>here</a>.</font></p>n");

else

print(" [ " . mkprettytime(strtotime($donoruntil) - gmtime()) . " ] to go...</b></p>n");

} //$donoruntil != '0000-00-00 00:00:00'

else {

print("<b><p>Donated Status Until Removed Via Site Owner:)");

}

} //$user[donor] == 'yes' && ($CURUSER[id] == $user[id] || $CURUSER["class"] >= 6)

//====end








then in account

find





<b><?php echo T_("PASSKEY"); ?>:</b> <?php echo $CURUSER["passkey"]; ?><br />




after add





<b>Last <?php echo T_("DONATED"); ?>:</b> <?php echo $site_config['currency_symbol']; ?><?php echo number_format($CURUSER["donated"], 2); ?><br>

<b>Total <?php echo T_("DONATED"); ?>:</b> <?php echo $site_config['currency_symbol']; ?><?php echo number_format($CURUSER["total_donated"], 2); ?><br>

<?php if ($CURUSER['donoruntil']<>"0000-00-00 00:00:00 && ".htmlspecialchars($CURUSER['donor'])." == 'yes'")

echo "<b>Donor Until: </b> ".$CURUSER['donoruntil']." [ ".mkprettytime(strtotime($CURUSER['donoruntil']) - gmtime()); ?> ] to go...<br>








Langauges:

English:





// Mode Don

$LANG["THANKS_YOU_DONATE"] = "Thank You for visiting Donations page";

$LANG["SUPPORT_DON"] = "If you like our tracker please support us to keep it alive";

$LANG["DONATE"] = "Donate";

$LANG["AND_RECEIVE"] = "And you will receive";

$LANG["WEEKS"] = "Weeks";

$LANG["WEEKS_FREE_DL"] = "Weeks Free Download";

$LANG["GB_CREDITS_UP"] = "GB Upload Credits";

$LANG["INVITES_SITE"] = "Invites on our site";

$LANG["STATUS"] = "Status";

$LANG["PM_ADMIN_DON"] = "If you don't receive anything after a donation send a PM ";

$LANG["HERE"] = "HERE";

$LANG["CONFIRMED_ACCOUNT"] = "for confirmation and upgrade your account";

$LANG["-IMPORTANT-"] = "- IMPORTANT -";






Then replace donate.php with the attached file.


 //OPTIMIZE TABLES



add this code:









 //=== Remove donor status if time up and set class to power user ===//

$res = SQL_Query_exec("SELECT id, modcomment,class FROM users WHERE donor='yes' AND donoruntil < NOW() AND donoruntil <> '0000-00-00 00:00:00'");

if (mysql_num_rows($res) > 0) {

       $dt = sqlesc(get_date_time());

       $subject = sqlesc("VIP status removed by System.");

       $msg = sqlesc("Your VIP status has timed out and has been auto-removed by the System. We would like to thank you once again for supporting " . $site_config['SITENAME'] . ". If you wish to re-new your VIP, you can do so by clicking [url=".%20%24site_config%5B"] . "/donate.php]HERE[/url]. Cheers!n");

       while ($arr = mysql_fetch_assoc($res)) {

               ///--- Autosystem modcomment ---//

               $modcomment = htmlspecialchars($arr["modcomment"]);

               $modcomment = gmdate("Y-m-d H:i") . " - VIP status removed by System.n" . $modcomment;

               $modcom = sqlesc($modcomment);

               if ($arr["class"]<=3)   // Change this to your vip class if well diferent...

               SQL_Query_exec("UPDATE users SET class = '2', donor = 'no', donoruntil = '0000-00-00 00:00:00', modcomment = $modcom WHERE id = $arr[id]");

               else

               SQL_Query_exec("UPDATE users SET donor = 'no', donoruntil = '0000-00-00 00:00:00', modcomment = $modcom WHERE id = $arr[id]");



               SQL_Query_exec("INSERT INTO messages (sender, receiver, added, msg, subject, poster) VALUES(0, $arr[id], $dt, $msg, $subject, 0)");

       }

}


[/code]
donate1.png
donate1.png
donate2.png
donate2.png
tt_donation.rar
Download
donate.php
Download
Unknown User
2012-04-09 00:42:33
thank you ArcticWolf :)
Unknown User
2012-04-09 05:01:16
1st post updated, I fixed some issues with people not logged in that try and donate, and also now the



$DONATEMAIL


is in backend/funds_config.php
2012-04-09 18:18:09
Thanks articWolf for mode  :D

Question!?

Put in Canadian avec (Can) <<?

#Set the Currency Type

$currencytype = 'Can'; #For Fonts

$currencytype2 = '&#36;'; #For Sign

$currencytype3 = 'CAN'; #Main Currency for Donations

here with (can) its not working!? :unsure:

Capture.PNG
Capture.PNG

Unknown User
2012-04-09 19:07:38
dont know i cant read french to see the error.. my guess is check with paypal, they should have correct Currency types

edit: I see you used the wrong name..

Canadian Dollar $0.00 CAD

Correct I Guess..

#Set the Currency Type

$currencytype = 'Canadian Dollar'; #For Fonts

$currencytype2 = '&#36;'; #For Sign

$currencytype3 = 'CAD'; #Main Currency for Donations
2012-04-09 19:59:23
Big Thanks  :D  #1 ;)
Unknown User
2012-04-10 05:09:36
Great work   :)   thank you ArcticWolf

I see in paypal.php:

$old = date($row['donoruntil']);

but TorrentTrader don't has this function

It would be nice if you are publish and this part  :D
Unknown User
2012-04-10 17:13:27
actually if people bothered to read.,.paypal.php is BigMax1 code.................................. I just modified it to be not for some other site ONLY...................................................

anyway:

in what ever you use to edit the db



ALTER TABLE `users` ADD `donoruntil` datetime NOT NULL default '0000-00-00 00:00:00';

Unknown User
2012-04-13 20:36:53
Arctic thank you very much
Unknown User
2012-05-04 10:39:00
hmm seems it doesn't update the tables, works as far as paypal and receiving the money but account not updated.

i have tried with my paypal email and my ipn addy, still no go :(
Unknown User
2012-05-05 20:46:13
How to update manually?

I've installed this mod but no change in my block, any change in the account

Can you give me an example to update with ID user= 25, 10€, may 5th 2012, at 22:00PM please.

Thanks in advance
Unknown User
2012-05-05 21:29:59
.. people having issues with it.. if well dont change

3rd: edit backend/funds_config.php

$DONATEMAIL = 'change_this_email@change.this'; //Your Paypal email address here.

then will not work what ever.
Unknown User
2012-05-05 21:59:58
I've already changed the mail adress... I received the donation but any automatic update (block,etc...)

How update informations by database?

Like this?

Quote:
INSERT INTO `funds` VALUES(1, 10, 131, '2012-05-05 21:58:56');

I put my file too...

[url="http://devscorner.xyz/applications/core/interface/file/attachment.php?id=5727"]paypal.php[/url]
paypal.php
Download
Unknown User
2012-05-05 23:07:13
blah seems the original creator of it added some more fields..

after some extensive testing on my dev site it works now.. so if dont work for you dont call me i will call you:)

1st in what ever you use to edit the db



ALTER TABLE `users` ADD `donor` enum('yes','no') NOT NULL default 'no';

ALTER TABLE `users` ADD `total_donated` int(10) unsigned NOT NULL default '0';


then replace the paypal.php with the 1 enclosed

[url="http://devscorner.xyz/applications/core/interface/file/attachment.php?id=5728"]paypal.php[/url]

I added also where it sends now an pm to class 7 aka top "stock" class

It sends 1 at the start and another once it completes basically that class gets 2 pms each donation, kind of spamy but helps if something goes wrong for some strange reason.
paypal.php
Download
Unknown User
2012-05-06 05:28:08
ok have tested and still no upgrade, received the pm's this time though, thanks for your effort.

"ArcticWolf, post: 82861":
so if dont work for you dont call me i will call you:)

:huh:

I do have a working ipn donate system but i really like the donor until option this one gave.

thanks again
Users online

No users online

Search



Statistics

    Torrents

  • Tracking: 3
  • Todays torrents: 0
  • Seeders: 0
  • Leechers: 0
  • Peers: 0
  • Downloaded: 89.96 GB
  • Uploaded: 9.86 GB

  • Members

  • We have: 838
  • New today: 0
  • Guest today: 9

  • Online

  • Total online: 3
  • Members: 0
  • Guests online: 3
  • Comments: 3
  • Messages: 1,728