Credits to Fireknight
Add this SQL to your data base
PHP Code:
ALTER TABLE `torrents` ADD `description` varchar(120) NOT NULL default '';
browse.php
Find this query
PHP Code:
$query = "SELECT torrents.id, torrents.category, torrents.leechers, torrents.seeders, torrents.name, torrents.times_completed, torrents.size, torrents.added, torrents.comments,torrents.numfiles,torrents.filename,torrents.owner,IF(torrents.nfo <> '', 1, 0) AS nfoav," .
After
PHP Code:
torrents.filename,
add
PHP Code:
torrents.description,
upload.php
Find
PHP Code:
tr("NFO file", "<input type='file' name='nfo' size='80' /><br />(<span style='font-weight:bold;'>Required.</span> Can only be viewed by Power Users.)\n", 1);
Add this above
PHP Code:
tr("Short Description", "<input type=\"text\" name=\"description\" size=\"80\" /><br />This Short Description is shown under the Torrentname on the browse page.\n", 1);
takeupload.php
Find ( There are 2 lines with this )
PHP Code:
$nfo = sqlesc(str_replace("\x0d\x0d\x0a", "\x0d\x0a", @file_get_contents($nfofilename)));
Add this below ( on both lines )
PHP Code:
$shortdescr = $_POST["description"];
Find this query
PHP Code:
$ret = sql_query("INSERT INTO torrents (search_text, filename, owner, visible, info_hash, name, size, numfiles, type, descr, ori_descr, category, save_as, added, last_action, nfo) VALUES (" .
implode(",", array_map("sqlesc", array(searchfield("$shortfname $dname $torrent"), $fname, $CURUSER["id"], "no", $infohash, $torrent, $totallen, count($filelist), $type, $descr, $descr, 0 + $_POST["type"], $dname))) . ", '" . get_date_time() . "', '" . get_date_time() . "', $nfo)");
And add
After
Then add
After
Should look like this
PHP Code:
$ret = sql_query("INSERT INTO torrents (search_text, filename, owner, visible, info_hash, name, size, numfiles, type, descr, ori_descr, description,category, save_as, added, last_action, nfo) VALUES (" .
implode(",", array_map("sqlesc", array(searchfield("$shortfname $dname $torrent"), $fname, $CURUSER["id"], "no", $infohash, $torrent, $totallen, count($filelist), $type, $descr, $descr, $shortdescr, 0 + $_POST["type"], $dname))) . ", '" . get_date_time() . "', '" . get_date_time() . "', $nfo)");
details.php
Find this query
PHP Code:
$res = sql_query("SELECT torrents.seeders, torrents.banned, torrents.leechers, torrents.info_hash, torrents.filename, LENGTH(torrents.nfo) AS nfosz, UNIX_TIMESTAMP() - UNIX_TIMESTAMP(torrents.last_action) AS lastseed, torrents.numratings, torrents.name, IF(torrents.numratings < $min_votes, NULL, ROUND(torrents.ratingsum / torrents.numratings, 1)) AS rating, torrents.owner, torrents.comments, torrents.save_as, torrents.descr, torrents.visible, torrents.size, torrents.added, torrents.views, torrents.hits, torrents.times_completed, torrents.id, torrents.type, torrents.numfiles, categories.name AS cat_name, users.username FROM torrents LEFT JOIN categories ON torrents.category = categories.id LEFT JOIN users ON torrents.owner = users.id WHERE torrents.id = $id") or sqlerr();
After
Add
PHP Code:
torrents.description,
Find
PHP Code:
$s=$row["name"];
Add this below
PHP Code:
$descrs = $row["description"];
Find
PHP Code:
if (!empty($row["descr"]))
tr("Description", str_replace(array("\n", " "), array("\n", " "), format_comment(htmlspecialchars($row["descr"]))), 1);
add this above
PHP Code:
if (!empty($row["description"]))
print("<tr><td class='rowhead' width='1%'>Short Description</td><td width='99%' align='left'>$descrs</td></tr>");
Find this query
PHP Code:
$res = sql_query("SELECT torrents.seeders, torrents.banned, torrents.leechers, torrents.info_hash, torrents.filename, LENGTH(torrents.nfo) AS nfosz, UNIX_TIMESTAMP() - UNIX_TIMESTAMP(torrents.last_action) AS lastseed, torrents.numratings, torrents.name, torrents.description,IF(torrents.numratings < $min_votes, NULL, ROUND(torrents.ratingsum / torrents.numratings, 1)) AS rating, torrents.owner, torrents.comments, torrents.save_as, torrents.descr, torrents.visible, torrents.size, torrents.added, torrents.views, torrents.hits, torrents.times_completed, torrents.id, torrents.type, torrents.numfiles, categories.name AS cat_name, users.username FROM torrents LEFT JOIN categories ON torrents.category = categories.id LEFT JOIN users ON torrents.owner = users.id WHERE torrents.id = $id") or sqlerr();
After
PHP Code:
torrents.filename,
Add
PHP Code:
torrents.description,
edit.php
Find.
PHP Code:
tr("Torrent Name", "<input type='text' name='name' value='" . htmlspecialchars($row["name"]) . "' size='80' />", 1);
Add this below
PHP Code:
tr("Short <br /> Description", "<input type='text' name='description' value='" . htmlspecialchars($row["description"]) . "' size='80' />", 1);
takeedit.php
Find
PHP Code:
$shortfname = $matches[1];
Add this below
PHP Code:
$shortdescr = $_POST["description"];
Find
PHP Code:
$updateset[] = "name = " . sqlesc($name);
Add this below
PHP Code:
$updateset[] = "description = " . sqlesc($shortdescr);
bittorrent.php
Find
PHP Code:
$dispname = htmlspecialchars( $row["name"] );
Add this below
PHP Code:
$description = htmlspecialchars( $row["description"] );
Find
PHP Code:
print( "'><b>$dispname</b></a></td>\n" );
Change to
PHP Code:
print( "'><b>$dispname</b><br />( $description )</a></td>\n" );
And That's all folks.
Again this screen shot will look different to your browse, but you get the idea.
__________________
|