[size=14px]This is the original mod created by mostvotedplaya, improved by ArcticWolf and easy modified by me.
I added again this mod because now unfortunately is missing.[/size]
Add to your database:
CREATE TABLE IF NOT EXISTS `snatched` (
`sid` int(11) unsigned NOT NULL auto_increment,
`tid` int(11) unsigned NOT NULL default '0',
`uid` int(11) unsigned NOT NULL default '0',
`stime` int(11) unsigned NOT NULL default '0',
`utime` int(11) unsigned NOT NULL default '0',
`ltime` int(11) unsigned NOT NULL default '0',
`uload` bigint(20) unsigned NOT NULL default '0',
`dload` bigint(20) unsigned NOT NULL default '0',
`completed` enum('0','1') NOT NULL default '0',
`hnr` enum('no','yes') NOT NULL default 'no',
PRIMARY KEY (`sid`),
UNIQUE KEY `tid_uid` (`tid`,`uid`),
KEY `completed` (`completed`),
KEY `tid` (`tid`),
KEY `uid` (`uid`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
Open backend/functions.php
After:
Add:
After:
Add:
In the most bottom place, before ?> add:
Open announce.php
Find:
Underneath add:
Find:
Replace with:
Find:
Above add:
Find:
Replace with:
Find:
Underneath add:
Open account.php
Under:
Add:
Open account-details.php
Before:
Add:
Open torrents-details.php
Under:
Add:
Open languages/english.php
Add:
[size=14px]Finally, extracts the atached archive "snatched.zip" and upload the images and snatched.php into your root.[/size]
[url="http://devscorner.xyz/applications/core/interface/file/attachment.php?id=7186"]snatched.zip[/url]
I added again this mod because now unfortunately is missing.[/size]
Add to your database:
CREATE TABLE IF NOT EXISTS `snatched` (
`sid` int(11) unsigned NOT NULL auto_increment,
`tid` int(11) unsigned NOT NULL default '0',
`uid` int(11) unsigned NOT NULL default '0',
`stime` int(11) unsigned NOT NULL default '0',
`utime` int(11) unsigned NOT NULL default '0',
`ltime` int(11) unsigned NOT NULL default '0',
`uload` bigint(20) unsigned NOT NULL default '0',
`dload` bigint(20) unsigned NOT NULL default '0',
`completed` enum('0','1') NOT NULL default '0',
`hnr` enum('no','yes') NOT NULL default 'no',
PRIMARY KEY (`sid`),
UNIQUE KEY `tid_uid` (`tid`,`uid`),
KEY `completed` (`completed`),
KEY `tid` (`tid`),
KEY `uid` (`uid`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
Open backend/functions.php
After:
SQL_Query_exec("DELETE FROM reports WHERE votedfor = $id AND type = 'torrent'");Add:
SQL_Query_exec("DELETE FROM `snatched` WHERE `tid` = '$id'");After:
SQL_Query_exec("DELETE FROM pollanswers WHERE userid = $userid");Add:
SQL_Query_exec("DELETE FROM `snatched` WHERE `uid` = '$userid'");In the most bottom place, before ?> add:
function seedtime($ts = 0)
{
$days = floor($ts / 86400);
$hours = floor($ts / 3600 ) % 24;
$mins = floor($ts / 60) % 60;
$secs = $ts % 60;
return sprintf( '%d days, %d hours, %d minutes, %d seconds...', $days, $hours, $mins, $secs);
}Open announce.php
Find:
$ret = SQL_Query_exec("INSERT INTO peers (connectable, torrent, peer_id, ip, passkey, port, uploaded, downloaded, to_go, started, last_action, seeder, userid, client) VALUES ('$connectable', $torrentid, " . sqlesc($peer_id) . ", " . sqlesc($ip) . ", " . sqlesc($passkey) . ", $port, $uploaded, $downloaded, $left, '".get_date_time()."', '".get_date_time()."', '$seeder', '$userid', " . sqlesc($agent) . ")");Underneath add:
if ( ($MEMBERSONLY) && (($seeder == 'no' && $torrent['freeleech'] == 0)) ) {
SQL_Query_exec("INSERT INTO `snatched` (`uid`, `tid`, `stime`, `utime`) VALUES ('$userid', '$torrentid', '".gmtime()."', '".gmtime()."') ON DUPLICATE KEY UPDATE `utime` = '" . gmtime() . "'");
}Find:
if ( $MEMBERSONLY )
SQL_Query_exec("INSERT INTO completed (userid, torrentid, date) VALUES ($userid, $torrentid, '".get_date_time()."')");Replace with:
if ( $MEMBERSONLY )
{
SQL_Query_exec("INSERT INTO completed (userid, torrentid, date) VALUES ($userid, $torrentid, '".get_date_time()."')");
SQL_Query_exec("UPDATE LOW_PRIORITY `snatched` SET `completed` = '1' WHERE `tid` = '$torrentid' AND `uid` = '$userid' AND `utime` = '" . gmtime() . "'");
}Find:
$upthis = max(0, $uploaded - $self["uploaded"]);Above add:
$elapsed = ($self['seeder'] == 'yes') ? $site_config['announce_interval'] - floor(($self['ez'] - time()) / 60) : 0;Find:
if (($upthis > 0 || $downthis > 0) && is_valid_id($userid))Replace with:
if (($upthis > 0 || $downthis > 0 || $elapsed > 0) && is_valid_id($userid))Find:
SQL_Query_exec("UPDATE users SET uploaded = uploaded + $upthis, downloaded = downloaded + $downthis WHERE id=$userid") or err("Tracker error: Unable to update stats");Underneath add:
SQL_Query_exec("UPDATE LOW_PRIORITY `snatched` SET `uload` = `uload` + '$upthis', `dload` = `dload` + '$downthis', `utime` = '".gmtime()."', `ltime` = `ltime` + '$elapsed' WHERE `tid` = '$torrentid' AND `uid` = '$userid'");Open account.php
Under:
<?php print("<a href='mailbox.php'><b>".T_("YOUR_MESSAGES")."</b></a>");?>Add:
|
<?php print("<a href='snatched.php'><b>".T_("YOUR_SNATCHLIST")."</b></a>");?>Open account-details.php
Before:
<?php echo T_("AGE"); ?>: <?php echo htmlspecialchars($user["age"])?><br />Add:
<?php if ($CURUSER["edit_users"]=="yes" && $CURUSER["class"] > $user["class"]) { ?>
<div style="margin-bottom:3px"><a href="snatched.php?uid=<?php echo $user["id"]?>"><?php echo "<input type='submit' value='".T_("SNATCHLIST")."'>"; ?></a></div>
<?php } ?>Open torrents-details.php
Under:
echo "[<a href='torrents-edit.php?id=$row[id]&returnto=" . urlencode($_SERVER["REQUEST_URI"]) . "'><b>".T_("EDIT_TORRENT")."</b></a>]";Add:
echo " <a href=snatched.php?tid=$row[id]><input type='submit' value='".T_("SNATCHLIST")."'></a> ";Open languages/english.php
Add:
//===| Snatchlist
$LANG["SNATCHLIST"] = "Snatchlist";
$LANG["YOUR_SNATCHLIST"] = "Your Snatchlist";
$LANG["SNATCHLIST_FOR"] = "Snatchlist For:";
$LANG["LAST_ACTION"] = "Last Action";
$LANG["SEED_TIME"] = "Seed Time";
$LANG["GO_TO_YOUR_PROFILE"] = "Go to Your Profile";
$LANG["GO_TO_USER_ACCOUNT"] = "Go to User Account";
$LANG["HNR"] = "<font color=#FF1200><b>H</b><small>&</small><b>R</b></font>";
$LANG["SNATCHED_MESSAGE"] = "This page displays the details to all downloaded torrents, completed or not.";
$LANG["NO_USER_WITH_ID"] = "There is no user with ID: ";
$LANG["NO_TORRENT_WITH_ID"] = "There is no torrent with ID: ";
$LANG["REGISTERED_MEMBERS_TO_TORRENT"] = "Registered Members To Torrent:";
$LANG["NO_PERMISSION"] = "You don't have permission for this action!";
$LANG["T_L_OR_E"] = "Local or External";
$LANG["LOCAL_TORRENT"] = "Local Torrent";
$LANG["EXTERNAL_TORRENT"] = "External Torrent";
$LANG["FREE"] = "Free";[size=14px]Finally, extracts the atached archive "snatched.zip" and upload the images and snatched.php into your root.[/size]
[url="http://devscorner.xyz/applications/core/interface/file/attachment.php?id=7186"]snatched.zip[/url]
