Bravo List
Register
Go Back   > Bravo List > Source Code > Archived Trackers > TBDev > Mods & Themes
Reply
  #1  
Old 15th October 2008, 05:24
al_ltoticmat al_ltoticmat is offline
Senior Member
 
Join Date: Oct 2008
Posts: 44
Default 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>");
ADD AFTER
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'];
ADD BEFORE
Code:
if (!empty($_POST['poster']))
$poster = unesc($_POST['poster']);
Edit the Query to look like this
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();
FIND
Code:
if (!empty($row["descr_parsed"]))
ADD AFTER
Code:
if (!empty($row["poster"]))
tr("Poster CD", "<img src='".$row["poster"]."'>", 1);
In edit.php
FIND
Code:
    tr( _("Torrent name"), "<input type=\"text\" name=\"name\" value=\"" . htmlspecialchars($row["name"]) . "\" size=\"80\" />", 1);
ADD AFTER
Code:
    tr( _("Poster CD"), "<input type=\"text\" name=\"poster\" value=\"" . htmlspecialchars($row["poster"]) . "\" size=\"80\" />", 1);
In takeedit.php
FIND
Code:
$dname = $row["save_as"];
ADD AFTER
Code:
if (!empty($_POST['poster']))
$poster = unesc($_POST['poster']);
FIND
Code:
$updateset[] = "visible = '" . ($_POST["visible"] ? "yes" : "no") . "'";
ADD BEFORE
Code:
$updateset[] = "poster = " . sqlesc($poster);
Run this quiery on your database
Code:
ALTER TABLE torrents ADD poster VARCHAR(255) NOT NULL
Click image for larger version

Name:	plakatdemo3us.jpg
Views:	608
Size:	117.7 KB
ID:	425

Last edited by al_ltoticmat; 15th October 2008 at 08:24.
Reply With Quote
  #2  
Old 15th October 2008, 14:03
Dragan3591's Avatar
Dragan3591 Dragan3591 is offline
Senior Member
 
Join Date: Oct 2008
United States
Posts: 168
Default
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.
Reply With Quote
  #3  
Old 15th October 2008, 14:08
wMan wMan is offline
Banned
 
Join Date: Feb 2008
P2P
Posts: 1,433
Default
thx nice mod a better one on tbdev made by pdq with ajax
Reply With Quote
Reply

Tags
request , screenshot

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

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



All times are GMT +2. The time now is 22:57. vBulletin skin by ForumMonkeys. Powered by vBulletin® Version 3.8.11 Beta 3
Copyright ©2000 - 2024, vBulletin Solutions Inc.