Dificulty: Easy
Instalation Time: Over 5 minutes
Obs.:
1 - Backup your files and database before install Any Mod/Addon/Hack.
2 - Used a New and clean TorrentTrader V2.05 Script of torrenttrader.
3 - Mod made running on localhost.
4 - Errors found on my tracker: Any
Hide xxx files
Hi, let's start the [MOD]ification;
First run this sql
Then... let's do the part where you can hide/show porn xxx category
In the account.php find:
I think it be showed in some other places but it's hidden enough from the public.
Here's the original V1 Mod:
[url="http://www.torrenttrader.org/index.php?showtopic=2610"]http://www.torrenttrader.org/index.php?showtopic=2610[/url]
@author: nightmare
@ported: williamokano @ sauron [url="http://www.planetshare.org"]http://www.planetshare.org[/url]
Based, but not copied!
Instalation Time: Over 5 minutes
Obs.:
1 - Backup your files and database before install Any Mod/Addon/Hack.
2 - Used a New and clean TorrentTrader V2.05 Script of torrenttrader.
3 - Mod made running on localhost.
4 - Errors found on my tracker: Any
Hide xxx files
Hi, let's start the [MOD]ification;
First run this sql
ALTER TABLE `users` ADD `view_xxx` ENUM( 'yes', 'no' ) NOT NULL DEFAULT 'no' COMMENT 'see xxx';Then... let's do the part where you can hide/show porn xxx category
In the account.php find:
$acceptpms = $CURUSER["acceptpms"] == "yes";and before add: //Mod by williamokano
//Hide Porn XXX content
print("<TR><TD align=right class=table_col1><B>View XXX Torrents:</B> </TD><TD align=left class=table_col1><input type=checkbox name=view_xxx" . ($CURUSER["view_xxx"] == "yes" ? " checked" : "") . "> Please unselect this option if you would not like to view XXX torrents.</td></tr>");
Now... Find:
$acceptpms = $_POST["acceptpms"];
And before add:
$view_xxx = ($_POST["view_xxx"] != "" ? "yes" : "no");
Find:
$updateset[] = "acceptpms = ".sqlesc($acceptpms);
Before add:
$updateset[] = "view_xxx = ".sqlesc($view_xxx);
Now, we have finished in this file.
Now, backup and edit index.php
let's start
In index.php find:
begin_frame("Latest Torrents");
Below add
//Hide porn Mod By Williamokano
$wherea=array();
$wherea[] = "banned = 'no'";
$wherea[] = "visible = 'yes'";
//Here we define the categories blocked
if ($CURUSER["view_xxx"]!="yes") {
$wherea[] = "torrents.category != '26'";
$wherea[] = "torrents.category != '52'";
//an exemplo, change for your porn cat id
}
$where = implode(" AND ", $wherea);
Now find:
WHERE visible = 'yes' AND banned = 'no' ORDER
REPLACE by:
WHERE ". $where ." ORDER
Now.... let's go to the others pages hide more porn content
In the torrents.php find:
$wherea[] = "visible = 'yes'";
before add:
//Hide porn by williamokano
if ($CURUSER["view_xxx"]!="yes") {
$wherea[] = "category != '26'";
$wherea[] = "category != '52'";
}
Now, in torrents-search.php find:
$wherea[] = "banned = 'no'";
before add:
//hide porn by williamokano
if ($CURUSER["view_xxx"]!="yes") {
$wherea[] = "category != '52'";
$wherea[] = "category != '26'";
}I think it be showed in some other places but it's hidden enough from the public.
Here's the original V1 Mod:
[url="http://www.torrenttrader.org/index.php?showtopic=2610"]http://www.torrenttrader.org/index.php?showtopic=2610[/url]
@author: nightmare
@ported: williamokano @ sauron [url="http://www.planetshare.org"]http://www.planetshare.org[/url]
Based, but not copied!