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
[MOD] View/Hide Porn Content
Controls ·  Search New posts · Mark unread

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

Unknown User
2009-01-14 14:21:21
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

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!
Unknown User
2009-01-14 21:19:13
iv had this on my tracker for a long time too. once hidden they do not see xxx category or any xxx on torrent table only if using images they may show on latest images but i have a special pic for them..... the last few mods thats released are old.. not new... whats the crack?
Unknown User
2009-01-14 21:24:23
sorry, don't understando so much english  :)

But your problem is with the uploaded image of the torrent?

Good ideia, I disable image upload in my tracker and I don't think this!
Unknown User
2009-01-15 03:06:11
no i have no problems at all. i a saying this is not a NEW mod. it is already out there. i have it on my site for long time.
Unknown User
2009-01-15 20:03:18
Really, my ideas are limited LOL...
Unknown User
2009-01-15 22:19:32
"williamokano, post: 51685":
Really, my ideas are limited LOL...


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

its not your idea lol no offence..
Unknown User
2009-01-17 00:07:06
I mean, My Ideas to do new mods, Then, i have to copy/port the olders.
Unknown User
2009-02-11 21:51:46
Thank you for this one.

I wonder if you could create that mode, just with the change that each torrent has to be chcked if it is or not before uploading, so people can decide if they want to see it or not.

I have a lossless music website and would like to add MP3s to it (in the existing categories), but some users do not tolerate them, so I want to offer them not to having to look at them.

So yeah, that would be this codec, just with every thorrent has to be checked individually.

Thank you!
Unknown User
2009-02-12 01:40:56
you mean like this... which ever you check will not show.

12_02_2009_01_40_05.png
12_02_2009_01_40_05.png
Unknown User
2009-07-06 01:42:49
This has been posted [url="http://www.torrenttrader.org/index.php?showtopic=7636"]here[/url] for a while now...
Unknown User
2011-01-28 14:46:29
How can i add this here

<?php

//

//  TorrentTrader v2.x

// This file was last updated: 4/Sept/2007

//

// http://www.torrenttrader.org

//

//

require "backend/functions.php";

dbconn(false);



//check permissions

if ($site_config["MEMBERSONLY"]){

loggedinonly();



if($CURUSER["view_torrents"]=="no")

show_error_msg("??????","??? ????? ?? ???????? ?? ??????? Torrents",1);

}





stdhead("Top 15 Torrents");



begin_frame("Top15 Torrents");



echo "<center><img src='/images/smilies/bow-down.gif></center>";

$need_seeds = mysql_query("SELECT torrents.id, torrents.name, torrents.external, torrents.owner, torrents.seeders, torrents.leechers, categories.image as cat_image FROM torrents inner join categories on torrents.category = categories.id ORDER BY seeders + leechers DESC, seeders DESC, added ASC LIMIT 15")or die(mysql_error());







if (mysql_num_rows($need_seeds) > 0) {



print("<table align=center cellpadding=0 cellspacing=0 class=table_table width=95% border=1>");

print("<td class=table_head align=center width=80>" .CATEGORY. "</td>");

print("<td class=table_head align=center>" .TNAME. "</td>");

print("<td class=table_head align=center width=80>" .SEEDS. "</td>");

print("<td class=table_head align=center width=80>" .LEECH. "</td>");



while ($row2 = mysql_fetch_array($need_seeds)) {

if($row2["external"] == 'yes') {

$type = "External";

} else {

$type = "Local";

}



$torrname = htmlspecialchars($row2["name"]);

if (strlen($torrname) > 60)

$torrname = substr($torrname, 0, 60) . "...";



$ttl = (28*24) - floor((utc_to_tz_time() - utc_to_tz_time($row2["added"])) / 3600);



$username = mysql_query("SELECT id, username FROM users WHERE id = $row2[owner]");

$row = mysql_fetch_array($username);





echo "<tr>";

echo "<td class=table_col2 align=center><img src=images/categories/".$row2["cat_image"].">";

echo "<td class=table_col1 align=left><a href=\"torrents-details.php?id=$row2[id]\">$torrname</a></td>";

echo "<td class=table_col1 align=center><font color=green>$row2[seeders]</td>";

echo "<td class=table_col2 align=center><font color=red>$row2[leechers]</td>";

print("</tr>");

}

echo "</table><br></br>";



} else {

print("<b><CENTER>?????? Torrent ??? ?????????? ???????????</CENTER></b><BR><BR>");

}





end_frame();

stdfoot();



?>
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