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
[ADDON] Add your donation button to torr
Controls ·  Search New posts · Mark unread

You are in: Forum / Forum / v2.08 / v2 Only Mods Complete

Unknown User
2010-02-20 00:05:50
Hope this isnt posted somewhere here already. I personally have not seen it but anyways. I got the idea from another tracker that I had seen so the idea credit goes to them. What this does is simply add the donate button to your torrent details. Seems to work well for me due to the fact that it stands out with color red and is on every details page. Donations have doubled for me.

Copy and save your torrent-details.php as a back up

Find:

// Calculate local torrent speed test

if ($row["leechers"] >= 1 && $row["seeders"] >= 1 && $row["external"]!='yes'){

$speedQ = mysql_query("SELECT (SUM(p.downloaded)) / (UNIX_TIMESTAMP('".get_date_time()."') - UNIX_TIMESTAMP(added)) AS totalspeed FROM torrents AS t LEFT JOIN peers AS p ON t.id = p.torrent WHERE p.seeder = 'no' AND p.torrent = '$id' GROUP BY t.id ORDER BY added ASC LIMIT 15") or die(mysql_error());

$a = mysql_fetch_assoc($speedQ);

$totalspeed = mksize($a["totalspeed"]) . "/s";

}else{

$totalspeed = "".NO_ACTIVITY."";

}
and add below:




?>

<br><CENTER>

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

<input type="image" src="images/donate.jpg" title="Pay via PayPal" alt="Pay via PayPal" />

<br><br>

<div>

<input type="hidden" name="cmd" value="_xclick" />

<input type="hidden" name="business" value="your paypal account email" />

 <input type="hidden" name="item_name" value="Donations to your site name Private Torrent Tracker!!!"/>

 <input type="hidden" name="no_note" value="1" />

 <input type="hidden" name="currency_code" value="USD" />

 <input type="hidden" name="tax" value="0" />

 <select name="amount">

<option value="5.00">5.00</option>

<option value="10.00">10.00</option>

<option value="15.00">15.00</option>

<option value="20.00">20.00</option>

<option value="25.00">25.00</option>

<option value="30.00">30.00</option>

<option value="35.00">35.00</option>

<option value="40.00">40.00</option>

<option value="45.00">45.00</option>

<option value="50.00">50.00</option>

 </select>

 </div>

 </form>

 </CENTER>

<?



Change the text to suit your info and you can adjust the amounts as well.

You can use the images provided or use your own.

The last image was used from my old xbtit tracker and the others were found on google.



And here is the screenshot



I know the coding may be a bit sloppy due to the fact i am not into creating my own, but more like manipulating the code to suit my needs. I borrowed bits of this code from my vbulletin site.

Thanks and enjoy
Unknown User
2010-02-20 23:25:13
works great..ty
Unknown User
2010-02-20 23:56:32
Your welcome...like I said, it has doubled my donations to the site. Glad it works for ya.
Unknown User
2010-04-10 15:19:46
Great job .. work with the lastest version of tt!!
2010-10-16 16:56:44
Un gros merci,fonctionne tr

paypal.png
paypal.png

Unknown User
2010-10-16 17:17:06
better button for you all  :D

Unknown User
2010-12-22 18:00:12
Thanks for this code mate. I have added the code to my site and have one small problem. The picture doesn't form to it's correct size and appears to be inside some other grey box (see screenshot below).

I tried adding in height="value" width="value"

The width value worked, height didn't and it was still inside the grey box.

Anyone have any ideas?

donatescreenshot.png
donatescreenshot.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