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
User Posts

Go to Profile

FLS — 2012-04-28 16:03:02 in v2 Only Mods Complete
I use 2.08 but in logs not write anything.
FLS — 2012-04-28 15:50:43 in v2 Only Mods Complete
Only that:

Database Error.

Database Error. Please report this to an administrator.

It seems that can not write nothing in the database...
FLS — 2012-04-28 03:20:46 in v2 Only Mods Complete
This mod is very useful and works perfectly on my tracker TT v2.07.

But now I want to pass on v2.8. I made ??the necessary changes but when I set a user in FLS I get an database error.

Can you help me please?
At first I did not understand what I must to do exactly, but I managed to hide the main page.

In login_block.php I included after  <?php  loggedinonly function:

loggedinonly ();
After that I included in account-login.php, account-recover.php and account-signup.php, after dbconn(); your code:


$site_config["LEFTNAV"] = $site_config["MIDDLENAV"] = $site_config["RIGHTNAV"] = false;


and now everything is as I wanted to be.

Thank you very much ArcticWolf, you are the best   :D
This mod is realy great   :)    but something upsets me...

If you access the site with a simple link, for example: [url="http://www.yoursite.com"]http://www.torrents-area.net[/url] , you are directed in the main page: index.php

I would like to go directly to the login page: account-login.php and I don't know where I must to change.

Can you help me please with this problem?
Thank you very much ArcticWolf, she's looks great and works perfectly  :)
This mod is great and works perfectly on my TT v2.07 tracker   :)

But now I want to go on v2.08, I made ??the necessary changes, but when I make a new announcement I receive this error:

Error! / Dont leave any fields blank!

Can you help me please?  (I attached modified files).

[url="http://devscorner.xyz/applications/core/interface/file/attachment.php?id=5702"]announcements.rar[/url]
At the first I wanted to use the one posted at 'Mods Complete TT v2.08 Only', I checked him on 2.08 but initially it did not work.

Now it works well but I do not like the size options...
I've modified this mod from TBDev to TorrentTrader and I full checked him on the v2.07

I also checked on v2.08 and it works very well, you only need to replace mysql_query with SQL_Query_exec

Extract the attached archive and copy the files in your root folder.

Insert into admincp.php (Staff CP Menu) this line:



<td align="center"><a href=setfreeleech.php><img src="images/admin/freeleech.png" border=0 width=32 height=32><BR>Freeleech Management</a><BR></td>




[url="http://devscorner.xyz/applications/core/interface/file/attachment.php?id=5684"]setfreeleech.rar[/url]
Great work   :)   thank you ArcticWolf

I see in paypal.php:

$old = date($row['donoruntil']);

but TorrentTrader don't has this function

It would be nice if you are publish and this part  :D
Nfo Ripper — 2012-03-27 15:56:27 in v2.08 Mods Completed
[size=18px]I adapted this very useful mod for uploaders from tbdev.[/size]

Create a new file called <b>nforipper.php</b> with this code:



<?

require_once("backend/functions.php");

dbconn(false);

loggedinonly();

stdhead("NFO Ripper",true,false);

begin_frame("NFO Ripper");

echo "<br></br><center>";

if (get_user_class() < 1) {

print("<table border=1><td align=center width=500 height=50><font size=3 color=red><b>Access Denied!</b></font></td></table><br>");

end_frame();

stdfoot(); }

if (get_user_class() >= 1)

{

echo "<h2 align=center>".T_("EXTRACT_TEXT").":</h2>";

$action = $_POST["action"];

$nfo = $_POST["nfo"];

if ($action == "rip")

{

$parsed_nfo="";

for ($i=0;$i<strlen($nfo);$i++)

{

if ( ((ord($nfo[$i]) >= 32) && (ord($nfo[$i]) <= 127)) || (ord($nfo[$i]) == 228) || (ord($nfo[$i]) == 229) || (ord($nfo[$i]) == 246) || (ord($nfo[$i]) == 197) || (ord($nfo[$i]) == 196) || (ord($nfo[$i]) == 214) )

{

$parsed_nfo.=$nfo[$i];

}

elseif (ord($nfo[$i]) == 13)

{

$parsed_nfo.="<br>";  

}

}

$parsed_nfo = split("<br>",$parsed_nfo);

echo "<table class=ttable_headouter width=90%><tr><td align=left>";

echo "<h1 align=left>".T_("EXTRACTED").":</h1>";

echo "<hr size=1>";

for ($i=0;$i<count($parsed_nfo);$i++)

{

if ( (trim($parsed_nfo[$i]) == "") && (trim($parsed_nfo[$i+1]) == "") ) { } else

{

echo trim($parsed_nfo[$i])."<br>";

}

}

echo "<br><hr size=1>";

echo "</td></tr></table>";

echo "</center>";

end_frame();

stdfoot();

exit;

}

?>

<form action="nforipper.php" method="post">

<input type="hidden" name="action" value="rip">

<textarea name="nfo" cols=80 rows=30></textarea>

<p><input type=submit value=Ripp-NFO>

<br></br>



<?

}

end_frame();

stdfoot();

?>

Add these in language/english.php:




$LANG["EXTRACT_TEXT"] = "Extracts only the text from a NFO file";

$LANG["EXTRACTED"] = "Extracted text";






Find in backend/bbcode.php:





 <br />

 <a href="javascript:PopMoreSmiles('<?php echo $form; ?>','<?php echo $name; ?>');"><?php echo "[".T_("MORE_SMILIES")."]";?></a><br />

 <a href="javascript:PopMoreTags();"><?php echo "[".T_("MORE_TAGS")."]";?></a><br />






and replace with this code:





 <div style="margin-top:5px"><a href="javascript:PopMoreSmiles('<?php echo $form; ?>','<?php echo $name; ?>');"><?php echo "[".T_("MORE_SMILIES")."]";?></a></div>

 <div style="margin-top:3px"><a href="nforipper.php">[NFO Ripper]</a></div>

 <div style="margin-top:3px"><a href="javascript:PopMoreTags();"><?php echo "[".T_("MORE_TAGS")."]";?></a></div>




Because v2.08 has only a few smilies, I assembled a packet of 80 that can be seen very well and on the black themes.

There were also written in bbcode.php and smilies.php. See additional files.

[url="http://devscorner.xyz/applications/core/interface/file/attachment.php?id=5627"]more.smiles.rar[/url]



[size=18px]This mod works very well on my tracker TT v2.07, so I thought not to be selfish and share it to all members[/size]   :)

Create a file called inactiveusers.php and upload it in your root:

<?

//-----------------------------------------------//

//  Inactive Users Management //

//-----------------------------------------------//

//  Modified for TorrentTrader v2.xx by BigMax   //

//-----------------------------------------------//



require_once("backend/functions.php");

dbconn(true);

loggedinonly();



if(get_user_class() < 6)

show_error_msg("Acces Denied","I smelled a rat here!");



// Config

$sitename = "".$site_config['SITENAME'].""; // Sitename

$siteurl = "".$site_config['SITEURL'].""; // Default site url

$replyto = "".$site_config['SITEEMAIL'].""; // The Reply-to email

$record_mail = true; // Set this true or false . If you set this true every time whene you send a mail the time , userid , and the number of mail sent will be recorded

$days = 30; // Number of days of inactivite

// End config



if ($_SERVER["REQUEST_METHOD"] == "POST")

{



$action = $_POST["action"];

$cday = 0 + $_POST["cday"];



if (!is_numeric($cday))

show_error_msg("Err","Smell rat !");



if (empty($_POST["userid"]) && (($action == "deluser") || ($action == "mail")))

show_error_msg("Err","For this to work you must select at least a user !");



if ($action == "deluser" && (!empty($_POST["userid"])))

{

mysql_query("DELETE FROM users WHERE id IN (" . implode(", ", $_POST['userid']) . ") ");

show_error_msg("Successfully","You have successfully deleted the selected accounts! <a href="".$BASEURL."/inactiveusers.php">Go back</a>");

}



if ($action == "cday" && ($cday > $days))

$days = $cday;



if ($action == "disable" && (!empty($_POST["userid"])))

{

$res = mysql_query("SELECT id, modcomment FROM users WHERE id IN (" . implode(", ", $_POST['userid']) . ") ORDER BY id DESC ")or sqlerr(__FILE__, __LINE__);

while ($arr = mysql_fetch_array($res))

{

$id = 0 + $arr["id"];

$cname = $CURUSER["username"];

$modcomment = $arr["modcomment"];

$modcomment = gmdate("Y-m-d") . " - Disabled for inactivity by $cname.n".$modcomment;



mysql_query("UPDATE users SET modcomment=".sqlesc($modcomment).", enabled='no' WHERE id=$id ") or sqlerr(__FILE__, __LINE__);

}

show_error_msg("Successfully","You have successfully disabled the selected accounts! <a href="".$BASEURL."/inactiveusers.php">Go back</a>");

}



if ($action == "mail" && (!empty($_POST["userid"])))

{



$res = mysql_query("SELECT id, email , username, added, last_access FROM users WHERE id IN (" . implode(", ", $_POST['userid']) . ") ORDER BY last_access DESC ");

$count = mysql_num_rows($res);

while ($arr = mysql_fetch_array($res))

{

$id = $arr["id"];

$username = htmlspecialchars($arr["username"]);

$email = htmlspecialchars($arr["email"]);

$added = $arr["added"];

$last_access = $arr["last_access"];



$subject = "Warning for inactive account on $sitename";

$message = "

Your account on  $sitename  was marked as inactive and will be deleted within a few days.

If you want to remain member at $sitename you must just login and download something nice!



Your username it's:  $username

Account created on:  $added

Last visit on site:  $last_access



You can login here:  $siteurl/account-login.php

Recovery password: $siteurl/account-recover.php

";

$headers = 'From: no-reply@' . $sitename . "rn" .

'Reply-To:' . $replyto . "rn" .

'X-Mailer: PHP/' . phpversion();



$mail= @mail($email, $subject, $message, $headers);

}



if($record_mail){

$date = time();

$userid = 0 + $CURUSER["id"];

if ($count > 0 && $mail)

mysql_query("update avps set value_i='$date', value_u='$count', value_s='$userid' WHERE arg='inactivemail' ") or sqlerr(__FILE__, __LINE__);

}



if ($mail)

show_error_msg("Success", "Messages sent.");

else

show_error_msg("Error", "Try again.");

}

}

stdhead("Inactive Users");

begin_frame("Inactive Users");



$dt = sqlesc(get_date_time(gmtime() - ($days * 86400)));



$res= mysql_query("SELECT id,username,class,email,uploaded,downloaded,last_access,ip,added FROM users WHERE last_access<$dt AND status='confirmed' AND enabled='yes' ORDER BY last_access DESC ") or sqlerr(__FILE__, __LINE__);

$count = mysql_num_rows($res);

if ($count > 0){

?>

<script type="text/javascript" LANGUAGE="JavaScript">



<!-- Begin

var checkflag = "false";

function check(field) {

if (checkflag == "false") {

for (i = 0; i < field.length; i++) {

field[i].checked = true;}

checkflag = "true";

return "Uncheck All"; }

else {

for (i = 0; i < field.length; i++) {

field[i].checked = false; }

checkflag = "false";

return "Check All"; }

}

// End -->

</script>

<?

print("<form action="inactiveusers.php" method="post">");

print("<br><table class=table_table align=center border=1 cellspacing=0 cellpadding=5><tr>n");

print("<td class=table_head>Number of days</td><td class=table_head><input type="text" name="cday" size="10" value="".($cday > $days ? $cday : $days)."" maxlength="3" /></td>");

print("<td class="table_head"><input type="submit" value="Change" /><input type="hidden" name='action' value="cday" />");

print("</td></tr></table></form><br/>");



print("<h2 align=center>".$count." accounts inactive for longer than ".$days." days.</h2>");

print("<form action="inactiveusers.php" method="post">");

print("<table class=table_table align=center width=800 border=1 cellspacing=0 cellpadding=5><tr>n");

print("<td class=table_head>Username</td>");

print("<td class=table_head>Class</td>");

print("<td class=table_head>IP</td>");

print("<td class=table_head>Ratio</td>");

print("<td class=table_head>Join Date</td>");

print("<td class=table_head>Last Seen</td>");

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



while ($arr = mysql_fetch_assoc($res)) {

$ratio = ($arr["downloaded"] > 0 ? number_format($arr["uploaded"] / $arr["downloaded"], 3) : ($arr["uploaded"] > 0 ? "Inf." : "---"));

$ratio = "<font color=" . get_ratio_color($ratio) . ">$ratio</font>";

$downloaded = mksize($arr["downloaded"]);

$uploaded = mksize($arr["uploaded"]);

$last_seen = (($arr["last_access"] == "0000-00-00 00:00:00") ? "never" : "".get_elapsed_time(sql_timestamp_to_unix_timestamp($arr["last_access"]))."&nbsp;ago" );

$class=get_user_class_name($arr["class"]);

$joindate = substr($arr['added'], 0, strpos($arr['added'], " "));

print("<tr>");



// Make a choise here:

print("<td><a href="account-details.php?id=".$arr["id"]."">".htmlspecialchars($arr["username"])."</a></td>"); //=== Use this line if you did not have the function class_user ===//

//print("<td><a href="account-details.php?id=".$arr["id"].""><b>".class_user($arr["username"])."</b></a></td>"); //=== Use this line if you have the function class_user ===//



print("<td>".$class."</td>");

print("<td>".($arr["ip"] == "" ? "----" : $arr["ip"] )."</td>");

print("<td><b>".$ratio."</b><font class="small"> | Dl:<font color=red><b>".$downloaded."</b></font> | Up:<font color=lime><b>".$uploaded."</b></font></font></td>");

print("<td>".$joindate."</td>");

print("<td>".$last_seen."</td>");



print("<td align="center" bgcolor="#FF0000"><input type="checkbox" name="userid[]" value="".$arr["id"]."" /></td>");

print("</tr>");

}

print("<tr><td colspan="7" class="table_head" align="center">

<select name="action">

<option value="mail">Send mail</option>

<option value="deluser">Delete users</option>

<option value="disable">Disable Accounts</option>

</select>&nbsp;&nbsp;<input type="submit" name="submit" value="Apply Changes"/>&nbsp;&nbsp;<input type="button" value="Check all" onClick="this.value=check(form)" /></td></tr>");



if($record_mail){

$ress = mysql_query("SELECT avps.value_s AS userid, avps.value_i AS last_mail, avps.value_u AS mails, users.username FROM avps LEFT JOIN users ON avps.value_s=users.id WHERE avps.arg='inactivemail' LIMIT 1");

$date = mysql_fetch_assoc($ress);

if ($date["last_mail"] > 0 )

print("<tr><td colspan="7" class="table_head" align="center" style="color:red;">Last mail sent by <a href="account-details.php?id=".$date["userid"]."">".$date["username"]."</a> on <b>".gmdate("d M Y",$date["last_mail"])."</b> and <b>".$date["mails"]."</b> mail".($date["mails"] > 1 ? "s" : "")." was sent!</td></tr>");

}



print("</table></form>");

}else{

print("<h2 align=center>No account inactive for longer than ".$days." days.</h2>");

}

end_frame();

stdfoot();

die;

?>
Extract attached file avps.zip and import in your database.



Upload attached file inactiveusers.png in: /images/admin



Add in admincp.php (Staff CP):


<td align=center><a href=inactiveusers.php><img src="images/admin/inactiveusers.png" border=0 width=32 height=32><br>Inactive Users</a><BR></td>

[url="http://devscorner.xyz/applications/core/interface/file/attachment.php?id=5530"]avps.zip[/url]

[Mod] — 2011-11-20 03:41:18 in v2 Only Mods Complete
It is enough that in every page you want to protect to be put only this code:

security_staff();
[Mod] — 2011-11-19 09:32:43 in v2 Only Mods Complete
I adapted the security mod of my old tracker for  TT v.2.7

It is based on a security list where the names of all staff members must be written. If someone manage to promote himself higher than Uploader

his name is not found in the security list and he it receives demote, disable and the owner (ID=1) receives a warning message.

In backend/functions.php, after this line:

$GLOBALS['tstart'] = array_sum(explode(" ", microtime()));
Include this code:
//===== Security Staff =====//

function security_staff ()

{

global $CURUSER;

$class_m  = 5; //number class of MODERATOR

$max = array("name1","name2","name3");

//== Case sensitive. (example: array("adminname1","adminname2","adminname3","so far") ==//

if ($CURUSER["class"] >= $class_m)

if (!in_array($CURUSER["username"], $max, true)) { // true for strict comparison

$msg = "Attention! a user has managed to promote by himself in staff and was not found in the security list:



Username: ".$CURUSER["username"].";

User ID: ".$CURUSER["id"].";

IP: ".getip();

mysql_query("INSERT INTO messages (poster, sender, receiver, added, msg) VALUES(0, 0, '1', '" . get_date_time() . "', " .sqlesc($msg) . ")");

mysql_query("UPDATE users set enabled='no' WHERE id=$CURUSER[id]");

mysql_query("UPDATE users set class='1' WHERE id=$CURUSER[id]");

show_error_msg("Your username not found in security list and your account will be disabled. Have a nice day!");

}

}

//=== End Security Staff ===//



After that, into each page you want to protect, after this line:

dbconn();



Copy this code:

 //===== Security Staff =====//

security_staff();

if ($CURUSER["class"] > 9) { // highest class number

stdhead();

 show_error_msg("FUCK OFF DUDE", "Stop cheating or you will be banned");

 stdfoot(); exit; }

//=== End Security Staff ===//


...


Into every theme, in header.php after the logout or username line copy this code:

		//----- active torrents & connectable -----//

$res = mysql_query("SELECT COUNT(*) FROM peers WHERE userid=" . $CURUSER["id"] . " AND seeder='yes'");

$row = mysql_fetch_row($res);

$activeseed = $row[0];

$res = mysql_query("SELECT COUNT(*) FROM peers WHERE userid=" . $CURUSER["id"] . " AND seeder='no'");

$row = mysql_fetch_row($res);

$activeleech = $row[0];

$res2 = mysql_query("SELECT connectable FROM peers WHERE userid=" . sqlesc($CURUSER["id"]) . " LIMIT 1");

if($row = mysql_fetch_row($res2)){

$connect = $row[0];

if($connect == "yes"){

$connectable = "<font color=lime>Connectable</font>";

}else{ $connectable = "<font color=red>Unconnectable</font>";}

}else{ $connectable = "No transfer";}

print("[Active Torrents: Up-<font color=lime><b>$activeseed</b></font> Down-<font color=red><b>$activeleech</b></font>]&nbsp;&nbsp;");

print("[$connectable]&nbsp;&nbsp;");

//--- end active torrents & connectable ---//
For example, on my tracker i included the code after this line:
		echo " [<a href=\"account-logout.php\" >".T_("LOGOUT")."</a>]&nbsp;&nbsp;";


Do not forget to replace mysql_query with SQL_Query_exec if you are use it.

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