View XXX torrents

Started by rickandmary, July 20, 2012, 05:37:37 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.



How can the checkbox for the category also be hidden in browse.php?


This allows members to choose weither or not to view xxx torrents. This wasnt written by me i just adapted it from whats in v2 modifications to work with 08 source so credit to the author.

ALTER TABLE `users` ADD `view_xxx` ENUM( 'yes', 'no' ) DEFAULT 'no' NOT NULL

In my.php wherever you want it to show add

tr("View XXX Torrents", "<input type='checkbox' name='view_xxx'" .  ($CURUSER["view_xxx"] == "yes" ? " checked='checked'" : "") . "/>By Default XXX categorys will not be<br/> visible on the <a href='browse.php'>browse</a> Tick to view XXX torrents",1);

In takeprofedit.php add

$view_xxx =  (isset($_POST["view_xxx"])!= "" ? "yes" : "no");
$updateset[] = "view_xxx = " . sqlesc($view_xxx);

finally in browse.php below
$wherea[] = "visible = 'yes'";

if ($CURUSER["view_xxx"] != "yes")
  $wherea[] = "category != '10'";

change category number to your xxx category