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-12-30 06:18:23
... reading hard..

Cleanup code to remove the donor status once it expires.

in bottom of cleanup.php before

 //OPTIMIZE TABLES



add this code:





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

$res = SQL_Query_exec("SELECT id, modcomment 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);

       SQL_Query_exec("UPDATE users SET class = '2', 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)");

   }

}





donor star an little harder depends on what you using to display icons like vip, warned and what not aka using the function some made called class_user

Edit: the class_user function from https://www.torrenttrader.org/topic/17452-class-colors-function-for-208/ is easy to modify to show if donor..

replace


$a ="SELECT class, donated, warned, enabled FROM `users` WHERE username ='".$name."'";



with


$a ="SELECT class, donor, warned, enabled FROM `users` WHERE username ='".$name."'";



then replace


}if($classy[1]>0){



with


}if($classy[1]=="yes"){

[/code]
Unknown User
2013-01-04 06:08:49
thanx ... works great on 2.08
Unknown User
2013-01-04 06:42:41
yes..... looking really nice here lol
Unknown User
2013-01-05 21:01:13
Thanks a lot for your mod,  here is the French translation of your english language block :



// Mode Don

$LANG["THANKS_YOU_DONATE"] = "Merci de visiter la page des donations";

$LANG["SUPPORT_DON"] = "Si vous aimez le tracker aidez-nous à le maintenir en vie";

$LANG["DONATE"] = "Faire un don";

$LANG["AND_RECEIVE"] = "Et vous recevrez";

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

$LANG["WEEKS_FREE_DL"] = "Semaines de Téléchargement Gratuit";

$LANG["GB_CREDITS_UP"] = "GB Crédits d'Upload";

$LANG["INVITES_SITE"] = "Invitations sur notre site";

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

$LANG["PM_ADMIN_DON"] = "Si vous ne recevez rien après un don envoyez nous un message";

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

$LANG["CONFIRMED_ACCOUNT"] = "pour confirmation et mise à niveau de votre compte";

$LANG["-IMPORTANT-"] = "- IMPORTANT -";
Unknown User
2013-01-10 15:27:34
i have a problem if it is problem

one member pay a litle eyro but this member received some bonus at upload but dont change the categorie to vip

i have in vip the class 4 and uploader to class 3
Unknown User
2013-01-10 15:56:08
if you changed the classes at all from stock then you need to modify paypal.php and the cleanup part to match!!!! common sense!!!!  Not sure why someone would have VIP above uploader LOL!!!!!!!!!
Unknown User
2013-01-10 16:16:02
in paypal.php maybe i change the below code



//Set class to VIP if lower then VIP

if ($clid>0) {

if ($payment_amount == 5 || $payment_amount == 10 || $payment_amount == 20 || $payment_amount == 30) {

if ($class <= 3) {

$class = 3;

TO




//Set class to VIP if lower then VIP

if ($clid>0) {

if ($payment_amount == 5 || $payment_amount == 10 || $payment_amount == 20 || $payment_amount == 30) {

if ($class <= 4) {

$class = 4;




or something else?
Unknown User
2013-01-10 16:46:22
something like that..

if want to use not stock classes prob be simpler to use this attached file then change 2 things!!!!





// Config

$vip_class = 3; // Change this to well your vip class...

$pu_class = 2; // Change this to well your power user class!!!!

// Config End


NEW File: [url="http://devscorner.xyz/applications/core/interface/file/attachment.php?id=6459"]paypal.php[/url]
paypal.php
Download
Unknown User
2013-01-10 17:14:35
Thanks for your help

i have the below groups in screen

i think the below code is ok?



// Config

$vip_class = 4; // Change this to well your vip class...

$pu_class = 2; // Change this to well your power user class!!!!

// Config End

i have the below screen...something mistake above 30 i have a [

maybe delete the [ from the code




$monthly_goal = "[ ".round($Progress_so_far)."%";




TO





$monthly_goal = " ".round($Progress_so_far)."%";




group.png
group.png
don.png
don.png
Unknown User
2013-01-10 18:36:52
i am shocked that code worked at all.. oh well i did not design it, i just modified someone elses code to be 2.08 able..

anyway this block seems to be ok from what i can tell on my dev site.... I dont have 2300000000000000000000000000000 users on it so what ever:)

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

I been using an modified version of it for years on my main site so must do something!!!
donate_block.php
Download
Unknown User
2013-01-19 11:02:37
Well, is it also possible to manually remove the star icon? I've included all the codes here and use the new system works OK ...old users system will not remove this star, ...from those who not donated more than a year :(
Unknown User
2013-01-21 05:43:51
I am very happy with this addon, working perfectly in my v2.08....... I did change some stuff, BUT:

I would like to add an option for members to do a RECURRING MONTHLY DONATION .... my members asked for this specifically......

i.e. 1 or 2 euro a month to be done recurringly, automatically until cancelled.......   this must be in addition to the 5, 10, 20 and 30 euro options already available.......

Members will only receive a small GB bonus as in 5 or 10 GB, and a star with a "1" or a "2" in it next to their names......

I give my current code here, pls can someone help?



<?php

// TorrentTrader v2.08

// This file was last updated: 08/April/2012 by ArcticWolf

// Last Update: 11-11-2011

// Orginal Modified by BigMax

// Modified to TT V2.08 by ArcticWolf

require_once('backend/functions.php');

require_once('backend/funds_config.php');

dbconn(false);

loggedinonly();

global $DONATEMAIL,$totalneeded,$site_config;

$nick = ($CURUSER ? $CURUSER['username'] : ('Guest' . rand(1000, 9999)));

$userid = ($CURUSER ? $CURUSER['id'] : (0));

stdhead(T_("DONATE"));

begin_frame(T_("DONATE"));

//Start

//Set GB amount per Donation Amount here [ use same in Paypal.php]

$amount5 = 25; // For 5

$amount10 = 55; // For 10 Etc....

$amount20 = 110;

$amount30 = 170;

//Set the length of time in days[same in Paypal.php]

$length5 = 2;

$length10 = 4;

$length20 = 8;

$length30 = 12;

//Set the Currency Type

$currencytype = 'Euro'; //For Fonts

$currencytype2 = '&euro;'; //For Sign

$currencytype3 = 'EUR'; //Main Currency for Donations

//Set the Class for Donations

$class5 = 'VIP';

$class10 = 'VIP';

$class20 = 'VIP';

$class30 = 'VIP';

//Donate Email

$width = 180; // Change this to control the size of the blocks

//End

?>

<br /></br />

<h2><div align='center'><font size='3' color='orange'><?php echo T_("THANKS_YOU_DONATE"); ?> <?php echo $nick;?></font></div></h2>

<br />

<div align='center'><font size='2'><b> <?php echo T_("SUPPORT_DON"); ?></b></font></div>

<br />

<table width='100%' align='center' border='0' cellspacing='0' cellpadding='10'><tr><td>

<div align='center'>

<table width='90%' align='center' border='0' cellpadding='10'>

<tr>



<? // Start First Box ?>

<td>

<div align='center'>

<table border='1' cellpadding='10' cellspacing='0' height='250' width='<?php echo $width;?>'><tbody><tr><td class='text'>

<a><div align='center'><img src="<?php echo $site_config['SITEURL'];?>/images/donate/donate1.gif"></img></div></a>

<br>

<div align='center'><b><font color='red' size='3'><?php echo T_("DONATE"); ?> <?php echo $currencytype2;?> 5</font></b></div><br>

<div style="margin-top: 1px;text-align: center;font:12px"><b><font color=orange><?php echo T_("AND_RECEIVE"); ?> :</font></b></div><br>

<div style="margin-left: 8px;text-align: left;font:10px">- <b><?php echo $length5;?> <?php echo T_("WEEKS"); ?> <?php echo $class5;?> <?php echo T_("STATUS"); ?></b></div>

<div style="margin-left: 8px;text-align: left;font:10px">- <?php echo T_("REQUESTS_ACCESS"); ?></div>

<div style="margin-left: 8px;text-align: left;font:10px">- <?php echo $amount5;?> <?php echo T_("GB_CREDITS_UP"); ?></div>

<div style="margin-left: 8px;text-align: left;font:10px">- 2 <?php echo T_("INVITES_SITE"); ?></div>

<form action='https://www.paypal.com/cgi-bin/webscr' method='post'>

<input type='hidden' name='cmd' value='_xclick'>

<input type='hidden' name='business' value='<?php echo $DONATEMAIL;?>'>

<input type='hidden' name='item_name' value='Server Funds (<?php echo $nick;?>)'>

<input type='hidden' name='no_note' value='1'>

<input type='hidden' name='currency_code' value='<?php echo $currencytype3;?>'>

<input type='hidden' name='amount' value='5'>

<input type='hidden' name='tax' value='0'>

<input type='hidden' name='custom' value='<? echo $userid;?>'>

<input type='hidden' name='notify_url' value='<?php echo $site_config['SITEURL'];?>/paypal.php'>

<input type="hidden" name="no_shipping" value="1">

<br />

<div align='center'><input type='submit' value='Donate'></div>

</form>

</div>

</div>

</td></tr></tbody></table>

</td>

<? // End First Box ?>

<? // Start Second Box ?>

<td>

<div align='center'>

<table border='1' cellpadding='10' cellspacing='0' height='250' width='<?php echo $width;?>'><tbody><tr><td class='text'>

<a><div align='center'><img src="<?php echo $site_config['SITEURL'];?>/images/donate/donate2.gif"></img></div></a>

<br />

<div align='center'><b><font color='red' size='3'>Donate <?php echo $currencytype2;?> 10</font></b></div><br>

<div style="margin-top: 1px;text-align: center;font:12px"><b><font color=orange><?php echo T_("AND_RECEIVE"); ?> :</font></b></div><br>

<div style="margin-left: 8px;text-align: left;font:10px">- <b><?php echo $length10;?> <?php echo T_("WEEKS"); ?> <?php echo $class10;?> <?php echo T_("STATUS"); ?></b></div>

<div style="margin-left: 8px;text-align: left;font:10px">- <?php echo T_("REQUESTS_ACCESS"); ?></div>

<div style="margin-left: 8px;text-align: left;font:10px">- <?php echo $amount10;?> <?php echo T_("GB_CREDITS_UP"); ?></div>

<div style="margin-left: 8px;text-align: left;font:10px">- 4 <?php echo T_("INVITES_SITE"); ?></div>

<form action='https://www.paypal.com/cgi-bin/webscr' method='post'>

<input type='hidden' name='cmd' value='_xclick'>

<input type='hidden' name='amount' value='10.00'>

<input type='hidden' name='business' value='<?php echo $DONATEMAIL;?>'>

<input type='hidden' name='item_name' value='(<?php echo $nick;?>)'>

<input type='hidden' name='item_number' value='1'>

<input type='hidden' name='no_note' value='1'>

<input type='hidden' name='currency_code' value='<?php echo $currencytype3;?>'>

<input type='hidden' name='tax' value='0'>

<input type='hidden' name='no_shipping' value='1'>

<input type='hidden' name='custom' value='<? echo $userid;?>'>

<input type='hidden' name='notify_url' value='<?php echo $site_config['SITEURL'];?>/paypal.php'>

<div align=bottom>

<br />

<div align='center'><input type='submit' value='Donate'></div>

</div>

</form>

</div>

</td></tr></tbody></table>

</td>

<? // End Second Box ?>

<? // Start Third Box ?>

<td>

<table border='1' cellpadding='10' cellspacing='0' height='250' width='<?php echo $width;?>'><tbody><tr><td class='text'>

<a><div align='center'><img src="<?php echo $site_config['SITEURL'];?>/images/donate/donate3.gif"></img></div></a>

<br>

<div align='center'><b><font color='red' size='3'>Donate <?php echo $currencytype2;?> 20</font></b></div><br>

<div style="margin-top: 1px;text-align: center;font:12px"><b><font color=orange><?php echo T_("AND_RECEIVE"); ?> :</font></b></div><br>

<div style="margin-left: 8px;text-align: left;font:10px">- <b><?php echo $length20;?> <?php echo T_("WEEKS"); ?> <?php echo $class20;?> <?php echo T_("STATUS"); ?></b></div>

<div style="margin-left: 8px;text-align: left;font:10px">- <?php echo T_("REQUESTS_ACCESS"); ?></div>

<div style="margin-left: 8px;text-align: left;font:10px">- <?php echo $amount20;?> <?php echo T_("GB_CREDITS_UP"); ?></div>

<div style="margin-left: 8px;text-align: left;font:10px">- 8 <?php echo T_("INVITES_SITE"); ?></div>

<form action='https://www.paypal.com/cgi-bin/webscr' method='post'>

<input type='hidden' name='cmd' value='_xclick'>

<input type='hidden' name='amount' value='20.00'>

<input type='hidden' name='business' value='<?php echo $DONATEMAIL;?>'>

<input type='hidden' name='item_name' value='(<?php echo $nick;?>)'>

<input type='hidden' name='item_number' value='1'>

<input type='hidden' name='no_note' value='1'>

<input type='hidden' name='currency_code' value='<?php echo $currencytype3;?>'>

<input type='hidden' name='tax' value='0'>

<input type='hidden' name='no_shipping' value='1'>

<input type='hidden' name='custom' value='<? echo $userid;?>'>

<input type='hidden' name='notify_url' value='<?php echo $site_config['SITEURL'];?>/paypal.php'>

<div align=bottom>

<br>

<center><input type='submit' value='Donate'></center>

</div>

</form>

</div>

</td></tr></tbody></table>

</td>

<? // End Third Box ?>

<? // Start Fourth Box ?>

<td>

<table border='1' cellpadding='10' cellspacing='0' height='250' width='<?php echo $width;?>'><tbody><tr><td class='text'>

<a><div align='center'><img src="<?php echo $site_config['SITEURL'];?>/images/donate/donate4.gif"></img></div></a>

<br>

<div align='center'><b><font color='red' size='3'>Donate <?php echo $currencytype2;

?> 30</font></b></div><br>

<div style="margin-top: 1px;text-align: center;font:12px"><b><font color=orange><?php echo T_("AND_RECEIVE"); ?> :</font></b></div><br>

<div style="margin-left: 8px;text-align: left;font:10px">- <b><?php echo $length30;?> <?php echo T_("WEEKS"); ?> <?php echo $class30;?> <?php echo T_("STATUS"); ?></b></div>

<div style="margin-left: 8px;text-align: left;font:10px">- <?php echo T_("REQUESTS_ACCESS"); ?></div>

<div style="margin-left: 8px;text-align: left;font:10px">- <?php echo $amount30;?> <?php echo T_("GB_CREDITS_UP"); ?></div>

<div style="margin-left: 8px;text-align: left;font:10px">- 12 <?php echo T_("INVITES_SITE"); ?></div>

<form action='https://www.paypal.com/cgi-bin/webscr' method='post'>

<input type='hidden' name='cmd' value='_xclick'>

<input type='hidden' name='amount' value='30.00'>

<input type='hidden' name='business' value='<?php echo $DONATEMAIL;?>'>

<input type='hidden' name='item_name' value='(<?php echo $nick;?>)'>

<input type='hidden' name='item_number' value='1'>

<input type='hidden' name='no_note' value='1'>

<input type='hidden' name='currency_code' value='<?php echo $currencytype3;?>'>

<input type='hidden' name='tax' value='0'>

<input type='hidden' name='no_shipping' value='1'>

<input type='hidden' name='custom' value='<? echo $userid;?>'>

<input type='hidden' name='notify_url' value='<?php echo $site_config['SITEURL'];?>/paypal.php'>

<div align=bottom>

<br>

<div align='center'><input type='submit' value='Donate'></div>

</div>

</form>

</td></tr></tbody></table>

</td>

<? // End Fourth Box ?>

</td></tr></table>

</tr>

</table>

<br><br>

<table align='center' width='100%' border='0' cellspacing='1' cellpadding='10'>

<tr>

<td align='center' width='100%'><b><font color='orange' size='2'><?php echo T_("-IMPORTANT-"); ?></font></b></td>

</tr>

<tr>

<td align='center'>

<font size='2'><?php echo T_("PM_ADMIN_DON"); ?> <a href="mailbox.php?compose&id=1"> &nbsp;<font size=2><b><?php echo T_("HERE"); ?></b></font>&nbsp; </a><?php echo T_("CONFIRMED_ACCOUNT"); ?></font>

<br></br>

</td>

</tr>

</table>

<? // End Everything ?>

<?php

end_frame();

stdfoot();

?>




If you need any other files or info pls just tell me

[url="http://devscorner.xyz/applications/core/interface/file/attachment.php?id=6504"]paypal.php[/url]
paypal.php
Download
Unknown User
2013-01-24 12:06:57
ok, here is a screenshot of the modified donate page THANK YOU ARCTICWOLF...



if anyone is interested just let me know and I'll post the correct codes here for you.....
Unknown User
2013-01-24 13:32:38
I would love if you could post the codes Thanks!
Unknown User
2013-01-24 17:40:16
i was right no easy way to do the paypal subscription button I can see..

This attached file has an link to another site that has pretty good walkthrew on how to create 1 on paypal.

I would keep it on your site named as donate_1.php or something then once you get it working right and looking right rename it to donate.php

That way only you have the link to it hehehe for testing

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

donate_1.php
Download
2013-01-21_1640.png
2013-01-21_1640.png
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: 1
  • Members: 0
  • Guests online: 1
  • Comments: 3
  • Messages: 1,728