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
VIP only torrents
Controls ·  Search New posts · Mark unread

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

Unknown User
2011-08-04 15:41:37
Heavily based on [url="http://www.torrenttrader.pw/index.php?showtopic=11180"]http://www.torrenttrader.pw/index.php?showtopic=11180[/url] < great original post which makes making VIP only torrents so much simpler

first make new category like VIP>VIP add image to root etc [find one on google] then goto sql database and take down category ID number for newly made VIP category, then:

In Download.php

find :

$res = mysql_query("SELECT filename, external, announce, FROM torrents WHERE id =".intval($id));
$row = mysql_fetch_array($res);
$trackerurl = $row['announce'];

$torrent_dir = $site_config["torrent_dir"];

$fn = "$torrent_dir/$id.torrent";

Replace with :

$res = mysql_query("SELECT filename, external, announce, category FROM torrents WHERE id =".intval($id));
$row = mysql_fetch_array($res);
$trackerurl = $row['announce'];

$torrent_dir = $site_config["torrent_dir"];

$fn = "$torrent_dir/$id.torrent";

and add after :

///////////////////////////////////////////////////////////////////////////////////////////////
//////////////// VIP
if(($CURUSER["class"]<3) && ($row['category']) == YY){
show_error_msg("Sorry","you are not a VIP",1);
}
///////////////////////////////////////////////////////////////////////////////////////////////
//////////////// END VIP

$row['category'] == YY) (YY = ID number of your VIP category which you taken down previously)

as said all praise must go to above post really.

WHAT DOES THIS DO:

It allows all members to view VIP torrents but only VIP and above members to download torrent, works fine on V2.06. Some people might like to modify to stop users other than VIP from viewing VIP torrents but I personally think it adds an initiative for users to donate and become VIP etc.

long live torrent trader and please be nice as this is my first mod lol
Unknown User
2011-09-20 16:46:38
Dobby2007 thanks for the mod, tell me how to do multiple categories?  :angry:
Unknown User
2011-09-21 17:04:38
"Ronsen, post: 74689":
Dobby2007 thanks for the mod, tell me how to do multiple categories?   :angry:

Ok say if like on my site you want VIP only torrents with XXX catergory as VIP too then I have this below in download.php

///////////////////////////////////////////////////////////////////////////////////////////////

////////////////   VIP

if(($CURUSER["class"]<3) && ($row['category']) == 56){

show_error_msg("Sorry","you are not a VIP so you cannot download",1);

}

///////////////////////////////////////////////////////////////////////////////////////////////

////////////////   END VIP

///////////////////////////////////////////////////////////////////////////////////////////////

////////////////   PORN VIP

if(($CURUSER["class"]<3) && ($row['category']) == 59){

show_error_msg("Sorry","you are not a VIP so you cannot download",1);

}

///////////////////////////////////////////////////////////////////////////////////////////////

////////////////   END PORN VIP
notice in the above




($row['category']) == 56)





you need to change "56" to number of your category of which you want to make VIP only then repeat code like above below this in download.php with other category number/s



NOT TESTED > you could always try





($row['category']) == 56, 59)



but as said not tested, but doing it category after category works as it has been on my site now for a while  :D

hope this helps
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