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

OK, replace:

if ($arr["invited_by"] != $CURUSER['id']) {

with:

if ($arr["invited_by"] != $CURUSER['id'] && $CURUSER["class"] < 5) {
savi, you have "get_ratio_color" function in "backend/function.php"? maybe you use an old version of TT...

If you do not have it, copy the original function I've posted above, in the bottom of functions.php, before: ?>

I do not know what else it could be, to me it works perfectly.

And staff members must see in the user profile that are the invited members, not in the "Invite Tree"...
Thanks for your observation savi, I update the first post.

If you do not like the ratio colors, search in backend/functions.php this function:



function get_ratio_color($ratio) {

   if ($ratio < 0.1) return "#ff0000";

   if ($ratio < 0.2) return "#ee0000";

   if ($ratio < 0.3) return "#dd0000";

   if ($ratio < 0.4) return "#cc0000";

   if ($ratio < 0.5) return "#bb0000";

   if ($ratio < 0.6) return "#aa0000";

   if ($ratio < 0.7) return "#990000";

   if ($ratio < 0.8) return "#880000";

   if ($ratio < 0.9) return "#770000";

   if ($ratio < 1) return "#660000";

   return "#000000";

}


and replaces the color codes with other ones on your taste :P
Create a new file invitetree.php and upload it in your root:

[url="https://www.torrenttrader.org/topic/12259-class-colors-function"]https://www.torrenttrader.org/topic/17452-class-colors-function-for-208[/url]

If you have not installed this mod, simply replace:



<?php

require_once("backend/functions.php");

dbconn(true);

loggedinonly();



$id = $_GET["id"];

if (!is_valid_id($id))

$id = $CURUSER["id"];



$res = SQL_Query_exec("SELECT * FROM users WHERE status = 'confirmed' AND invited_by = $id ORDER BY username");

$num = mysql_num_rows($res);



stdhead("Invite Tree for ".$id."");



$invitees = number_format(get_row_count("users", "WHERE status = 'confirmed' && invited_by = $id"));

if ($invitees == 0)

show_error_msg("Nothing to see here!", "<div style='margin-top:10px; margin-bottom:10px' align='center'><font size=2>This member has no invitees</font></div>

<div style='margin-bottom:10px' align='center'>[<a href=account-details.php?id=$id>Go Back to User Profile</a>]</div>");



if ($id != $CURUSER["id"]) {

begin_frame("Invite Tree for [<a href=account-details.php?id=$id>".$id."</a>]");

} else {

begin_frame("You have [$invitees] invitees ".class_user($CURUSER["username"])."");

}

print("<br />"); //one small space here!



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

print("<tr>

<td class=table_head><b>Invited&nbsp;Members</b></td>

<td class=table_head><b>Class</b></td>

<td class=table_head align=center><b>Registered</b></td>

<td class=table_head align=center><b>Last&nbsp;access</b></td>

<td class=table_head align=center><b>Downloaded</b></td>

<td class=table_head align=center><b>Uploaded<b></td>

<td class=table_head align=center><b>Ratio</b></td>

<td class=table_head align=center><b>Warned</b></td>

</tr>n");



for ($i = 1; $i <= $num; $i++) {



$arr = mysql_fetch_assoc($res);



if ($arr["invited_by"] != $CURUSER['id'] && $CURUSER["class"] < 5) {

print("<tr><td class=table_col1 align=center colspan=8><font color=red><b>Access Denied</b>.</font>&nbsp; You don't have permission to view the invitees of other users!</td></tr>n");

print("</table>n");

print("<br />"); //one small space here!

end_frame();

stdfoot();

}



if ($arr['added'] == '0000-00-00 00:00:00')

$arr['added'] = '---';



if ($arr['last_access'] == '0000-00-00 00:00:00')

$arr['last_access'] = '---';



if($arr["downloaded"] != 0){

$ratio = number_format($arr["uploaded"] / $arr["downloaded"], 2);

} else {

$ratio="---";

}

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



if ($arr["warned"] !== "yes"){

$warned = "<font color=limegreen><b>No</b></font>";

} else {

$warned = "<font color=red><b>Yes</b></font>";

}



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

$added = substr($arr['added'],0,10);

$last_access = substr($arr['last_access'],0,10);

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

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



print("<tr><td class=table_col1 align=left><a href=account-details.php?id=$arr[id]><b>".class_user($arr[username])."</b></a></td>

<td class=table_col2 align=left>$class</td>

<td class=table_col1 align=center>$added</td>

<td class=table_col2 class=table_col1 align=center>$last_access</td>

<td class=table_col1 align=center><font color=orangered>$downloaded</font></td>

<td class=table_col2 align=center><font color=limegreen>$uploaded</font></td>

<td class=table_col1 align=center>$ratio</td>

<td class=table_col2 align=center>$warned</td>

</tr>n");

}

print("</table>n");



if ($arr["invited_by"] != $CURUSER['id']) {

print("<div style='margin-top:10px' align='center'>[<a href=account-details.php?id=$id><b>Go Back to User Profile</b></a>]</div>");

}

print("<br />"); //one small space here!



end_frame();

stdfoot();

?>

Replace the invite_block.php code with this one:




<?php

if (($site_config["INVITEONLY"] || $site_config["ENABLEINVITES"]) && $CURUSER) {

$invites = $CURUSER["invites"];

begin_block(T_("INVITES"));

?>

<table border="0" width="100%" cellspacing="0" cellpadding="0">

<tr>

<td align="center">

<?php printf(P_("YOU_HAVE_INVITES", $invites), $invites); ?>

</td>

</tr>

<?php if ($invites > 0 ){?>

<tr>

<td align="center">

<a href="invite.php"><?php echo T_("SEND_AN_INVITE"); ?></a>

</td>

</tr>

<?php } ?>

<?php if ($CURUSER["invitees"] > 0 ){ ?>

<tr>

<td align="center">

<a href='invitetree.php'>Invite Tree</a>

</td>

</tr>

<?php } ?>

</table>

<?php

end_block();

}

?>






In account-details.php replace this code:





<?php echo T_("USERNAME"); ?>: <?php echo htmlspecialchars($user["username"])?><br />






With this one:





<?php echo T_("USERNAME"); ?>: <?php echo htmlspecialchars($user["username"])?> &nbsp;

<?php if ($CURUSER["class"] >= 5 && $CURUSER["class"] > $user["class"]) { ?>[<a href="invitetree.php?id=<?php echo $user["id"]?>">Invite Tree</a>]<?php } ?><br />






I use class colors function:

".class_user($row["username"])."

with:

".$row["username"]."







Because on my tracker are registered an enough number of walleyes   :D   I had to make the announcements very visible.

Currently I use TT v2.08 but it works as well on 2.07

For each theme you have, in header.php, includes after this code:



if ($site_config["MIDDLENAV"]){

   middleblocks();

For private messages:




   // Start Announcement for Private Messages

   if ($unreadmail){

   $res_messages = mysql_query("SELECT COUNT(*) FROM messages WHERE receiver=" . $CURUSER["id"] . " and unread='yes' AND location IN ('in','both')") or print(mysql_error());

   $arr_messages = mysql_fetch_row($res_messages);

   $num_messages = $arr_messages[0];

   if ($num_messages > 0)

   echo"<div style='margin-bottom:5px'><table align=center width=100% border=0 cellspacing=0 cellpadding=10 bgcolor=red><tr><td style='padding: 10px; background: #AB0000' align=center><div style='font: bold 14px Times New Roman; color:#FFBF00'>

   Hey $CURUSER[username], $num_messages message" . ($num_messages > 1 ? "s" : "") . " is waiting for you to read. Click <a href=mailbox.php?inbox><font size=3 color=#CBCBCB>HERE</font></a> to see!

   </div></td></tr></table></div>\n";

   }

   // End Announcement for Private Messages






For reports:





   // Start Announcement for Reports

   if ($CURUSER["control_panel"]=="yes") {

   $res_reports = mysql_query("SELECT COUNT(*) FROM reports WHERE dealtwith = '0'");

   $arr_reports = mysql_fetch_row($res_reports);

   $num_reports = $arr_reports[0];

   if ($num_reports > 0)

   echo"<div style='margin-bottom:5px'><table align=center width=100% border=0 cellspacing=0 cellpadding=10><tr><td style='padding: 10px; background: #AB0000' align=center><div style='font: bold 14px Times New Roman; color:#FFBF00'>

   Hey $CURUSER[username], $num_reports Report" . ($num_reports > 1 ? "s" : "") . " must be solved. Click <a href=admincp.php?action=reports&do=view><font size=3 color=#CBCBCB>HERE</font></a> to view reports!

   </div></td></tr></table></div>\n";

   }

   // End Announcement for Reports






For staff messages (if you have installed this mod: https://www.torrenttrader.org/topic/9584-mod-contact-staff):





   // Start Announcement for Staff Messages

   if ($CURUSER["control_panel"]=="yes") {

   $res_staffmessages = mysql_query("SELECT COUNT(*) FROM staffmessages WHERE answered = '0'");

   $arr_staffmessages = mysql_fetch_row($res_staffmessages);

   $num_staffmessages = $arr_staffmessages[0];

   if ($num_staffmessages > 0)

   echo"<div style='margin-bottom:5px'><table align=center width=100% border=0 cellspacing=0 cellpadding=10><tr><td style='padding: 10px; background: #AB0000' align=center><div style='font: bold 14px Times New Roman; color:#FFBF00'>

   Hey $CURUSER[username], $num_staffmessages message" . ($num_staffmessages > 1 ? "s" : "") . " for Staff waiting an answer. Click <a href=staffbox.php><font size=3 color=#CBCBCB>HERE</font></a> to see!

   </div></td></tr></table></div>\n";

   }

   // End Announcement for Staff Messages






For announcements (if you have installed this addon: http://www.torrenttrader.org/topic/10965-addon-announcements):





   // Site Anouncements

   if ($CURUSER && $CURUSER["announce_read"] == "no" && $arr = announcement()) {

   ?>

   <script type="text/javascript" src="scripts/announcement.js"></script>

   <script type="text/javascript" src="scripts/preview.js"></script>

   <!-- annoucement start #<?=$arr[id];?> -->

   <div id="dropin" style="position:absolute;visibility:hidden;center;top:100px;width:800;height:100px">

   <table border="0" cellpadding="0" cellspacing="0" width="100%" class="error" align="center">

   <tbody><tr><td class="none" style="padding: 2px 0 0 10px; background: #FFBF00">

   <font color=black><b>Title:</b> <?=$arr["subject"]?> -- <b>Created on"</b> <?=$arr["added"]?></font></td>

   <td align="right" class="none" style="padding: 5px; background: #FFBF00"><a href="#" onclick="dismissbox();return false"><img src="images/close.jpg" border="0"></a></td></tr>

   <tr><td colspan="2" class=none width="100%" style="padding: 0 0 0 10px;" bgcolor="#252525">

   <div style="margin-bottom:5px"><font size=2 color=#CBCBCB><?=format_comment($arr["message"])?></font></div>

   <img id="loading" style=" visibility: hidden" src="images/load.gif">

   <span style="color:#CBCBCB" name="preview" id="previewr" align="left">

   <center>[ <a href="#" onclick="javascript:clearannouncement(this.parentNode,'clear_ann.php')"><font color=#FFBF00><b>Delete Announcement</b></font></a> ]</center>

   </span><br><br></form></td></tr></tbody></table></div>

   <!-- annoucement end #<?=$arr[id];?>-->

   <span id="new_ann" style="visibility: visible"><table border=0 cellspacing=0 cellpadding=10 bgcolor=#AB0000 width=100% align=center><tr><td style='padding: 10px; background: #AB0000' align='center'>

   <div style='font: bold 14px Times New Roman; color:#FFBF00'>There is a New Announcement! Please click <a href="javascript:show_announcement()"><font size=3 color=#CBCBCB>HERE</font></a> to read!</div></td></tr></table></span><br />

   <?php

   }

   // End Site Announcements




[url="http://devscorner.xyz/applications/core/interface/file/attachment.php?id=6398"]images.zip[/url]
The videos are not supported very well by shoutbox, I think that the autorefresh immediately acts and  they are stopped.

Youtube/google video code was not designed to be used there, it was designed to be used in the torrents description.
You have right ArcticWolf  :)   I update the first post with countries (flags) and countries.sql for database.
New staff.php:

<?php
require_once("backend/functions.php");
dbconn();
loggedinonly();

$dt = get_date_time(gmtime() - 180);

$res = SQL_Query_exec("SELECT `users`.`id`, `users`.`username`, `users`.`class`, `users`.`last_access`, `users`.`country` FROM `users` INNER JOIN `groups` ON `users`.`class` = `groups`.`group_id` WHERE `users`.`enabled` = 'yes' AND `users`.`status` = 'confirmed' AND `groups`.`staff_page` = 'yes' ORDER BY `username`");
while ( $row = mysql_fetch_assoc( $res ) )
{
$flag = SQL_Query_exec("SELECT name,flagpic FROM countries WHERE id=$row[country]") or sqlerr();
if ($row2 = mysql_fetch_assoc($flag)) {
$country = "<img src=".$site_config['SITEURL']."/images/countries/$row2[flagpic] width='22' height='14' title='$row2[name]' />";
} else {
$country = "<img src=".$site_config['SITEURL']."/images/countries/unknown.gif width='22' height='14' title='Homeless!' />";
}
$table[$row["class"]] = $table[$row["class"]] .
"<td style='padding-bottom:7px; padding-right:7px'><img src='images/button_o".($row["last_access"] > $dt ? "n" : "ff")."line.png' alt='' />&nbsp; ".
"<a href='account-details.php?id=".$row["id"]."'><b>".class_user($row["username"])."</b></a>&nbsp; ".
"".$country."&nbsp; ".
"<a href='mailbox.php?compose&amp;id=".$row["id"]."'><img src='images/button_pm.gif' border='0' alt='' /></a></td>";

++$col[$row["class"]];

if ($col[$row["class"]] <= 3)
$table[$row["class"]] = $table[$row["class"]] . "<td></td>";
else
{
$table[$row["class"]] = $table[$row["class"]] . "</tr><tr>";
$col[$row["class"]] = 0;
}
}

$where = null;
if ($CURUSER["edit_users"] == "no")
$where = "AND `staff_public` = 'yes'";

$res = SQL_Query_exec("SELECT `group_id`, `level`, `staff_public` FROM `groups` WHERE `staff_page` = 'yes' $where ORDER BY `staff_sort`");

if (mysql_num_rows($res) == 0)
show_error_msg(T_("ERROR"), T_("NO_STAFF_HERE"), 1);

stdhead(T_("STAFF"));
begin_frame(T_("STAFF"));
?>

<table cellpadding="0" width="100%" align="center">
<?php while ($row = mysql_fetch_assoc($res)): if ( !isset($table[$row["group_id"]]) ) continue; ?>
<tr>
<td colspan="14">&nbsp;</td>
</tr>
<tr>
<td colspan="14"><b><?php echo T_($row["level"]); ?></b> <?php if ($row["staff_public"] == "no") echo("<font color='#ff0000'>[".T_("HIDDEN FROM PUBLIC")."]</font>"); ?></td>
</tr>
<tr>
<td colspan="14"><hr color="#0FA3D5" size="1" /></td>
</tr>
<tr>
<?php echo $table[$row["group_id"]]; ?>
</tr>
<tr>
<td colspan="14"></td>
</tr>
<?php endwhile; ?>
</table>

<?php
end_frame();
stdfoot();
?>I use class colors function: [url="http://www.torrenttrader.pw/topic/12259-class-colors-function"]https://www.torrentt...colors-function[/url]
If you have not installed this mod, simply replace:

".class_user($row["username"])."
with:

".$row["username"]."I think it looks better with flags



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

[url="http://devscorner.xyz/applications/core/interface/file/attachment.php?id=6392"]countries.sql.zip[/url]
I want to invite all those who say that do not work these codes, on my tracker: [url="http://www.flux-gamer.net"]http://www.flux-gamer.net[/url] where work properly for a year  :P

They can have fun with the page 'More Tags' and send their own messages until they are enlightened  :D

I use TT v2.08 and php v5.2.17
As you said Movie-Torrentz, is a small change, are only 2 adds in the the original account-signup.php.

Before the Signup code:



<tr>

<td>Humans:</td>

<td><div class="clr"></div><div id="QapTcha"></div></td>

</tr>

And after </form>:




<script type="text/javascript" src="jquery/jquery.js"></script>

<script type="text/javascript" src="jquery/jquery-ui.js"></script>

<script type="text/javascript" src="jquery/QapTcha.jquery.js"></script>

<!-- JS -->

<script type="text/javascript">

$(document).ready(function(){

$('#QapTcha').QapTcha({disabledSubmit:true});

});

</script>




I have included these 2 codes and it works perfectly. Thank you very much  :D

I think that this topic should be set sticky
I installed this mod and works perfectly  :)   Now it's impossible for anyone to use a program for find the password at an account.

It would be great if it could be applied and to Signup page. Is this possible?

A year ago I wake up with 5000 ghost accounts makes into a night  :lol:  so it would be a good thing for security...
Thanks ArcticWolf, nice work indeed :)
For a better view replaces the 'avatars' function in admincp.php with this one:



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

# Avatar Log - Updated by BigMax (17-11-2012)

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

if ($action=="avatars"){

stdhead("Avatar Log");

navmenu();



begin_frame("Avatar Log");



if (!$CURUSER || $CURUSER["control_panel"]!="yes"){

show_error_msg(T_("ERROR"), T_("SORRY_NO_RIGHTS_TO_ACCESS"), 1);

}



$query = SQL_Query_exec("SELECT count(*) FROM users WHERE enabled='yes' AND avatar !=''");

$count = mysql_fetch_row($query);

$count = $count[0];



print("<div style='margin-top:10px; margin-bottom:10px' align=center><font size=2>The gallery of avatars. Click on image to view owner profile.</font></div>");



list($pagertop, $pagerbottom, $limit) = pager(50, $count, 'admincp.php?action=avatars&amp;');

echo ($pagertop);



$query = "SELECT id, username, avatar FROM users WHERE enabled='yes' AND avatar !='' $limit;";

$res = SQL_Query_exec($query);



?>

<table align=center cellpadding=5>

<?php

$cols = 5; //set cols number here



while($arr = mysql_fetch_array($res))

{

if (($cols % 5) == 0) echo "<tr>";



echo "<td class=embedded width=150><center><a href="account-details.php?id=".$arr['id'].""><br>";



if (!$arr['avatar'])

echo "<img width="150" src='images/default_avatar.png' alt='' /></td>";

else

echo "<img width="150" src="".htmlspecialchars($arr["avatar"])."" border=0 alt=".$arr['username']." title=".$arr['username']."></a></center></td>";



if (($cols % 1) != 0)

echo "</tr>";



$cols++;

}

?>

</table>

<?php

echo ($pagerbottom);

end_frame();

stdfoot();

}

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

# End Avatar Log

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


This smallest modification in "messagespy" code allows you to see if messages are read or not.

If you want to see this, edit admincp.php and replace the "messagespy" code with this one:



if ($action=="messagespy"){

if ($do == "del") {

if ($_POST["delall"])

SQL_Query_exec("DELETE FROM `messages`");

else {

if (!@count($_POST["del"])) show_error_msg(T_("ERROR"), "Nothing selected", 1);

$ids = array_map("intval", $_POST["del"]);

$ids = implode(", ", $ids);

SQL_Query_exec("DELETE FROM `messages` WHERE `id` IN ($ids)");

}

header("Refresh: 2;url=admincp.php?action=messagespy");

stdhead();

show_error_msg("Success", "Entries deleted", 0);

stdfoot();

die;

}



stdhead("Message Spy");

navmenu();



$res2 = SQL_Query_exec("SELECT COUNT(*) FROM messages WHERE location in ('in', 'both')");

$row = mysql_fetch_array($res2);

$count = $row[0];



$perpage = 50;



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



begin_frame("Message Spy");



$res = SQL_Query_exec("SELECT * FROM messages WHERE location in ('in', 'both') ORDER BY id DESC $limit");



$mess = number_format(get_row_count("messages"),0);

$read = number_format(get_row_count("messages", "WHERE unread = 'no'"));

$unread = number_format(get_row_count("messages", "WHERE unread = 'yes'"));



print("<div style='margin-top:10px' align='center'><font size='2'>Messages: <b>$mess</b> &nbsp;|&nbsp; Read: <b>$read</b> &nbsp;|&nbsp; Unread: <b>$unread</b></font</div>");

print("<br /><br />");



echo $pagertop;



print("<form id='messagespy' method='post' action='?action=messagespy&amp;do=del'><table border='0' cellspacing='0' cellpadding='3' align='center' class='table_table'>n");



print("<tr>

<th class='table_head' align='left'><input type='checkbox' name='checkall' onclick='checkAll(this.form.id);' /></th>

<th class='table_head' align='left'>INFO</th>

<th class='table_head' align='left'>Text</th>

<th class='table_head' align='center' width='10%'>Date</th>

</tr>n");



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

$res2 = SQL_Query_exec("SELECT username FROM users WHERE id=" . $arr["receiver"]);



if ($arr2 = mysql_fetch_assoc($res2))

$receiver = "<a href='account-details.php?id=" . $arr["receiver"] . "'><b>" . $arr2["username"] . "</b></a>";

else

$receiver = "<i>Deleted</i>";



$res3 = SQL_Query_exec("SELECT username FROM users WHERE id=" . $arr["sender"]);

$arr3 = mysql_fetch_assoc($res3);



$sender = "<a href='account-details.php?id=" . $arr["sender"] . "'><b>" . $arr3["username"] . "</b></a>";

if( $arr["sender"] == 0 )

$sender = "<b>System</b>";

$msg = format_comment($arr["msg"]);



$added = utc_to_tz($arr["added"]);



print("<tr>

<td class='table_col2'><input type='checkbox' name='del[]' value='$arr[id]' /></td>

<td align='left' class='table_col1'>

Sender:&nbsp;$sender

<div style='margin-top:5px; margin-bottom:5px'>Receiver:&nbsp;$receiver</div>

Read:&nbsp;".($arr["unread"] != "yes" ? "<b><font color=limegreen>Yes</font></b>" : "<b><font color=red>No</font></b>")."

</td>

<td align='left' class='table_col1'>$msg</td>

<td align='center' class='table_col2'>$added</td>

</tr>");

}



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

echo "<input type='submit' value='Delete Checked' /> <input type='submit' value='Delete All' name='delall' /></form>";



print($pagerbottom);



end_frame();

stdfoot();

}


shoutbox banned — 2012-11-13 14:18:21 in v2.08 Mods Completed
I have transformed the 'Hide Shoutbox' mod because nobody wants to use it in 'Shoutbox Banned' that's is very useful.

Additionally I created a new function in 'Staff CP' called 'Punished Users' where you can see all members banned on the Shoutbox and/or Forum.

In account.php search the line that contain the following code:



<input type='checkbox' name='hideshoutbox' value='yes' ".($CURUSER['hideshoutbox'] == 'yes' ? 'checked="checked"' : '')."

Delete entire line.



In account-details.php search the line that contain the following code:




<input name='forumbanned' value='yes' type='radio' " . ($forumbanned ? " checked='checked'" : "") . " />Yes <input name='forumbanned' value='no' type='radio' " . (!$forumbanned ? " checked='checked'" : "") . " />No</td>




Add after this, a new line:





print("<tr><td>Shoutbox Banned:</td><td align='left'><input type='checkbox' name='hideshoutbox' value='yes' ".($user['hideshoutbox'] == 'yes' ? 'checked="checked"' : '')." /></td></tr>\n");






In admin-modtasks.php search:





$forumbanned = sqlesc($_POST["forumbanned"]);




Add after:





$hideshoutbox = sqlesc($_POST["hideshoutbox"]);






In the most long line that begin with:





SQL_Query_exec("UPDATE users SET email='$email', title=$title, downloaded='$downloaded', uploaded='$uploaded', ...




Add:





hideshoutbox=$hideshoutbox






In index.php search:





   printf(T_("SHOUTBOX_REFRESH"), 5)."<br />";

   end_frame();

}




Replace with:





   printf(T_("SHOUTBOX_REFRESH"), 5)."<br />";

   end_frame();

   } else {

   begin_frame(T_("SHOUTBOX"));

       print("<div class='f-border comment' align='center'>

       <div style='margin-top:10px; margin-bottom:10px'><b><font size='2'><font color='red'>Access Denied.</font> You are banned on ShoutBox!</font><b></div>

       </div>");

   end_frame();

   }






In admincp.php, for Staff CP, add the following command line:





<td align="center"><a href="admincp.php?action=punished"><img src="images/admin/punished.png" border="0" width="32" height="32"><BR>Punished Users</a><BR></td>






On the most bottom place, before ?> copy the following code:





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

#  Punished members - Added by BigMax (12-11-2012)

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

if ($action == "punished")

{

stdhead("Punished members");

navmenu();



$punished = number_format(get_row_count("users", "WHERE hideshoutbox='yes' || forumbanned='yes'"));

$shoutbox_banned = number_format(get_row_count("users", "WHERE hideshoutbox='yes'"));

$forum_banned = number_format(get_row_count("users", "WHERE forumbanned='yes'"));



begin_frame("Punished members: $punished", true);



print("<div style='margin-top:15px' align=center><font size=2>List of members that are banned on <b>ShoutBox</b> and/or <b>Forum</b>, order by join date.</font></div>");

print("<div style='margin-top:10px; margin-bottom:10px' align=center>Bans on ShoutBox: <b>$shoutbox_banned</b> &nbsp; &nbsp; Bans on Forum: <b>$forum_banned</b></div>");



   $count = get_row_count("users", "WHERE hideshoutbox='yes' || forumbanned='yes'");

   if ($count == 0)

   print("<div style='margin-bottom:15px' align=center><font size=2><b>No punished members!</b></font></div>");

   else { list($pagertop, $pagerbottom, $limit) = pager(25, $count, "admincp.php?action=punished&amp;"); }



   $res = SQL_Query_exec("SELECT * FROM users WHERE hideshoutbox='yes' || forumbanned='yes' AND status='confirmed' ORDER BY users.added $limit");

   $num = mysql_num_rows($res);

 

   print("<div align=center>$pagertop</div>");



print("<table class=table_table border=1 cellspacing=0 cellpadding=4 align=center>\n");

   print("<tr>

       <td class=table_head><b>User&nbsp;name</b></td>

       <td class=table_head><b>User&nbsp;class</b></td>

       <td class=table_head align=center><b>Registered</b></td>

       <td class=table_head align=center><b>Last&nbsp;access</b></td>

       <td class=table_head align=center><b>Downloaded</b></td>

       <td class=table_head align=center><b>Uploaded<b></td>

       <td class=table_head align=center><b>Ratio</b></td>

       <td class=table_head align=center><b>ShoutBox<br /><small>Banned</small></b></td>

       <td class=table_head align=center><b>Forum<br /><small>Banned</small></b></td>

   </tr>\n");



   for ($i = 1; $i <= $num; $i++){

 

       $arr = mysql_fetch_assoc($res);

       if ($arr['added'] == '0000-00-00 00:00:00')

       $arr['added'] = '---';

     

       if ($arr['last_access'] == '0000-00-00 00:00:00')

       $arr['last_access'] = '---';



       if ($arr['hideshoutbox'] == 'yes'){

       $arr['hideshoutbox'] = '<font color=red><b>Yes</b></font>';

       } else {

       $arr['hideshoutbox'] = '<font color=limegreen><b>No</b></font>';

       }

     

       if ($arr['forumbanned'] == 'yes'){

       $arr['forumbanned'] = '<font color=red><b>Yes</b></font>';

       } else {

       $arr['forumbanned'] = '<font color=limegreen><b>No</b></font>';

       }

     

       if($arr["downloaded"] != 0){

       $ratio = number_format($arr["uploaded"] / $arr["downloaded"], 3);

       } else {

       $ratio="---";

       }

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



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

       $added = substr($arr['added'],0,10);

       $last_access = substr($arr['last_access'],0,10);

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

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



   print("<tr>

       <td class=table_col1 align=left><a href=account-details.php?id=$arr[id]><b>$arr[username]</b></a></td>

       <td class=table_col2 align=left>$class</td>

       <td class=table_col1 align=center>$added</td>

       <td class=table_col2 class=table_col1 align=center>$last_access</td>

       <td class=table_col1 align=center><font color=orangered>$downloaded</font></td>

       <td class=table_col2 align=center><font color=limegreen>$uploaded</font></td>

       <td class=table_col1 align=center>$ratio</td>

       <td class=table_col2 align=center>$arr[hideshoutbox]</td>

       <td class=table_col1 align=center>$arr[forumbanned]</td>

   </tr>\n");

   }

print("</table>\n");



   print("<div align=center>$pagerbottom</div>");



end_frame();

stdfoot();

}

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

#  End Punished members

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




Upload the attached image in: images/admin folder, in your root.

matchbox, I am still waiting... Or is it just an unfounded praise?

I want to invite all those who say that do not work these codes, on my tracker: [url="http://www.flux-gamer.net"]http://www.flux-gamer.net[/url] where work properly for a year  :P

They can have fun with the page 'More Tags' and send their own messages until they are enlightened  :D

I use TT v2.08 and php v5.2.17
Thanks, this code works fine and you can make a block with him:



<?php

begin_block("Radio");

?>

<center>

<script type="text/javascript"><!--

function song(){

document.getElementById('music1').innerHTML="<embed type='application/x-mplayer2' id='music2' pluginspage='http://www.microsoft.com/Windows/MediaPlayer/' src='"+document.getElementById('cancion').value+"' name='MediaPlayer1' width='170' height='50' controltype='1' showcontrols='1' showstatusbar='1' AutoStart='true'></embed>";

}

//-->

</script>

<div id="jukebox"><br>

<select id="cancion" onchange="song()" size="1">

<option value="none">Select Station</option>

<option value="http://www.nonstopplay.com/listen.ram">NonStopPlay</option>

<option value="http://www.977music.com/tunein/web/comedy.asx">Comedy-Classic</option>

<option value="http://www.977music.com/tunein/web/jamz.asx">Jamz Channel</option>

<option value="http://100xr.redirectme.net/100xr.asx">Rock Web Station</option>

<option value="http://wm15.spacialnet.com/hassu157520">Bollywood</option>

<option value="http://radio2.desi-radio.com:80/">Indian Musics</option>

</select><br><br>

<span id="music1"><embed type="application/x-mplayer2" id="music1"

pluginspage="http://www.microsoft.com/Windows/MediaPlayer/"

src=""

name="MediaPlayer1"

width="170"

height="50"

controltype="1"

showcontrols="1"

showstatusbar="1"

AutoStart="0">

</embed></span>

</div>

</center>

<?

end_block();

?>

I use in bottom of cleanup.php this code:



       //=== Remove donor status if time up and set class to power user ===//

       $res = SQL_Query_exec("SELECT id, modcomment FROM users WHERE donor='yes' AND donoruntil < NOW() AND donoruntil <> '0000-00-00 00:00:00'");

       if (mysql_num_rows($res) > 0)

       {

       $dt = sqlesc(get_date_time());

       $subject = sqlesc("VIP status removed by System.");

       $msg = sqlesc("Your VIP status has timed out and has been auto-removed by the System. We would like to thank you once again for supporting ".$site_config['SITENAME'].". If you wish to re-new your VIP, you can do so by clicking [url=".%24site_config%5B"]."/donate.php]HERE[/url]. Cheers!n");

       while ($arr = mysql_fetch_assoc($res))

       {

       ///--- Autosystem modcomment ---//

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

       $modcomment = gmdate("Y-m-d H:i") . " - VIP status removed by System.n". $modcomment;

       $modcom = sqlesc($modcomment);

       SQL_Query_exec("UPDATE users SET class = '2', donor = 'no', donoruntil = '0000-00-00 00:00:00', modcomment = $modcom WHERE id = $arr[id]");

       SQL_Query_exec("INSERT INTO messages (sender, receiver, added, msg, subject, poster) VALUES(0, $arr[id], $dt, $msg, $subject, 0)");

       }

       }

[/code]
and works fine.
FLS — 2012-04-29 03:12:59 in v2 Only Mods Complete
This code I have not included it because it does not say anything about it:



$supportfor = sqlesc($_POST["supportfor"]);

$support = sqlesc($_POST["support"]);


I've included it at his place and everything works fine now.

Thank you very much for your help :)
 Images that are too large will be automaticaly resized to 640px and you will get more new tags:

- Small images (240px).

- YouTube and Google videos (and small videos).

- Align all to left, center, right or justify.

In each theme that you have, in header.php before </head> copy this code:


<script type="text/javascript" src="js/ncode_imageresizer.js"></script>
<script type="text/javascript">
<!--
NcodeImageResizer.MODE = 'newwindow';
NcodeImageResizer.MAXWIDTH = 640;
NcodeImageResizer.MAXHEIGHT = 0;
NcodeImageResizer.Msg1 = 'Click this bar to view the full image.';
NcodeImageResizer.Msg2 = 'This image has been resized. Click this bar to view the full image.';
NcodeImageResizer.Msg3 = 'This image has been resized. Click this bar to view the full image.';
NcodeImageResizer.Msg4 = 'Click this bar to view the small image.';
//-->
</script>



theme.css copy this code:

In each theme that you have, in bottom of


/* === Start Resize images === */

table.ncode_imageresizer_warning {
background: #000000;
color: #FF8000;
border:  1px solid #000000;
cursor: pointer;
}

table.ncode_imageresizer_warning td {
font-size: 12px;
color: #FF2000;
vertical-align: middle;
text-decoration: bold;
}

table.ncode_imageresizer_warning td.td1 {
padding: 5px;
}

table.ncode_imageresizer_warning td.td1 {
padding: 2px;
}

/* ==== End Resize images ==== */




In backend/functions.php find and replace this code:


// [img=http://www/image.gif]
$s = preg_replace("/\[img\]((http|https):\/\/[^\s'\"<>]+(\.gif|\.jpg|\.png|\.bmp|\.jpeg))\[\/img\]/i", "<img border='0' src=\"\\1\" alt='' />", $s);


// [img=http://www/image.gif]
$s = preg_replace("/\[img=((http|https):\/\/[^\s'\"<>]+(\.gif|\.jpg|\.png|\.bmp|\.jpeg))\]/i", "<img border='0' src=\"\\1\" alt='' />", $s);


with this code:



         // [img=http://www/image.gif]
   $s = preg_replace("/\[img\]((http|https):\/\/[^\s'\"<>]+(\.gif|\.jpg|\.png|\.bmp|\.jpeg))\[\/img\]/i", "<img border=\"0\" src=\"\\1\" alt=\"\" onload=\"NcodeImageResizer.createOn(this);\">", $s);


// [img=http://www/image.gif]
   $s = preg_replace("/\[img=((http|https):\/\/[^\s'\"<>]+(\.gif|\.jpg|\.png|\.bmp|\.jpeg))\]/i", "<img border=\"0\" src=\"\\1\" alt=\"\" onload=\"NcodeImageResizer.createOn(this);\">", $s);




// [imgw][url="http://www/image.gif%5B/imgw%5D"]http://www/image.gif[/imgw][/url]
 $s = preg_replace("/[imgw](http://[^s'"<>]+(.(jpg|gif|png)))[/imgw]/i","<a class="light" target="_blank" href="1 "><img width="240" src="1" alt="" / border="0"></a><br /><font size="1" color="#FF2000" style="margin-left:5px">Click on image to see it in full size!</font>", $s);

 // [imgw=[url="http://www/image.gif%5D"]http://www/image.gif][/url]
 $s = preg_replace("/[imgw=(http://[^s'"<>]+(.(jpg|gif|png)))]/i","<a class="light" target="_blank" href="1 "><img width="240" src="1" alt="" / border="0"></a><br /><font size="1" color="#FF2000" style="margin-left:5px">Click on image to see it in full size!</font>", $s);

 // YouTube Vids
 $s = preg_replace("/*youtube.com.*v=([^s'"<>]+)]/ims", "<object width="640" height="480"><param name="movie" value="[url="http://www.youtube.com/watch?v=1%22"]http://www.youtube.com/watch?v=1"></param><param[/url] name="allowscriptaccess" value="never"></param><param name="allowFullScreen" value="true"></param><param name="allowNetworking" value="internal"></param><embed src="[url="http://www.youtube.com/watch?v=1%22"]http://www.youtube.com/watch?v=1"[/url] type="application/x-shockwave-flash" allowscriptaccess="never" allowfullscreen="true" allowNetworking="internal" width="640" height="480"></embed></object>", $s);

 // YouTube small Vids [videow=URL]
 $s = preg_replace("/[videow=[^s'"<>]*youtube.com.*v=([^s'"<>]+)]/ims", "<object width="320" height="240"><param name="movie" value="[url="http://www.youtube.com/watch?v=1%22"]http://www.youtube.com/watch?v=1"></param><param[/url] name="allowscriptaccess" value="never"></param><param name="allowFullScreen" value="true"></param><param name="allowNetworking" value="internal"></param><embed src="[url="http://www.youtube.com/watch?v=1%22"]http://www.youtube.com/watch?v=1"[/url] type="application/x-shockwave-flash" allowscriptaccess="never" allowfullscreen="true" allowNetworking="internal" width="320" height="240"></embed></object>", $s);

 // Google Vids
 $s = preg_replace("/*video.google.com.*docid=(-?[0-9]+).*]/ims", "<embed style="width:640px; height:480px;" id="VideoPlayback" align="middle" type="application/x-shockwave-flash" src="[url="http://video.google.com/googleplayer.swf?docId=1%22"]http://video.google.com/googleplayer.swf?docId=1"[/url] allowScriptAccess="sameDomain" quality="best" bgcolor="#ffffff" scale="noScale" wmode="window" salign="TL"  FlashVars="playerMode=embedded"> </embed>", $s);

 // Google small Vids [videow=URL]
 $s = preg_replace("/[videow=[^s'"<>]*video.google.com.*docid=(-?[0-9]+).*]/ims", "<embed style="width:320px; height:240px;" id="VideoPlayback" align="middle" type="application/x-shockwave-flash" src="[url="http://video.google.com/googleplayer.swf?docId=1%22"]http://video.google.com/googleplayer.swf?docId=1"[/url] allowScriptAccess="sameDomain" quality="best" bgcolor="#ffffff" scale="noScale" wmode="window" salign="TL"  FlashVars="playerMode=embedded"> </embed>", $s);
 //
Text


 $s = preg_replace("/((s|.)+?)/", "<center>1</center>", $s);

 //[align=(left, center, right, justify)]Text[/align]
 


//[align=(center|left|right|justify)]text[/align]
    $s = preg_replace("/\[align=([a-zA-Z]+)\]((\s|.)+?)\[\/align\]/i","<div style=\"text-align:\\1\">\\2</div>", $s);

Extract the attached archive and upload all files into your root.

 [ATTACH]2444._xfImport[/ATTACH]
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