|
#1
|
|||
|
|||
Screenshot Request
I found it: posted by Rich here Board Message !
This will allow you to add a link to your upload to display an image in details.php Adapted to work with TBdev DR SourceCode 0.25 upwards. In upload.php FIND Code:
print("<table align=center cellpadding=5><tr>"); print("<td class=embedded>Torrent name </td><td class=embedded><input type=\"text\" name=\"name\" size=\"80\" /><br>(Taken from filename if not specified. <b>Please use descriptive names.</b>)</td>"); print("</tr></table><br>"); Code:
print("<table align=center cellpadding=5><tr>"); print("<td class=embedded>Poster CD name </td><td class=embedded><input type=\"text\" name=\"poster\" size=\"80\" /><br>(Upload to <a href=bitbucket.php>BitBucket</a> link for a poster image to be shown on the details page)</td>"); print("</tr></table><br>"); In takeupload.php FIND Code:
$nfofile = $_FILES['nfo']; Code:
if (!empty($_POST['poster'])) $poster = unesc($_POST['poster']); Code:
$torrent_insert_sql = sprintf("INSERT INTO torrents (search_text, filename, owner, visible, info_hash, name, size, numfiles, type, descr, ori_descr, description, descr_parsed, category, save_as, added, last_action, nfo, inverted_timestamp, poster) VALUES ('%s', '%s', %u, '%s', '%s', '%s', %u, %u, '%s', '%s', '%s', '%s', '%s', %u, '%s', NOW(), NOW(), '%s', 4294967295-UNIX_TIMESTAMP(NOW()), '%s' ) ", mysql_escape_string( searchfield($shortfname." ".$dname." ".$torrent) ), mysql_escape_string( $fname ), $CURUSER['id'], 'no', mysql_escape_string($infohash), mysql_escape_string($torrent), $totallen, count($filelist), $type, mysql_escape_string(strip_tags($descr)), mysql_escape_string(strip_tags($descr)), mysql_escape_string($smalldescr), mysql_escape_string($descr_parsed), (int) $_POST['type'], mysql_escape_string($dname), mysql_escape_string($nfo), mysql_escape_string($poster) ); In details.php Edit the Query to look like this Code:
$res = do_mysql_query("SELECT UNIX_TIMESTAMP(torrents.added) AS ts, torrents.descr_parsed, torrents.completed_by, torrents.seeders, torrents.banned, torrents.leechers, torrents.info_hash, torrents.filename, torrents.description, torrents.comments, LENGTH(torrents.nfo) AS nfosz, UNIX_TIMESTAMP() - UNIX_TIMESTAMP(torrents.last_action) AS lastseed, torrents.numratings, torrents.name, IF(torrents.numratings < $minvotes, NULL, ROUND(torrents.ratingsum / torrents.numratings, 1)) AS rating, torrents.owner, torrents.save_as, torrents.descr, torrents.visible, torrents.size, torrents.added, torrents.views, torrents.hits, torrents.times_completed, torrents.id, torrents.type, torrents.numfiles, torrents.poster, categories.name AS cat_name, users.username, users.anonymous FROM torrents LEFT JOIN categories ON torrents.category = categories.id LEFT JOIN users ON torrents.owner = users.id WHERE torrents.id = ".$id) or sqlerr(); Code:
if (!empty($row["descr_parsed"])) Code:
if (!empty($row["poster"])) tr("Poster CD", "<img src='".$row["poster"]."'>", 1); FIND Code:
tr( _("Torrent name"), "<input type=\"text\" name=\"name\" value=\"" . htmlspecialchars($row["name"]) . "\" size=\"80\" />", 1); Code:
tr( _("Poster CD"), "<input type=\"text\" name=\"poster\" value=\"" . htmlspecialchars($row["poster"]) . "\" size=\"80\" />", 1); FIND Code:
$dname = $row["save_as"]; Code:
if (!empty($_POST['poster'])) $poster = unesc($_POST['poster']); Code:
$updateset[] = "visible = '" . ($_POST["visible"] ? "yes" : "no") . "'"; Code:
$updateset[] = "poster = " . sqlesc($poster); Code:
ALTER TABLE torrents ADD poster VARCHAR(255) NOT NULL Last edited by al_ltoticmat; 15th October 2008 at 08:24. |
#2
|
||||
|
||||
This is a nice code, but I didn't see a thumbnail view. Did I miss it or it's showing pictures in real size?
__________________
CLICK HERE FOR IMPORTANT NEWS FROM BVLIST!! "Always do sober what you said you'd do drunk. That will teach you to keep your mouth shut." Ernest Hemingway. "A positive attitude will not solve all your problems, but it will annoy enough people to make it worth the effort." Herm Albright. |
#3
|
|||
|
|||
thx nice mod a better one on tbdev made by pdq with ajax
|
Tags |
request , screenshot |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Request to be Uploader | sammygo | Mods & Themes | 21 | 7th June 2013 10:52 |
YAFTC - First ScreenShot | Subzero | Community Cafe | 11 | 28th April 2009 22:25 |
Mod Request for TBDEV | patz | TBDev | 0 | 23rd December 2008 03:31 |
Tbdev Styles Request | Subzero | TBDev | 0 | 14th September 2008 22:35 |
Screenshot for Torrents | Fynnon | Mods & Themes | 0 | 8th December 2007 22:25 |