Ive posted in progress but i have this installed on live site once i know i havent missed anything ill move to complete. Remember to backup.
[color=rgb(251, 160, 38)]SQL :[/color]
[color=rgb(251, 160, 38)]In torrents-upload.php search :[/color]
Add above :
find start of line
Add inline after "name, " :
On same line find :
Add after :
Search :
Add above : ( your group class might be different )
[color=rgb(251, 160, 38)]In torrents-details.php seacrh :[/color]
Add after :
Search :
Add after :
Search :
Add after :
[color=rgb(251, 160, 38)]Search in torrents-edit.php :[/color]
Add after :
Search:
Add after :
[color=rgb(251, 160, 38)]In torrents.php search : (same for index.php / torrents-search.php & torrents-today.php)[/color]
Add after :
[color=rgb(251, 160, 38)]In download.php search :[/color]
Add after : (
[color=rgb(251, 160, 38)]In backend/functions.php search :[/color]
Add after :
Put the image "vip.gif" in your images folder at the root of your site.
little extra you dont need this but a index block for vip torrents
[color=rgb(251, 160, 38)]in config.php add[/color]
[color=rgb(251, 160, 38)]in index.php add[/color]
add vip-torrents.php to root
Any errors and you can check code here
[URL unfurl="true"]https://github.com/M-jay84/TTv3/tree/master/upload[/url]
[color=rgb(251, 160, 38)]SQL :[/color]
alter table `torrents` add vip enum('yes','no') NOT NULL default 'no';[color=rgb(251, 160, 38)]In torrents-upload.php search :[/color]
$descr = $_POST["descr"];Add above :
$vip = ($_POST["vip"]);find start of line
$ret = SQL_Query_exec("INSERT INTO torrents (filename, owner, name,.....Add inline after "name, " :
vip,On same line find :
".sqlesc($descr).",Add after :
'".$vip."',Search :
if ($site_config['ANONYMOUSUPLOAD'] && $site_config["MEMBERSONLY"] ){ ?>Add above : ( your group class might be different )
if (get_user_class() > 4)
print ("<tr><td align='right'>VIP: </td><td align=left><input type='checkbox' name='vip' " .
(($row["vip"] == "yes") ? " checked='checked' " : "" ) . " value='yes'>Check this box if you want the torrent or only for VIP.</td></tr>");[color=rgb(251, 160, 38)]In torrents-details.php seacrh :[/color]
torrents.freeleech,Add after :
torrents.vip,Search :
//DECIDE IF TORRENT EXISTS
if (!$row || ($row["banned"] == "yes" && $CURUSER["edit_torrents"] == "no"))
show_error_msg(T_("ERROR"), T_("TORRENT_NOT_FOUND"), 1);Add after :
$vips = $row["vip"];
if ($vip == "yes") {
$vip = "<b>Yes</b>";
} else {
$vip = "<b>No</b>";
}Search :
print ("<b>".T_("LEECHERS").": </b><font color='#ff0000'>" . number_format($row["leechers"]) . "</font><br />");Add after :
if ($row["external"]!='yes' && $row["vip"]== yes){
print ("<b>Torrent VIP: </b><font color='orange'>Torrent reserved for VIP</font><br><br>");
} [color=rgb(251, 160, 38)]Search in torrents-edit.php :[/color]
$updateset[] = "freeleech = '".$_POST["freeleech"]."'";Add after :
$updateset[] = "vip = '" . ($_POST["vip"] ? "yes" : "no") . "'";Search:
if ($row["external"] != "yes" && $CURUSER["edit_torrents"] == "yes"){
echo "<tr><td class='table_col1' align='right'><b>".T_("FREE_LEECH").": </b></td><td class='table_col2'><input type=\"checkbox\" name=\"freeleech\"" . (($row["freeleech"] == "1") ? " checked=\"checked\"" : "" ) . " value=\"1\" />".T_("FREE_LEECH_MSG")."<br /></td></tr>";
}Add after :
if ($row["external"] != "yes" && $CURUSER["edit_torrents"] == "yes"){
echo "<tr><td class='table_col1' align='right'><b>VIP:</b></td><td class='table_col2'><input name=vip type='checkbox'" . (($row["vip"] == "yes") ? " checked='checked'" : "" ) . " value='yes' /> Check the box to make the torrent VIP only.";
}[color=rgb(251, 160, 38)]In torrents.php search : (same for index.php / torrents-search.php & torrents-today.php)[/color]
torrents.announce,Add after :
torrents.vip,[color=rgb(251, 160, 38)]In download.php search :[/color]
$fn = "$torrent_dir/$id.torrent";Add after : (
$res = SQL_Query_exec("SELECT filename, vip FROM torrents WHERE id = $id");
$arr = mysqli_fetch_assoc($res);
$name = $arr['filename'];
$vip = $arr['vip'];
if ($vip == "yes" && $CURUSER["class"]<4 ){
show_error_msg("Error","<b>You can not download, you have to be VIP</b>",1);
}[color=rgb(251, 160, 38)]In backend/functions.php search :[/color]
if ($row["freeleech"] == 1)
$dispname .= " <img src='images/free.gif' border='0' alt='' />";Add after :
if ($row["vip"] == "yes")
$dispname .= " <img src='images/vip.gif' border='0' alt='' />";Put the image "vip.gif" in your images folder at the root of your site.
little extra you dont need this but a index block for vip torrents
[color=rgb(251, 160, 38)]in config.php add[/color]
$site_config['VIPTORRENT'] = true; //Enable vip torrents[color=rgb(251, 160, 38)]in index.php add[/color]
// VIP Torrents
if ($site_config['VIPTORRENT']){
include("/vip-torrents.php");
}add vip-torrents.php to root
Any errors and you can check code here
[URL unfurl="true"]https://github.com/M-jay84/TTv3/tree/master/upload[/url]

