I hope you have this part of the user table implemented in your SQL:
ALTER TABLE torrents ADD `recommended` enum('yes','no') NOT NULL default 'no';
torrents-upload.php
Search for:
$free = $_POST["free"];
and after last one
}
Add that:
//==| Recommended torrent
$recommended = $_POST["recommended"];
if ($recommended == "yes") {
$recommended = "yes";
} else {
$recommended = "no";
}
Search for:
$ret = SQL_Query_exec("INSERT INTO torrents
And after:
freeleech,
Add that:
recommended,
Search for:
'".$freeleech."',
After that add:
'".$recommended."',
Somewhere after Freeleech part add this:
//==| Recommended torrent
?><tr><td align='left' class='css' valign='top'><?php echo T_("RECOMMENDED_TORRENT"); ?>:</td>
<td align='left' class='css-right' valign='top'><?php printf("<input name='recommended' value='yes' type='radio' ".($recommended ? " checked='checked'" : "")." /> ".T_("YES")."
<input name='recommended' value='no' type='radio' ".(!$recommended ? " checked='checked'" : "")." /> ".T_("NO").""); ?> <i><?php echo T_("RECOMMENDED_MSG");?></i></td></tr><?php
If you want it to show the symbol that this torrent is Recommended next to the name of it go to functions.php
Serarch for:
if ($row["freeleech"] == 1)
$dispname .= " <img src='images/free.gif' border='0' alt='' />";
After that add:
if ($row["recommended"] == "yes")
$dispname .= " <span style=\"float:right !important;\"><img src=\"./images/rec.png\" width=\"32\" height=\"31\" style=\"margin-top:0px !important;\" title=\"Recommended\" alt=\"Recommedned\"></span>";
If you need modification of torrents-edit.php just hit PM or comment her so we fix it
Regards
www.exyusubs.com
TorrentTrader V3.8.3 (SE)
OS: AlmaLinux 9.9 (BC)
Apache version: 2.4.71
PHP version: 8.5.13 (PHP-FPM)
MySQL version: 10.11.18-MariaDB
Last edited by Botanicar on 2023-08-18 07:01:10