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

1st post updated ;)
TY BigMax i'll update 1st post (ban warned user is still in french)

i forgot something

cleanup.php

find



//REMOVE WARNING

$res1 = SQL_Query_exec("SELECT users.id, users.username FROM users INNER JOIN warnings ON users.id=warnings.userid WHERE type='Poor Ratio' AND active = 'yes' AND warned = 'yes' AND enabled='yes' AND uploaded / downloaded >= $minratio AND downloaded >= $downloaded");

change for




// REMOVE WARNINGS

$res1 = SQL_Query_exec("SELECT users.id, users.username, warnings.expiry FROM users INNER JOIN warnings ON users.id=warnings.userid WHERE type != 'Poor Ratio' AND type != 'HnR' AND warned = 'yes' AND enabled='yes' AND warnings.active = 'yes' AND warnings.expiry < '".get_date_time()."'");




1st post updated
you can also delete



or sqlerr()




or die(mysql_error())




if you use

SQL_Query_exec
Seems to work well on my dev site from more than 1 month with hard testing, so here it is

How does it works :

Every time a torrent is completed, user have to seed $ hours in an interval of $ days he start the download
after $ days he take 1 H&R if seedtime is < $ hours
to delete H&R, he just need to complete $ hours
when user take $ H&R, he is warn for $ days and he need to del 1 H&r min to del warn
after $ days warned, he is banned
when user take $ H&R he is banned directly

Write Log, Modcomment and email to user with reason when ban

You need SQL, function.php and announce.php modifications from 1st post MVP's snatchlist [url="http://www.torrenttrader.pw/index.php?/topic/16962-snatchlist/"]http://www.torrentt...962-snatchlist/[/url]

SQL

ALTER TABLE `snatched` ADD `hnr` enum('no','yes') NOT NULL DEFAULT 'no';
config.php

add above ?>
//H&R config
$site_config["hnr_deadline"] = 7*86400; // 7 days remaining
$site_config["hnr_seedtime"] = 36*3600; // 36 hours to seed
$site_config["hnr_warn"] = 3; // how many h&r to warn
$site_config["hnr_ban"] = 5; // how many h&r to ban
$site_config["hnr_disabled"] = 7*86400; // days to ban warned

change value with what you want

announce.php

find
if ( ($MEMBERSONLY) && (($seeder == 'no' && $torrent['freeleech'] == 0)) )

change for
if ( $MEMBERSONLY && $seeder == 'no' )

find
SQL_Query_exec("UPDATE users SET uploaded = uploaded + $upthis WHERE id=$userid") or err("Tracker error: Unable to update stats");

add underneath
SQL_Query_exec("UPDATE LOW_PRIORITY `snatched` SET `uload` = `uload` + '$upthis', `utime` = '".gmtime()."', `ltime` = `ltime` + '$elapsed' WHERE `tid` = '$torrentid' AND `uid` = '$userid'");

find
$elapsed = ($self['seeder'] == 'yes') ? $site_config['announce_interval'] - floor(($self['ez'] - time()) / 60) : 0;

change for
if ( $_GET[ 'event' ] != 'stopped' )
{
$elapsed = ($self['seeder'] == 'yes') ? $site_config['announce_interval'] - floor(($self['ez'] - time()) / 60) : 0;
}

cleanup.php

find
//REMOVE WARNING
$res1 = SQL_Query_exec("SELECT users.id, users.username FROM users INNER JOIN warnings ON users.id=warnings.userid WHERE type='Poor Ratio' AND active = 'yes' AND warned = 'yes' AND enabled='yes' AND uploaded / downloaded >= $minratio AND downloaded >= $downloaded");

change for
// REMOVE WARNINGS
$res1 = SQL_Query_exec("SELECT users.id, users.username, warnings.expiry FROM users INNER JOIN warnings ON users.id=warnings.userid WHERE type != 'Poor Ratio' AND type != 'HnR' AND warned = 'yes' AND enabled='yes' AND warnings.active = 'yes' AND warnings.expiry < '".get_date_time()."'");

find
//OPTIMIZE TABLES

add above (english version)
//===| HIT & RUN
$timenow = gmtime();
SQL_Query_exec("UPDATE snatched SET hnr = 'yes' WHERE completed = '1' AND hnr = 'no' AND uload < dload AND $timenow - $site_config[hnr_deadline] > stime AND $site_config[hnr_seedtime] > ltime");
SQL_Query_exec("UPDATE `snatched` SET `hnr` = 'no' WHERE `hnr` = 'yes' AND uload >= dload");
SQL_Query_exec("UPDATE `snatched` SET `hnr` = 'no' WHERE `hnr` = 'yes' AND ltime >= $site_config[hnr_seedtime]");
$a = SQL_Query_exec("SELECT DISTINCT uid FROM snatched WHERE hnr = 'yes'");

if ( mysql_num_rows($a) > 0 ) :
while ($b = mysql_fetch_row($a)) :
$c = SQL_Query_exec("SELECT COUNT( hnr ) FROM snatched WHERE uid = $b[0] AND hnr = 'yes'");
$d = mysql_fetch_row($c);
$count = $d[0];
$user = $b[0];

$length = $site_config["hnr_disabled"];
$expiretime = gmdate("d-M-Y H:i:s", $timenow + $length);

$e = SQL_Query_exec("SELECT type, active FROM warnings WHERE userid = '$user'");
$f = mysql_fetch_row($e);
$type = $f[0];
$active = $f[1];

# warn user
if ( $count >= $site_config["hnr_warn"] && $type != "HnR" ) :
$reason = "You're warned because you have accumulated ".$site_config['hnr_warn']." HnR";
$subject = "Warning for H&R";
$msg = "You're warned because you have accumulated ".$site_config['hnr_warn']." H&RnYou must to keep seeding for the torrents that you have downloaded.nAttention! If you do not remove at least 1 Hit & Run within 7 days, your account will be banned.nIt will be the same if you continue to accumulate Hits & Run.";

$rev = SQL_Query_exec("SELECT enabled FROM users WHERE id = $user");
$rov = mysql_fetch_assoc($rev);
if ($rov["enabled"] == "yes") :
SQL_Query_exec("UPDATE users SET warned = 'yes' WHERE id = $user");
SQL_Query_exec("INSERT INTO warnings (userid, reason, added, expiry, warnedby, type) VALUES ($user,'".$reason."','".get_date_time()."','".$expiretime."','0','HnR')");
SQL_Query_exec("INSERT INTO messages (sender, receiver, added, subject, msg, poster) VALUES (0, $user, '".get_date_time()."', ".sqlesc($subject).", ".sqlesc($msg).", 0)");
endif;
endif;

# remove warning
if ( $count < $site_config["hnr_warn"] && $type == "HnR") :
$subject = "Your warning for H&R has been removed.";
$msg = "You have now less than ".$site_config['hnr_warn']." H&R.nYour warning for H&R has been removed.";
SQL_Query_exec("UPDATE users SET warned = 'no' WHERE id = $user");
SQL_Query_exec("DELETE FROM warnings WHERE userid = $user AND type = 'HnR'");
SQL_Query_exec("INSERT INTO messages (sender, receiver, added, subject, msg, poster) VALUES (0, $user, '".get_date_time()."', ".sqlesc($subject).", ".sqlesc($msg).", 0)");
endif;

# ban user
if ( $count >= $site_config["hnr_ban"] ) :
$g = SQL_Query_exec("SELECT username, email, modcomment FROM users WHERE id = $user");
$h = mysql_fetch_row($g);
$modcomment = $h[2];
$modcomment = gmdate("d-M-Y") . " - Has been disabled because he accumulated: " .$count. " H&Rn " .$modcomment;
SQL_Query_exec("UPDATE users SET enabled = 'no', warned = 'no', modcomment = '$modcomment' WHERE id = $user");
SQL_Query_exec("DELETE FROM warnings WHERE userid = $user AND type = 'HnR'");
write_log("<a href='account-details.php?id=".$user."'><b>".$h[0]."</b></a> has been disabled because he accumulated <b>".$count."</b> H&R");

# send email
$subject = "Your account at $site_config[SITENAME] has been disabled";
$body = "You have been banned for the following reason:n
------------------------------
nYou have accumulated $count H&Rn
------------------------------
nYou can contact us by following this link:
".$site_config['SITEURL']."/contact.php
nnn".$site_config['SITENAME']." ".T_("ADMIN");
sendmail($h[1], "$subject", "$body", "From $site_config[SITEEMAIL]", "-f$site_config[SITEEMAIL]");
endif;
endwhile;
endif;

//Ban warned user
$timenow = gmtime();
$k = SQL_Query_exec("SELECT userid FROM warnings WHERE type = 'HnR' AND active = 'yes' AND UNIX_TIMESTAMP(expiry) < $timenow");
if ( mysql_num_rows($k) > 0 ) :
while ($l = mysql_fetch_row($k)) :
$m = SQL_Query_exec("SELECT username, email, modcomment FROM users WHERE id = $l[0] AND enabled = 'yes' AND warned = 'yes'");
$n = mysql_fetch_row($m);

$modcomment = $n[2];
$modcomment = gmdate("d/m/Y") . " - Banned because that the warning time for H&R has expired.n " .$modcomment;
SQL_Query_exec("UPDATE users SET enabled = 'no', warned = 'no', modcomment = '$modcomment' WHERE id = $l[0]");
SQL_Query_exec("DELETE FROM warnings WHERE userid = $l[0] AND type = 'HnR'");
write_log("<a href='account-details.php?id=".$l[0]."'><b>".$n[0]."</b></a> has been banned because that the warning time for H&R has expired.");

$subject = "Your account at $site_config[SITENAME] has been disabled";
$body = "You have been banned for the following reason:n
------------------------------
nThe warning time for H&R has expired.n
------------------------------
nYou can contact us by following this link:
".$site_config['SITEURL']."/contact.php
nnn".$site_config['SITENAME']." ".T_("ADMIN");
sendmail($n[1], "$subject", "$body", "From $site_config[SITEEMAIL]", "-f$site_config[SITEEMAIL]");
endwhile;
endif;
//===| END HIT & RUN

or add above (french version)
//HIT & RUN
$timenow = gmtime();
SQL_Query_exec("UPDATE snatched SET hnr = 'yes' WHERE completed = '1' AND hnr = 'no' AND uload < dload AND $timenow - $site_config[hnr_deadline] > stime AND $site_config[hnr_seedtime] > ltime");
SQL_Query_exec("UPDATE `snatched` SET `hnr` = 'no' WHERE `hnr` = 'yes' AND uload >= dload");
SQL_Query_exec("UPDATE `snatched` SET `hnr` = 'no' WHERE `hnr` = 'yes' AND ltime >= $site_config[hnr_seedtime]");
$a = SQL_Query_exec("SELECT DISTINCT uid FROM snatched WHERE hnr = 'yes'");
if ( mysql_num_rows($a) > 0 ) :
while ($b = mysql_fetch_row($a)) :
$c = SQL_Query_exec("SELECT COUNT( hnr ) FROM snatched WHERE uid = $b[0] AND hnr = 'yes'");
$d = mysql_fetch_row($c);
$count = $d[0];
$user = $b[0];

$length = $site_config["hnr_disabled"];
$expiretime = gmdate("Y-m-d H:i:s", $timenow + $length);

$e = SQL_Query_exec("SELECT type, active FROM warnings WHERE userid = '$user'");
$f = mysql_fetch_row($e);
$type = $f[0];
$active = $f[1];

//warn
if ( $count >= $site_config["hnr_warn"] && $type != "HnR" ) :
$reason = "Avertissement pour avoir accumulé ".$site_config['hnr_warn']." HnR.";
$subject = "Avertissement pour H&R";
$msg = "Vous avez été averti car vous avez accumulé ".$site_config['hnr_warn']." H&R.nNous vous invitons à consulter les règles sur le téléchargement.nAttention! Si vous n'effacez pas au moins 1 Hit & Run sous 7 jours, votre compte sera banni.nIl en sera de même si vous continuez à accumuler les Hits & Run.";

$rev = SQL_Query_exec("SELECT enabled FROM users WHERE id = $user");
$rov = mysql_fetch_assoc($rev);
if ($rov["enabled"] == "yes") :
SQL_Query_exec("UPDATE users SET warned = 'yes' WHERE id = $user");

SQL_Query_exec("INSERT INTO warnings (userid, reason, added, expiry, warnedby, type) VALUES ($user,'".$reason."','".get_date_time()."','".$expiretime."','0','HnR')");

SQL_Query_exec("INSERT INTO messages (sender, receiver, added, subject, msg, poster) VALUES (0, $user, '".get_date_time()."', ".sqlesc($subject).", ".sqlesc($msg).", 0)");
endif;
endif;

//Unwarned
if ( $count < $site_config["hnr_warn"] && $type == "HnR") :
$subject = "Retrait d'avertissement HnR.";
$msg = "Vous avez désormais moins de ".$site_config['hnr_warn']." H&R.nVotre avertissement pour H&R a été retiré.";

SQL_Query_exec("UPDATE users SET warned = 'no' WHERE id = $user");

SQL_Query_exec("DELETE FROM warnings WHERE userid = $user AND type = 'HnR'");

SQL_Query_exec("INSERT INTO messages (sender, receiver, added, subject, msg, poster) VALUES (0, $user, '".get_date_time()."', ".sqlesc($subject).", ".sqlesc($msg).", 0)");
endif;

//Ban
if ( $count >= $site_config["hnr_ban"] ) :
$g = SQL_Query_exec("SELECT username, email, modcomment FROM users WHERE id = $user");
$h = mysql_fetch_row($g);
$modcomment = $h[2];
$modcomment = gmdate("d/m/Y") . " - Banni pour " .$count. " H&R.n " .$modcomment;
SQL_Query_exec("UPDATE users SET enabled = 'no', warned = 'no', modcomment = '$modcomment' WHERE id = $user");

SQL_Query_exec("DELETE FROM warnings WHERE userid = $user AND type = 'HnR'");

write_log("Le membre <a href='account-details.php?id=".$user."'>".$h[0]."</a> a été banni. Raison : ".$count." H&R.");

$subject = "Votre compte sur $site_config[SITENAME] a été désactivé";
$body = "Vous avez été banni pour la raison suivante :n
------------------------------
nVous avez accumulé $count H&R.n
------------------------------
nVous pouvez nous contacter en suivant ce lien :
".$site_config['SITEURL']."/contact.php
nnn".$site_config['SITENAME']." ".T_("ADMIN");
sendmail($h[1], "$subject", "$body", "De: $site_config[SITEEMAIL]", "-f$site_config[SITEEMAIL]");
endif;
endwhile;
endif;

//Ban warned
$timenow = gmtime();
$k = SQL_Query_exec("SELECT userid FROM warnings WHERE type = 'HnR' AND active = 'yes' AND UNIX_TIMESTAMP(expiry) < $timenow");
if ( mysql_num_rows($k) > 0 ) :
while ($l = mysql_fetch_row($k)) :
$m = SQL_Query_exec("SELECT username, email, modcomment FROM users WHERE id = $l[0] AND enabled = 'yes' AND warned = 'yes'");
$n = mysql_fetch_row($m);

$modcomment = $n[2];
$modcomment = gmdate("d/m/Y") . " - Banni pour délai d'avertissement H&R expiré.n " .$modcomment;
SQL_Query_exec("UPDATE users SET enabled = 'no', warned = 'no', modcomment = '$modcomment' WHERE id = $l[0]");

SQL_Query_exec("DELETE FROM warnings WHERE userid = $l[0] AND type = 'HnR'");

write_log("Le membre <a href='account-details.php?id=".$l[0]."'>".$n[0]."</a> a été banni. Raison : Délai d'avertissement H&R expiré.");

$subject = "Votre compte sur $site_config[SITENAME] a été désactivé";
$body = "Vous avez été banni pour la raison suivante :n
------------------------------
nDélai avertissement H&R expiré.n
------------------------------
nVous pouvez nous contacter en suivant ce lien :
".$site_config['SITEURL']."/contact.php
nnn".$site_config['SITENAME']." ".T_("ADMIN");
sendmail($n[1], "$subject", "$body", "De: $site_config[SITEEMAIL]", "-f$site_config[SITEEMAIL]");
endwhile;
endif;
//END HIT & RUN

account-details

find
$numtorrents = get_row_count("torrents", "WHERE owner = $id");

add above
//h&r
$qry = SQL_Query_exec("SELECT COUNT(`hnr`) FROM `snatched` WHERE `uid` = '$id' AND `hnr` = 'yes'");
$res = mysql_fetch_row($qry);
$hnr = $res[0];

find
<?php echo T_("AVG_DAILY_DL"); ?>: <?php echo mksize($user["downloaded"] / (DateDiff($user["added"], time()) / 86400)); ?><br />

add above
<b>Hit & Run :</b> <?php echo $hnr; ?><br />

find
<?php
}
//team

add above
<tr><td><a href="snatched.php?uid=<?php echo $user["id"]?>"><b>Snatchs List</b></a></td></tr>

account.php

find
<?php print("<a href='mailbox.php'><b>".T_("YOUR_MESSAGES")."</b></a>");?>

add underneath
&nbsp;|&nbsp;
<?php print("<a href='snatched.php'><b>".T_("SNATCHLIST")."</b></a>");?>

delete your snatchlist.php or snatched.php and use the one attached

I use contact.php which is nothing to do with this H&R system so if you don't use it delete link in email part(cleanup.php)
I already use class_user() function so delete each in snatched.php if you don't use it
[url="http://devscorner.xyz/applications/core/interface/file/attachment.php?id=6613"]snatched.php[/url]
found where is my probleme

i put this outer the begin_frame, end_frame and display is ok

i use old frame from 2.06 cause i don't like new collapse frame

i have to look at this

sorry for disturbing
ok don't know why i didn't upload the good files, so

shoutbox.php

find



function therooms()

{

$data = '<select name="room" class="bb_icon" onchange="if(this.options[this.selectedIndex].value != -1){ window.location = this.options[this.selectedIndex].value; }">

<option value="shoutbox.php?room=0" ' . ($GLOBALS['room'] == 0 ? 'selected="selected"' : null) . '>Public</option>

<option value="shoutbox.php?room=1" ' . ($GLOBALS['room'] == 1 ? 'selected="selected"' : null) . '>VIP</option>

if ( get_user_class() >= 5 )

<option value="shoutbox.php?room=2" ' . ($GLOBALS['room'] == 2 ? 'selected="selected"' : null) . '>Staff</option>

</select>';

return $data;

}



function theroomsh()

{

$data = '<select name="room" class="bb_icon" onchange="if(this.options[this.selectedIndex].value != -1){ window.location = this.options[this.selectedIndex].value; }">

<option value="shoutbox.php?history=0&room=0" ' . ($GLOBALS['room'] == 0 ? 'selected="selected"' : null) . '>Public</option>

<option value="shoutbox.php?history=0&room=1" ' . ($GLOBALS['room'] == 1 ? 'selected="selected"' : null) . '>VIP</option>

if ( get_user_class() >= 5 )

<option value="shoutbox.php?history=1&room=2" ' . ($GLOBALS['room'] == 2 ? 'selected="selected"' : null) . '>Staff</option>

</select>';

return $data;

}

change for




if ( get_user_class() < "3" && $room > "0" )

$room = 0;

if ( get_user_class() < "5" && $room > "1" )

$room = 0;



function therooms()

{

$data = '<select name="room" class="bb_icon" onchange="if(this.options[this.selectedIndex].value != -1){ window.location = this.options[this.selectedIndex].value; }">

<option value="shoutbox.php?room=0" ' . ($GLOBALS['room'] == 0 ? 'selected="selected"' : null) . '>Public</option>

<option value="shoutbox.php?room=1" ' . ($GLOBALS['room'] == 1 ? 'selected="selected"' : null) . '>VIP</option>';

if ( get_user_class() >= "5" )

$data .='<option value="shoutbox.php?room=2" ' . ($GLOBALS['room'] == 2 ? 'selected="selected"' : null) . '>Staff</option>';

$data .='</select>';

return $data;

}



function theroomsh()

{

$data = '<select name="room" class="bb_icon" onchange="if(this.options[this.selectedIndex].value != -1){ window.location = this.options[this.selectedIndex].value; }">

<option value="shoutbox.php?history=1&room=0" ' . ($GLOBALS['room'] == 0 ? 'selected="selected"' : null) . '>Public</option>

<option value="shoutbox.php?history=1&room=1" ' . ($GLOBALS['room'] == 1 ? 'selected="selected"' : null) . '>VIP</option>';

if ( get_user_class() >= "5" )

$data .='<option value="shoutbox.php?history=1&room=2" ' . ($GLOBALS['room'] == 2 ? 'selected="selected"' : null) . '>Staff</option>';

$data .='</select>';

return $data;

}






find





<a href='".$site_config['SITEURL']."/shoutbox.php?del=".$row['msgid']."'><img src ='".$site_config['SITEURL']."/images/shout_delete.png' width='8px' alt='Supprimer' title='Supprimer' /></a>




change for





<a href='".$site_config['SITEURL']."/shoutbox.php?room=".$row['room']."&del=".$row['msgid']."'><img src ='".$site_config['SITEURL']."/images/shout_delete.png' width='8px' alt='Supprimer' title='Supprimer' /></a>










also when  edit a msg in room > 0 it return to room = 0,

so change in shoutedit.php



find





$res = SQL_Query_exec("SELECT * FROM shoutbox WHERE msgid=" . $_GET['msgid']);



if (mysql_num_rows($res) != 1)

linkit("$site_config[sITEURL]/$referer", "Aucun message avec l'ID $msgid.");



$arr = mysql_fetch_assoc($res);



if ($CURUSER["id"] != $arr["userid"] && $CURUSER["class"] < $edit_class)

linkit("$site_config[sITEURL]/$referer", T_("DENIED"));




change for





$res = SQL_Query_exec("SELECT * FROM shoutbox WHERE msgid=" . $_GET['msgid']);

$arr = mysql_fetch_assoc($res);



$room = ( $arr["room"] ) ? (int) $arr["room"] : 0;



if (mysql_num_rows($res) != 1)

linkit("$site_config[sITEURL]/$referer?room=$room", "Aucun message avec l'ID $msgid.");



if ($CURUSER["id"] != $arr["userid"] && $CURUSER["class"] < $edit_class)

linkit("$site_config[sITEURL]/$referer?room=$room", T_("DENIED"));






find





linkit("$site_config[sITEURL]/$referer", T_("MESSAGE_CANNOT_BE_EMPTY"), 1);




change for





linkit("$site_config[sITEURL]/$referer?room=$room", T_("MESSAGE_CANNOT_BE_EMPTY"), 1);






find





linkit("$site_config[sITEURL]/$referer", "Edition validée....");




change for





linkit("$site_config[sITEURL]/$referer?room=$room", "Edition validée....");




so now it return to the good room  :)

1st post edited
just taken from here : [url="http://www.torrenttrader.org/index.php?/topic/12808-new-textbbcode-function/page__hl__bbcode"]http://www.torrentt...age__hl__bbcode[/url]
cleaned and some adds

function.php
find

function format_urls($s){
.......................
.......................
}
change for

function format_urls($s){
return preg_replace(
"/(A|[^=]'"a-zA-Z0-9])((http|ftp|https|ftps|irc|www|blog|wiki|forum|forums)://[^<>s]+)/i",
"1<a href='http://kpaste.net/redir/2' target='_blank'>2</a>", $s);
}find

function format_comment($text) {
....................
....................
....................
}
change for
 

function format_comment($text) {
global $site_config, $smilies;
$s = $text;
$s = htmlspecialchars($s);
$s = format_urls($s);
//
  • $s = preg_replace("/
  • /", "<li>", $s);
    // Bold
    $s = preg_replace("/((s|.)+?)/", "<b>1</b>", $s);
    // Italic
    $s = preg_replace("/((s|.)+?)/", "<i>1</i>", $s);
    // Underline
    $s = preg_replace("/((s|.)+?)/", "<u>1</u>", $s);
    // Underline
    $s = preg_replace("/((s|.)+?)/i", "<u>1</u>", $s);
    //
    $s = preg_replace("/+(.(gif|jpg|png)))]/i", "<img border='0' src='1' alt='' />", $s);
    //
    $s = preg_replace("/+(.(gif|jpg|png)))]/i", "<img src='1' alt='' />", $s);
    // [imgw]http://www/image.gif[/imgw]
    $s = preg_replace("/[imgw]((http|https)://[^s'"<>]+(.(jpg|gif|png)))[/imgw]/i","<a class='light' target='_blank' href='1'><img width='240' src='1' alt='' /></a><br /><font size='1' color='#FF2000' style='margin-left:5px'>Cliquez sur l'image pour la voir en taille réelle</font>", $s);
    // [imgw=http://www/image.gif]
    $s = preg_replace("/[imgw=((http|https)://[^s'"<>]+(.(jpg|gif|png)))]/i",
    "<a class='light' target='_blank' href='1'><img width='240' src='1' alt='' /></a><br /><font size='1' color='#FF2000' style='margin-left:5px'>Cliquer sur l'image pour la voir en taille réelle.</font>", $s);
    // Text
    $s = preg_replace("/+)]((s|.)+?)/i", "<font color='1'>2</font>", $s);
    // Text
    $s = preg_replace("/[a-f0-9][a-f0-9][a-f0-9][a-f0-9][a-f0-9])]((s|.)+?)/i", "<font color='1'>2</font>", $s);
    // [url="http://www.example.com"]Text[/url]
    $s = preg_replace("/[url="((http%7Cftp%7Chttps%7Cftps%7Circ%7Cwww%7Cblog%7Cwiki%7Cforum%7Cforums)%3A//%5B%5E"]+?)]((s|.)+?)[/url]/i",
    "<a href='http://kpaste.net/redir/1' target='_blank'>3</a>", $s);

    // [url="%7Boption%7D"]http://www.example.com[/url]
    $s = preg_replace("/[url="%7Boption%7D"]((http|ftp|https|ftps|irc|www|blog|wiki|forum|forums)://[^<>s]+?)[/url]/i",
    "<a href='http://kpaste.net/redir/1' target='_blank'>1</a>", $s);

    // [size=14px]Text[/size]
    $s = preg_replace("/)]((s|.)+?)/i", "<font size='1'>2</font>", $s);
    // Text
    $s = preg_replace("/+)]((s|.)+?)/i", "<font face='1'>2</font>", $s);
    //
    5451926149dbbf788b81e0d49afaaaf0:
    Text


    while (preg_match("/

    5451926149dbbf788b81e0d49afaaaf0:
    s*((s|.)+?)s*

    s*/i", $s))
    $s = preg_replace("/

    5451926149dbbf788b81e0d49afaaaf0:
    s*((s|.)+?)s*

    s*/i",
    "<p class='sub'><b>Quote:</b></p><table class='main' border='1' cellspacing='0' cellpadding='10'><tr><td style='border: 1px black dotted'>1</td></tr></table><br />", $s);
    //

    Author:
    Text


    while (preg_match("/

    (.+?):
    s*((s|.)+?)s*

    s*/i", $s))
    $s = preg_replace("/

    (.+?):
    s*((s|.)+?)s*

    s*/i",
    "<p class='sub'><b>1 wrote:</b></p><table class='main' border='1' cellspacing='0' cellpadding='10'><tr><td style='border: 1px black dotted'>2</td></tr></table><br />", $s);
    //

    [spoiler]
    Text

    [/spoiler]

    $r = substr(md5($text), 0, 4);
    $i = 0;
    while (preg_match("/

    [spoiler]
    s*((s|.)+?)s*

    [/spoiler]
    s*/i", $s))
    {
    $s = preg_replace("/

    [spoiler]
    s*((s|.)+?)s*

    [/spoiler]
    s*/i",
    "<br /><img src='images/plus.gif' id='pic$r$i' title='Spoiler' onclick='klappe_torrent('$r$i')' alt='' /><div id='k$r$i' style='display: none;'>1<br /></div>", $s);
    $i++;
    }
    //

    [spoiler]
    Text

    [/spoiler]

    while (preg_match("/

    [spoiler]
    s*((s|.)+?)s*

    [/spoiler]
    s*/i", $s))
    {
    $s = preg_replace("/

    [spoiler]
    s*((s|.)+?)s*

    [/spoiler]
    s*/i",
    "<br /><img src='images/plus.gif' id='pic$r$i' title='Spoiler' onclick='klappe_torrent('$r$i')' alt='' /><b>1</b><div id='k$r$i' style='display: none;'>2<br /></div>", $s);
    $i++;
    }

    //

    Text[/code ]
    $s = preg_replace("/[code]s*((s|.)+?)s*
    s*/i",
    "<p class='sub'><b>Code:</b></p><table class='main' border='1' cellspacing='0' cellpadding='10'><tr><td style='border: 1px black dotted'>1</td></tr></table><br />", $s);

    //
    defilement

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

    // [blink]clignotement[/blink]
    $s = preg_replace("/[blink]((s|.)+?)[/blink]/", "<blink>1</blink>", $s);

    //

    Text



    $s = preg_replace("/

    ((s|.)+?)


    /", "<center>1</center>", $s);
    //[align=(left, center, right, justify)]Text[/align]
    $s = preg_replace("/[align=([a-zA-Z]+)]((s|.)+?)[/align]/i","<div style='text-align:1'>2</div>", $s);
    //
    $s = preg_replace("//i", "<hr />", $s);
    //
    $s = preg_replace("/[a-f0-9][a-f0-9][a-f0-9][a-f0-9][a-f0-9])|([a-zA-z]+))]/i", "<hr color='1 />", $s);
    //[swf]http://somesite.com/test.swf[/swf]
    $s = preg_replace("/[swf]((www.|http://|https://)[^s]+(.swf))[/swf]/i",
    "<param name='movie' value='1'/><embed width='640' height='480' src='1'></embed>", $s);
    //[swf=http://somesite.com/test.swf]
    $s = preg_replace("/[swf=((www.|http://|https://)[^s]+(.swf))]/i",
    "<param name='movie' value='1'/><embed width='640' height='480' src='1'></embed>", $s);

    //[swf width=XXX heigth=XXX]swf[/swf]
    $s = preg_replace("/[swf (.*?),(.*?)]((www.|http://|https://)[^s]+(.swf))[/swf]/i",
    "<param name='movie' value='3'/><embed width='1' height='2' src='3'></embed>", $s);

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

    //Dailymotion Video URL
    $s = preg_replace("/[^s'"<>]*dailymotion.com/video/([^s'"<>]+)/ims",
    "<object width='640' height='480'>
    <param name='movie' value='http://www.dailymotion.com/swf/1'></param>
    <param name='allowscriptaccess' value='never'></param>
    <param name='allowFullScreen' value='true'></param>
    <param name='allowNetworking' value='internal'>
    <embed src='http://www.dailymotion.com/swf/1' type='application/x-shockwave-flash' allowscriptaccess='never' allowfullscreen='true' allowNetworking='internal' width='640' height='480'></embed>
    </object>", $s);

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

    // Dailymotion Video
    $s = preg_replace("/*dailymotion.com/video/([^s'"<>]+)]/ims",
    "<object width='640' height='480'>
    <param name='movie' value='http://www.dailymotion.com/swf/1'></param>
    <param name='allowscriptaccess' value='never'></param>
    <param name='allowFullScreen' value='true'></param>
    <param name='allowNetworking' value='internal'></param>
    <embed src='http://www.dailymotion.com/swf/1' type='application/x-shockwave-flash' allowscriptaccess='never' allowfullscreen='true' allowNetworking='internal' width='640' height='480'></embed>
    </object>", $s);

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

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

    // Dailymotiion Small Video [videow=URL]
    $s = preg_replace("/[videow=[^s'"<>]*dailymotion.com/video/([^s'"<>]+)]/ims",
    "<object width='320' height='240'>
    <param name='movie' value='http://www.dailymotion.com/swf/1'></param>
    <param name='allowscriptaccess' value='never'></param>
    <param name='allowFullScreen' value='true'></param>
    <param name='allowNetworking' value='internal'></param>
    <embed src='http://www.dailymotion.com/swf/1' type='application/x-shockwave-flash' allowscriptaccess='never' allowfullscreen='true' allowNetworking='internal' width='320' height='240'></embed>
    </object>", $s);

    //[audio]URL[/audio]
    $s = preg_replace("/[audio]((www.|http://|https://)[^s]+(.mp3|wav|wma|aac|bwf|ogg|ac3|flac|alac))[/audio]/i",
    "<embed autostart='false' loop='false' controller='true' width='220' height='18' src='1'></embed>", $s);

    //[audio=URL]
    $s = preg_replace("/[audio=((www.|http://|https://)[^s]+(.mp3|wav|wma|aac|bwf|ogg|ac3|flac|alac))]/i",
    "<embed autostart='false' loop='false' controller='true' width='220' height='18' src='1'></embed>", $s);

    // Linebreaks
    $s = nl2br($s);
    // Maintain spacing
    $s = str_replace(" ", " &nbsp;", $s);
    // Smilies
    require_once("smilies.php");
    reset($smilies);
    while (list($code, $url) = each($smilies))
    $s = str_replace($code, '<img border="0" src="'.$site_config["SITEURL"].'/images/smilies/'.$url.'" alt="'.$code.'" title="'.$code.'" />', $s);
    if($site_config["OLD_CENSOR"])
    {
    $r = SQL_Query_exec("SELECT * FROM censor");
    while($rr=mysql_fetch_row($r))
    $s = preg_replace("/".preg_quote($rr[0])."/i", $rr[1], $s);
    }
    else
    {

    $f = @fopen("censor.txt","r");

    if ($f && filesize("censor.txt") != 0) {

    $bw = fread($f, filesize("censor.txt"));
    $badwords = explode("n",$bw);

    for ($i=0; $i<count($badwords); ++$i)
    $badwords[$i] = trim($badwords[$i]);
    $s = str_replace($badwords, "<img src='images/censored.png' border='0' alt='Censored' title='Censored' />", $s);
    }
    @fclose($f);
    }
    return $s;
    }


    in each theme you have put this in theme.css & change colors to adapt

    /* === Start BB_codes === */
    .bb_holder {
    border-collapse:collapse;
    background:#ccc;
    }
    .bb_icon, .bb_icon:hover {
    background:#999999;
    border:1px solid #666666;
    -moz-border-radius: 3px;
    -webkit-border-radius: 3px;
    border-radius: 3px;
    padding:1px;
    min-width:16px;
    cursor:pointer;
    }
    .bb_icon:hover {
    border: 1px solid #dddddd;
    }
    /* === End BB_codes === */change bbcode.php with attach file

    bbcodes button can be find on nikkbu's site [url="http://nikkbu.info/download.php?list.20"]http://nikkbu.info/download.php?list.20[/url]

    [url="http://devscorner.xyz/applications/core/interface/file/attachment.php?id=6606"]bbcode.php[/url]

    [url="http://www.imagup.com/data/1176555532.html"][/url]
  • i try for 2 days to do this for torrents-edit.php with no good result  :(

    Is there someone who did it?

    and same for advance search block is possible?

    any help is welcome!!
    TY for help but doesn't change anything, display probleme is on IE, FF and Chrome too, so really i think i did something wrong bur can't find what

    this is my css part, i don't use a ccs file but i put it in my theme.css



    /* =========Accordion news====== */

    #accordion-container {

    font-size: 13px;

    background: #e2e2e2;

    padding: 5px 10px 10px 10px;

    border: 1px solid #e2e2e2;

    -moz-border-radius: 5px;

    -webkit-border-radius: 5px;

    border-radius: 5px;

    }

    .accordion-header {

    font-size: 16px;

    background: #ebebeb;

    border: 1px solid #cccccc;

    -moz-border-radius: 5px;

    -webkit-border-radius: 5px;

    border-radius: 5px;

    margin: 5px 0 0 0;

    padding: 5px 20px;

    cursor: pointer;

    color: #666666;

    font-weight:normal;

    font-family: Arial, Verdana, Helvetica, sans-serif;

    }

    .active-header {

    -moz-border-radius: 5px 5px 0 0;

    -webkit-border-radius: 5px 5px 0 0;

    border-radius: 5px 5px 0 0;

    background: url(images/active-header.gif) #dbe2ec;

    background-repeat: no-repeat;

    background-position: right 50%;

    }

    .active-header:hover {

    background: url(images/active-header.gif) #dbe2ec;

    background-repeat: no-repeat;

    background-position: right 50%;

    }

    .inactive-header {

    background: url(images/inactive-header.gif) #ebebeb;

    background-repeat: no-repeat;

    background-position: right 50%;

    }

    .inactive-header:hover {

    background: url(images/inactive-header.gif) #f5f5f5;

    background-repeat: no-repeat;

    background-position: right 50%;

    }

    .accordion-content {

    display: none;

    padding: 20px;

    background: #ffffff;

    border: 1px solid #cccccc;

    border-top: 0;

    -moz-border-radius: 0 0 5px 5px;

    -webkit-border-radius: 0 0 5px 5px;

    border-radius: 0 0 5px 5px;

    }

    /* Inset, by Dan Eden */



    .accordion-hr {

    width:100%;  

    border: 0;

    height: 0;

    border-top: 1px solid rgba(0, 0, 0, 0.1);

    border-bottom: 1px solid rgba(255, 255, 255, 0.3);

    }

    .accordion-left {

    float: left;

    }

    .accordion-right {

    font-size:14;

    font-weight:bold;

    float: right;

    }

    /* ========End accordion news======= */

    IRC Search — 2013-02-25 08:08:17 in v2 Only Mods Complete
    just change all mysql_query for SQL_Query_exec wil do the job ;)
    [MOD] Popup MP — 2013-02-25 08:01:05 in v2 Only Mods Complete
    "Tiloup, post: 89081":
    Rosolu problem with the mode. [url="https://www.torrenttrader.org/index.php?/topic/17586-show-date/"]HERE[/url]

    <?php echo show_today_date();?>

    Thank you all for your help!



    loooooooooool, don't think it fix the date, you just change for today date

    may be show_today_date( $arr[added]) will work
    [MOD] Popup MP — 2013-02-23 18:04:23 in v2 Only Mods Complete
    try change for



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


    not tested
    [MOD] Popup MP — 2013-02-22 18:00:32 in v2 Only Mods Complete
    just change every mysql_query to SQL_Quey_exec
    Can we use special chars in the message (like é...) ?
    works very well, TY  :)

    i've got a little display problemem



    i try differents way but no success

    i use default theme (only colors are changed)
    downliad the file updated
    you can find icon set here [url="http://nikkbu.info/download.php?list.20"]http://nikkbu.info/d...oad.php?list.20[/url]

    all was here in the forums, i just compil all and share :)
    arf sorry i forgot sql



    ALTER TABLE `shoutbox` ADD `room` int(10) unsigned NOT NULL DEFAULT 0;



    @ErvD post your file
    delete



    if ($CURUSER["shoutboxpos"] == 'yes')

    {

    and delete




    }

    else

    {

    echo "<h2>&nbsp;</h2><table width='100%' border='1' cellspacing='0' cellpadding='1'><tr class='f-title f-border'><td class=text>";

    print("<center><b>Vous avez été banni de Shoutbox. Contactez le Staff!</b></center>");

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

    }




    yes ccs go in your theme

    this one use original class_user but may works with yours

    1st post updated
    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