Thread: Freelech mod
View Single Post
  #1  
Old 30th June 2010, 18:15
danbank danbank is offline
Member
 
Join Date: Apr 2010
P2P
Posts: 13
Default Freelech mod
This is made for Tbdev 09, just edit by your self.

SQL:
PHP Code:
alter table torrents add freeleech enum('yes','no'not null default 'no'
edit.php
PHP Code:
$HTMLOUT  .= tr($lang['edit_freeleech'], "<input type='checkbox' name='freeleech'" . (($row["freeleech"] == "yes") ? " checked='checked'" "" ) . " value='yes' /> {$lang['edit_freeleech_text']}"1); 
takeedit.php
PHP Code:
$updateset[] = "freeleech = '" . ( isset($_POST['freeleech']) ? 'yes' 'no') . "'"
open announce.php change the query to something like this
PHP Code:
$res mysql_query("SELECT id, banned, seeders + leechers AS numpeers, added AS ts, freeleech FROM torrents WHERE info_hash = " .sqlesc($info_hash));//" . hash_where("info_hash", $info_hash)); 
Then you add this
PHP Code:
$freeleech $torrent["freeleech"]; 
And BEFORE if ($upthis > 0 || $downthis > 0) add:
PHP Code:
if ($freeleech == 'yes'$downthis 0
Reply With Quote
The Following 3 Users Say Thank You to danbank For This Useful Post:
DirectorX (20th November 2013), KnightRaider (11th June 2013), Tibys08 (29th May 2011)