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
[HACK] Site wide Free leech on/off in st
Controls ·  Search New posts · Mark unread

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

Unknown User
2008-03-03 10:58:14
Now this will only work if you have the free leech installed. I took this from torrent strike and modified it a little so it will work here. it also has where you can add a category number for categories that always stay free leech so when you turn off free leech they stay on. now it is just a normal click here sentence but you could always replace that with a button.

in admincp.php find:

if ($action=="freetorrents"){

stdhead("Free Leech Torrent Management");

navmenu();



$search = trim($search);



if ($search != '' ){

$whereand = "AND name LIKE " . sqlesc("%$search%") . "";

}





$res2 = mysql_query("SELECT COUNT(*) FROM torrents WHERE freeleech='1' $whereand");

$row = mysql_fetch_array($res2);

$count = $row[0];



$perpage = 50;



list($pagertop, $pagerbottom, $limit) = pager($perpage, $count, "admincp.php?action=freetorrents&");



begin_frame("Free Leech Torrent Management");



print("<CENTER><form method=get action=?>\n");

print("<input type=hidden name=action value=torrentmanage>\n");

print("" . SEARCH . ": <input type=text size=30 name=search>\n");

print("<input type=submit value='Search'>\n");

print("</form></CENTER>\n");



echo $pagertop;

?>

<CENTER><table align=center cellpadding="0" cellspacing="0" class="table_table" width="100%" border="1">

<tr>

<td class=table_head align=center>Name</td>

<td class=table_head align=center>Visible</td>

<td class=table_head align=center>Banned</td>

<td class=table_head align=center>Seeders</td>

<td class=table_head align=center>Leechers</td>

<td class=table_head align=center>Edit?</td>

</tr>

<?

$rqq = "SELECT id, name, seeders, leechers, visible, banned FROM torrents WHERE freeleech='1' $whereand ORDER BY name $limit";

$resqq = mysql_query($rqq);



while ($row = mysql_fetch_array($resqq)){

extract ($row);



$char1 = 35; //cut name length

$smallname = CutName(htmlspecialchars($row["name"]), $char1);



echo "<tr><td class=table_col1>" . $smallname . "</td><td class=table_col2>$row[visible]</td><td class=table_col1>$row[banned]</td><td class=table_col2>$row[seeders]</td><td class=table_col1>$row[leechers]</td><td class=table_col2><a href=\"torrents-edit.php?returnto=" . urlencode($_SERVER["REQUEST_URI"]) . "&amp;id=" . $row["id"] . "\"><font size=1 face=Verdana>EDIT</a></td></tr>\n";

}



echo "</table></CENTER>\n";



print($pagerbottom);



end_frame();

stdfoot();

}
and replace with:




#======================================================================#

# Free Torrents

#======================================================================#



if ($action=="freetorrents"){

stdhead("Free Leech Torrent Management");

navmenu();

begin_frame("Free Leech Torrent Management");

$search = trim($search);



if ($search != '' ){

$whereand = "AND name LIKE " . sqlesc("%$search%") . "";

}



if ($do=="setallfree") {

mysql_query("UPDATE torrents SET freeleech='1' WHERE freeleech='0'");

print("<font size=2 color=red><center>Success, All torrents have been set free..</b></center></font><br>\n");



}else



if ($do=="setallnormal") {

mysql_query("UPDATE torrents SET freeleech='0' WHERE freeleech='1' AND category!='50'");

print("<font size=2 color=red><center><b>Success, All torrents have been set normal..</b></center></font><br>\n");



}



$res2 = mysql_query("SELECT COUNT(*) FROM torrents WHERE freeleech='1' $whereand");

$row = mysql_fetch_array($res2);

$count = $row[0];



$perpage = 50;



list($pagertop, $pagerbottom, $limit) = pager($perpage, $count, "admincp.php?action=freetorrents&");



print("<CENTER><form method=get action=?>\n");

print("<input type=hidden name=action value=torrentmanage>\n");

print("" . SEARCH . ": <input type=text size=30 name=search>\n");

print("<input type=submit value='Search'>\n");

print("</form></CENTER>\n");



echo "<br>";

print("<font size=2><center>Click <a href=admincp.php?action=freetorrents&do=setallfree><b><u>here</b></u></a> to set all torrents free.. </center></font><br><br> <font size=2><center>Click <a href=admincp.php?action=freetorrents&do=setallnormal><b><u>here</u></b></a> to set all torrents normal..</center></font> \n");



echo $pagertop;

?>

<CENTER><table align=center cellpadding="0" cellspacing="0" class="table_table" width="100%" border="1">

<tr>

<td class=table_head align=center>Name</td>

<td class=table_head align=center>Visible</td>

<td class=table_head align=center>Banned</td>

<td class=table_head align=center>Seeders</td>

<td class=table_head align=center>Leechers</td>

<td class=table_head align=center>Edit?</td>

</tr>

<?

$rqq = "SELECT id, name, seeders, leechers, visible, banned FROM torrents WHERE freeleech='1' $whereand ORDER BY name $limit";

$resqq = mysql_query($rqq);



while ($row = mysql_fetch_array($resqq)){

extract ($row);



$char1 = 35; //cut name length

$smallname = CutName(htmlspecialchars($row["name"]), $char1);



echo "<tr><td class=table_col1>" . $smallname . "</td><td class=table_col2>$row[visible]</td><td class=table_col1>$row[banned]</td><td class=table_col2>$row[seeders]</td><td class=table_col1>$row[leechers]</td><td class=table_col2><a href=\"torrents-edit.php?returnto=" . urlencode($_SERVER["REQUEST_URI"]) . "&amp;id=" . $row["id"] . "\"><font size=1 face=Verdana>EDIT</a></td></tr>\n";

}



echo "</table></CENTER>\n";



print($pagerbottom);



end_frame();

stdfoot();

}

#======================================================================#

# END Free Torrents

#======================================================================#







now if you want to change the number of the category that always stays free then find this code and change the number to your category number:





category!='50'




now you can go into the free leech in your staff cp and use the function. i have tested this on v2.03 and it works. i am also working on a code that will set certain categories automatically to freeleech on upload so if you have any ideas let me know. enjoy :)
Unknown User
2008-07-21 01:26:14
vip's have reported their dl being counted :'(
Unknown User
2008-07-21 09:56:08
thanks
Unknown User
2008-07-21 09:58:24
with the freeleech turned on if you have the freeleech mod installed then vip download will not count. as far as vip download still counting to do with this mod. this mod is just an easy way to turn freeleech on and off.
Unknown User
2008-10-05 12:51:01
I put all the torrent free but not all are changed

some stay normal from differents categories
Unknown User
2008-10-05 13:36:53
all of mine except for maybe 1 or two change. every once and a while i will see one torrent on a page that i have to manually change and it is not a category thing but just a small little glitch in the system. so if you are having category problems with the freeleech on and off where the whole cat does not change then i do not really know what to tell you.
Unknown User
2008-10-05 13:58:58
439/458 are on freeleech

the 21 else are on all categories

[url="http://devscorner.xyz/applications/core/interface/file/attachment.php?id=2949"]admincp.php[/url]
admincp.php
Download
Unknown User
2008-11-06 19:17:17
How to modify to have ALL in FreeLeech ??
Unknown User
2008-11-07 00:05:04
you would have to add a table in the sql that would get updated when freeleech is on or off and then add a query or add to the query in torrents-upload.php that looks to see if it is on or off and if it is on then it makes the torrent freeleech automatically on upload. when i get some problems that i have at the moment sorted i will try to look into this.
Unknown User
2008-12-05 19:41:08
Hey friend... is possible you create FREE TORRENTS by SIZE ?

for exemple:

All torrents by size 2GB or more set's is FREE

It's possible ?

Help-me please.........

Thank's for your help !
Unknown User
2009-02-09 19:17:45
When I click to give them into normal that do not do it and yet that m' informed although they are become again normal but when I look at the details of a torrent it is always in freelech
Unknown User
2009-07-16 14:26:32
This mod is not working as advertised. It is not making my entire site free leech. It only does like 10 or 12
Unknown User
2009-07-16 19:50:28
change

if ($do=="setallfree") {

mysql_query("UPDATE torrents SET freeleech='1' WHERE freeleech='0'");

print("<font size=2 color=red><center>Success, All torrents have been set free..</b></center></font><br>\n");



}else



if ($do=="setallnormal") {

mysql_query("UPDATE torrents SET freeleech='0' WHERE freeleech='1' AND category!='50'");

print("<font size=2 color=red><center><b>Success, All torrents have been set normal..</b></center></font><br>\n");





with

if ($do=="setallfree") {

mysql_query("UPDATE torrents SET freeleech = '1'");

print("<font size=2 color=red><center>Success, All torrents have been set free..</b></center></font><br>\n");



}else



if ($do=="setallnormal") {

mysql_query("UPDATE torrents SET freeleech = '0'");

print("<font size=2 color=red><center><b>Success, All torrents have been set normal..</b></center></font><br>\n");
Unknown User
2009-09-06 06:10:20
How to add a torrent to the choice freeleech in bonuses?
Unknown User
2009-11-14 06:12:15
Thanks work perfect for me .... ;)
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: 9
  • Members: 0
  • Guests online: 9
  • Comments: 3
  • Messages: 1,728