Files modified: Yes
Sql: Yes
Make service before any changes.
SQL :
ALTER TABLE torrents ADD `exclue` enum('yes','no') NOT NULL default 'no';
Open torrents-upload.php and search :
//anonymous upload
$anonyupload = $_POST["anonycheck"];
if ($anonyupload == "yes") {
$anon = "yes";
}else{
$anon = "no";
}
After :
$exclue = unesc($_POST["exclue"]);
Search :
last_action,
Add after :
exclue
Search :
'$anon',
Add :
'".$exclue."',
Search :
if ($site_config['ANONYMOUSUPLOAD'] && $site_config["MEMBERSONLY"] ){ ?>
<tr><td align="right"><?php echo T_("UPLOAD_ANONY");?>: </td><td><?php printf("<input name='anonycheck' value='yes' type='radio' " . ($anonycheck ? " checked='checked'" : "") . " />".T_("YES")." <input name='anonycheck' value='no' type='radio' " . (!$anonycheck ? " checked='checked'" : "") . " />".T_("NO").""); ?> <i><?php echo T_("UPLOAD_ANONY_MSG");?></i>
</td></tr>
Add after :
if (get_user_class() >= 4) {
print("<tr><td align=right>Exclusivité: </td><td align=left><input name=exclue value=yes type= radio>Oui<input name=exclue value=no type=radio checked=checked>Non<br>(Activez la case si c'est une exclusivité)</td></tr>");
}
Open torrents-edit.php and search :
$updateset[] = "torrentlang = " . (int) $_POST["language"];
Add after :
$updateset[] = "exclue = '" . ($_POST["exclue"] ? "yes" : "no") . "'";
Search :
if ($site_config['ANONYMOUSUPLOAD']) {
echo "<tr><td class='table_col1' align='right'><b>".T_("ANONYMOUS_UPLOAD").": </b></td><td class='table_col2'><input type="checkbox" name="anon"" . (($row["anon"] == "yes") ? " checked="checked"" : "" ) . " value="1" />(".T_("ANONYMOUS_UPLOAD_MSG").")<br /></td></tr>";
}
Add after :
echo "<tr><td class='table_col1' align='right'><b>Exclusivité: </b></td><td class='table_col2'><input type="checkbox" name="exclue"" . (($row["exclue"] == "yes") ? " checked="checked"" : "" ) . " value="1" /> (Activez la case si c'est une exclusivité)<br>";
Open backend/funstions.php and search :
if ($row["freeleech"] == 1)
$dispname .= " <img src='images/free.gif' border='0' alt='' />";
Add after :
if ($row["exclue"] == "yes")
$dispname .= " <img src='images/exclue.gif' border='0' alt='' />";
Open torrents-search.php and search :
begin_frame(T_("SEARCH_TORRENTS"));
add after :
echo "<center><b><a href=exclue.php>Voir toutes nos Exclusivités</a></b><br><br> ";
Open torrents.php and search :
torrents.anon,
Add after :
torrents.exclue,
Ouvrez index.php and search :
torrents.anon,
Add after :
torrents.exclue,
Search :
if ($CURUSER["shoutboxbanned"] == "yes" ) {
Add to the above:
begin_frame("Les exclusivités du site");
echo "<center><table align="center" width="98%" height="200"border="0"><tr>";
$res = SQL_Query_exec("SELECT id, image1 FROM torrents WHERE banned='no' AND visible='yes' AND exclue='yes' ORDER BY id DESC LIMIT 20");
echo "<td> ";
echo "<MARQUEE behavior=scroll direction='left' height='150' scrollamount='2' scrolldelay='1' onmouseover='this.stop()' onmouseout='this.start()'>";
while ($arr=mysql_fetch_assoc($res))
{
if($arr[image1]=="")
{
echo '<a title="'.$arr['name'].'" href="'.$site_config['SITEURL'].'/torrents-details.php?id='.$arr['id'].'&hit=1"><img class="corner" border="0" src="images/nocover.jpg" alt="'.$arr['name'].'" title="'.$arr['name'].'" width="112" height="152"></a> ';
}else{
echo '<a title="'.$arr['name'].'" href="'.$site_config['SITEURL'].'/torrents-details.php?id='.$arr['id'].'&hit=1"><img class="corner" border="0" src="uploads/images/'.$arr['image1'].'" alt="'.$arr['name'].'" title="'.$arr['name'].'" width="100" height="177"></a> ';
}
}
echo "</marquee></td></tr></table><br></center>";
end_frame();
Put exclue.php file in the root of your site and the image "exclue.gif" in your Pictures folder.
results:
[url="
http://devscorner.xyz/applications/core/interface/file/attachment.php?id=7205"]exclue.php[/url]