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] SEED BONUS
Controls ·  Search New posts · Mark unread

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

Unknown User
2008-02-22 06:02:45
Hi all!

This here an 100% release!!!!!

Mysql:

ALTER TABLE `users` ADD `seedbonus` DECIMAL( 10, 1 ) NOT NULL;

DROP TABLE IF EXISTS `bonus`;

CREATE TABLE `bonus` (

`id` int(5) NOT NULL auto_increment,

`bonusname` varchar(50) NOT NULL default '',

`points` decimal(4,1) NOT NULL default '000.0',

`description` text NOT NULL,

`art` varchar(10) NOT NULL default 'traffic',

`menge` bigint(20) unsigned NOT NULL default '0',

PRIMARY KEY (`id`)

) ENGINE=MyISAM AUTO_INCREMENT=11;

INSERT INTO `bonus` VALUES (1, '1.0GB Uploaded', 75.0, 'If you reach the points for this case, you can exchange these points on the fly into traffic, we take off the points and you receive the traffic.', 'traffic', 1073741824);

INSERT INTO `bonus` VALUES (2, '2.5GB Uploaded', 150.0, 'If you reach the points for this case, you can exchange these points on the fly into traffic, we take off the points and you receive the traffic.', 'traffic', 2684354560);

INSERT INTO `bonus` VALUES (3, '5GB Uploaded', 250.0, 'If you reach the points for this case, you can exchange these points on the fly into traffic, we take off the points and you receive the traffic.', 'traffic', 5368709120);

INSERT INTO `bonus` VALUES (7, '3 Invites', 20.0, 'Trade your points in for invites to the site.', 'invite', 3);

INSERT INTO `bonus` VALUES (6, '1 Invite', 10.0, 'Trade your points in for invites to the site.', 'invite', 3);

INSERT INTO `bonus` VALUES (8, '10 Invites', 50.0, 'Trade your points in for invites to the site.', 'invite', 3);

INSERT INTO `bonus` VALUES (9, '15 Invites', 75.0, 'Trade your points in for invites to the site.', 'invite', 3);

INSERT INTO `bonus` VALUES (10, '25 Invites', 100.0, 'Trade your points in for invites to the site.', 'invite', 3);

INSERT INTO `bonus` VALUES (4, '10GB Uploaded', 400.0, 'If you reach the points for this case, you can exchange these points on the fly into traffic, we take off the points and you receive the traffic.', 'traffic', 10737418240);

INSERT INTO `bonus` VALUES (5, '25GB Uploaded', 1000.0, 'If you reach the points for this case, you can exchange these points on the fly into traffic, we take off the points and you receive the traffic.', 'traffic', 26843545600);

Find in cleanup.php:

/////////Update Seederbonus by speed/////////
/// MOD from TBDEV - dottor

/// edited and adapted by MasterRoot

/// www.maniatorrent.org

/////////////////////////////////////////////////////

$res = mysql_query("SELECT DISTINCT userid FROM peers WHERE seeder = 'yes'") or sqlerr(__FILE__, __LINE__);

if (mysql_num_rows($res) > 0)

{

while ($arr = mysql_fetch_assoc($res))

{

$work = mysql_query("select count(*) from peers WHERE seeder ='yes' AND userid = $arr[userid]");

$row_count = mysql_result($work,0,"count(*)");

$speedu = mysql_query("SELECT sum(((p.uploaded - p.uploadoffset )) / (unix_timestamp(p.last_action) - unix_timestamp(p.started))) AS speed FROM peers p INNER JOIN users u ON p.userid=u.id WHERE u.id=$arr[userid]");

if($speeduu > "100.00")

$bonuspay="0.750";      //// if over 100kbs = 3 per hr

elseif($speeduu > "75.00")

$bonuspay="0.500";      //// if over 75 but less than 100 = 2.0 per hr

elseif($speeduu > "50.00")

$bonuspay="0.375";        //// if over 50kbs but under 75kbs = 1.5 per hr

elseif($speeduu > "30.00")

$bonuspay="0.250";        ///  if over 30kbs but under 50 kbs = 1.0 an hr

elseif($speeduu > "15.00")

$bonuspay="0.1875";      //// if over 15 kbs but less than 30kbs = .75 per hr

elseif($speeduu > "1.00")

$bonuspay="0.125";     ////  if over 1kbs but less than 15kbs = .5 per hr

elseif($speeduu < "1.00")

$bonuspay="0.0225";   ////  less than  kb/s = 1/4 per hr

mysql_query("UPDATE users SET seedbonus = seedbonus+$bonuspay*$row_count WHERE id = $arr[userid]") or sqlerr(__FILE__, __LINE__);

}

}

/////////End Update Seederbonus by speed/////////

/// MOD from TBDEV - dottor

/// edited and adapted by MasterRoot

/// www.maniatorrent.org

/////////////////////////////////////////////////////

Create mybonus.php:

<?php
////////////////////////////////////////////////////////

// Bonus Mod by TvRecall.org

// Bonus Mod Updated by devin

// Version 0.3

// Updated 01/05/2006

// under GPL-License

///////////////////////////////////////////////////////

require_once('backend/functions.php');

dbconn(false);

loggedinonly();

if ($action == "exchange") {

$userid = $CURUSER["id"];

$option = (int)$_POST["option"];

$art = $_POST["art"];

$modcomment = $CURUSER['modcomment'];

$upload = $CURUSER['uploaded'];

$res = mysql_query("SELECT * FROM bonus WHERE id='$option'");

$row = mysql_fetch_assoc($res);

if (!$row)

show_error_msg("Error", "Invalid request.", 1);

$up = $row['menge'];

$invites = $CURUSER['invites'];

$inv = $row['menge'];

$points = $row['points'];

if($CURUSER['seedbonus'] >= $points) {

if($art == "traffic") {

$modcomment = gmdate("Y-m-d") . " - User has traded " .$points. " Points for traffic.\n " .$modcomment;

mysql_query("UPDATE users SET uploaded = uploaded+$up, seedbonus = seedbonus-$points, modcomment = '$modcomment' WHERE id = '$userid'") or die(mysql_error());

show_error_msg("Success", "Account updated.");

} elseif($art == "invite") {

$modcomment = gmdate("Y-m-d") . " - User has traded " .$points. " Points for invites.\n " .$modcomment;

mysql_query("UPDATE users SET modcomment = '$modcomment', invites = invites+$inv, seedbonus = seedbonus-$points WHERE id = '$userid'") or die(mysql_error());

show_error_msg("Success", "Account updated.");

}

else {

show_error_msg("Error", "No valid type");

}

} else {

show_error_msg("Error", "Not enough points to trade...");

}

}

stdhead($CURUSER['username'] . "'s Bonus");

$bonus = $CURUSER['seedbonus'];

$userid = $CURUSER['id'];

begin_frame("Seeder Bonus Exchange");

print("<table align=center width=600 border=\"1\" cellspacing=\"0\" cellpadding=\"5\">\n");

Print("<tr><td class=tabletitle width=600>Seeder Bonus</td></tr></table>");

print("<table class=tableb align=center width=600 border=\"1\" cellspacing=\"0\" cellpadding=\"5\">\n");

?>

<tr><td align=center>Here you can exchange your Seeder-Bonus (currently: <?echo "$bonus";?>).

<br>

(If the button's deactivated, you do not have enough to trade.)

<br>

<?php

print("<table border=1 cellspacing=0 cellpadding=5 width=500><tr>".

"<td class=tabletitle align=left>Option</td>".

"<td class=tabletitle align=left>What's this about?</td>".

"<td class=tabletitle align=left>Points</td>".

"<td class=tabletitle align=left>Trade</td>".

"</tr>");

$res = mysql_query("SELECT * from bonus order by id");

while ($gets = mysql_fetch_assoc($res))

{

print("<tr class=tableb><td>".$gets["id"]."</td><td align='left'><b>".$gets["bonusname"]."</b><br>".$gets["description"]."</td><td align='right'>".$gets["points"]."</td>");

print("<form action=mybonus.php?action=exchange method=post>\n");

print("<input type=\"hidden\" name=\"option\" value=\"".$gets["id"]."\">\n");

print("<input type=\"hidden\" name=\"art\" value=\"".$gets["art"]."\">\n");

if($bonus >= $gets["points"]) {

print("<td><input type=submit name=submit value=\"Exchange!\"></td></form>");

} else {

print("<td><input type=submit name=submit value=\"Exchange!\" disabled></td></form>");

}

}

print("</table><br><br><br>");

?>

<blockquote><p align=left><b>How do I get points?</b><br>

You receive 0.5 points for every hour the system registers you as being a seeder.

</p></blockquote>

</td></tr>

<tr><td><a href=account.php>Back to your profile</a></td></tr>

</table>

<?php

end_frame();

stdfoot();

?>

blocks/login_block.php

After

$privacylevel = $CURUSER["privacy"];
Add


$seedbonus = $CURUSER["seedbonus"];

print ("<center><img width=80 height=80 src=$avatar></center><br>" . DOWNLOADED . ": $userdownloaded<br>" . UPLOADED . ": $useruploaded<BR>" . ACCOUNT_PRIVACY_LV . ": $privacylevel<BR>". RATIO .": $userratio");



Replace with



print ("<center><img width=80 height=80 src=$avatar></center><br>" . DOWNLOADED . ": $userdownloaded<br>" . UPLOADED . ": $useruploaded<BR>" . ACCOUNT_PRIVACY_LV . ": $privacylevel<BR>". RATIO .": $userratio<BR>Seeding Bonus: <a href='mybonus.php'>$seedbonus</a>");





Find in account.php:



<?print("<a href=account.php?action=mytorrents><b>My Torrents</b></a>");?>

|





ADD after:



<?print("<a href=mybonus.php><b>Seeding Bonus</b></a>");?>

|



EnjoY!

wolfnet
Unknown User
2008-02-25 17:05:36
tnx
Unknown User
2008-03-03 18:04:31
there is no

Quote:
<? print $userratio; ?>
in header.php on v2.03
Unknown User
2008-03-04 11:01:41
You could just put it in login_block.php

After

$privacylevel = $CURUSER["privacy"];



Add



$seedbonus = $CURUSER["seedbonus"];

print ("<center><img width=80 height=80 src=$avatar></center><br>" . DOWNLOADED . ": $userdownloaded<br>" . UPLOADED . ": $useruploaded<BR>" . ACCOUNT_PRIVACY_LV . ": $privacylevel<BR>". RATIO .": $userratio");



Replace with



print ("<center><img width=80 height=80 src=$avatar></center><br>" . DOWNLOADED . ": $userdownloaded<br>" . UPLOADED . ": $useruploaded<BR>" . ACCOUNT_PRIVACY_LV . ": $privacylevel<BR>". RATIO .": $userratio<BR>Seeding Bonus: <a href='mybonus.php'>$seedbonus</a>");
Unknown User
2008-03-04 14:00:21
Nice!

thanks
Unknown User
2008-03-07 18:05:16
thanks

working well on v2.03
Unknown User
2008-03-15 13:24:44
Some users report me that seed bonus don't works for them

and for one it start a few hours after he is seeding

can help me?
Unknown User
2008-03-17 22:50:53
Hi guys!

I only have a single problem, no link to send the invites. everything else works fine, the seeding bonus works and it's properly countered.

My question is simple: How will my users send the invites they exchanged for seeding points, I mean, there's no link for sending the invites.

Take me easy, I'm just a graphic designer, I'm new in the PHP coding, I started on liking it and this tracker I've setup is for a group of people, it's a serious thing and I want it to work, of course.

I mention that I've created the mybonus.php and did all the necessary modification accordingly to the updated codes placed here in this topic. I don't even know which code to post here because everything is exactly as posted on the forum, I compared files and everything is okay, but no link for sending an invitation although my users say that there's the block on the right side telling them they have invites.

I personally think this could be for two reasons, something different in v2.04 or I'm a real dumba*s.

Greetings and congratulations for the Seed Bonus add-on, it's quite nice and works, I mean not for me, not entirely  :D

All the best,

Friendly,

Dorian
Unknown User
2008-03-17 23:17:38
you need to search for the invite mod and install it.

"Dorian, post: 40175":
Hi guys!
I only have a single problem, no link to send the invites. everything else works fine, the seeding bonus works and it's properly countered.

My question is simple: How will my users send the invites they exchanged for seeding points, I mean, there's no link for sending the invites.

Take me easy, I'm just a graphic designer, I'm new in the PHP coding, I started on liking it and this tracker I've setup is for a group of people, it's a serious thing and I want it to work, of course.

I mention that I've created the mybonus.php and did all the necessary modification accordingly to the updated codes placed here in this topic. I don't even know which code to post here because everything is exactly as posted on the forum, I compared files and everything is okay, but no link for sending an invitation although my users say that there's the block on the right side telling them they have invites.

I personally think this could be for two reasons, something different in v2.04 or I'm a real dumba*s.

Greetings and congratulations for the Seed Bonus add-on, it's quite nice and works, I mean not for me, not entirely  :D

All the best,

Friendly,

Dorian
Unknown User
2008-03-17 23:58:04
yes, invit is not complete in v2 you have to instal invite mod

any help for me ?
Unknown User
2008-03-18 11:33:26
Thank you guys, I didn't know that. Now the invite system works perfectly, I had no errors, just made the normal adjustments to fit the needs.

You're great and I wish I could meet more people like you.

Thank you again, if any of you ever need graphic work or such things, contact me at dorian [at] igraphix [dot] ro
Unknown User
2008-03-21 23:57:09
please help me

some users are seeding and their seeding bonus is yet 0.00
Unknown User
2008-03-23 14:38:49
"AzuriS, post: 40352":
please help mesome users are seeding and their seeding bonus is yet 0.00

It will take like 2 hours for the bonus to appear, the bonus is set to count every hour of seed. On my tracker it took over 100 minutes for the bonus to appear. When have you installed the mod?
Unknown User
2008-03-24 14:27:07
there are a few users who seed more than 3 or 4 days and don't have any points yet
Unknown User
2008-03-26 16:08:02
hmm my doesnt seem to be working too..iv been seeding for a day and it still 0.0
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