Bravo List

Bravo List (http://www.bvlist.com/index.php)
-   Mods & Themes (http://www.bvlist.com/forumdisplay.php?f=87)
-   -   Screenshot for Torrents (http://www.bvlist.com/showthread.php?t=8)

");

Insert below:

Code:

print("
");

Search for:

Code:

$res = mysql_query("SELECT torrents.seeders, torrents.banned, torrents.leechers, torrents.info_hash, torrents.filename, torrents.nfo AS nfo, 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, 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")
Replace with:

Code:

$res = mysql_query("SELECT torrents.seeders, torrents.banned, torrents.leechers, torrents.info_hash, torrents.filename, torrents.img, torrents.nfo AS nfo, 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, 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")

Insert into your DB:

Code:

alter table torrents add( img varchar(255) NOT NULL default 'default.jpg')
Fynnon 8th December 2007 22:25

Screenshot for Torrents
 
This is the Screenshot Hack Updated for TorrentTrader Classic Beta 4

Open torrents-upload.php
Search for:

Code:

move_uploaded_file($tmpname, "$torrent_dir/$id.torrent");
if (isset($_FILES['nfo'])) {
move_uploaded_file($nfofilename, "$nfo_dir/$id.nfo");
}


Insert below:

Code:

$foldername = "uploads/";
if (isset($_FILES['img'])) {
//move_uploaded_file($imgfilename, $torrent_dir/.$_FILES['img']['name'].);
move_uploaded_file($_FILES['img']['tmp_name'], $foldername. $_FILES['img']['name']);
}


Search for :

Code:

tr("" . NFO . "", "
" . MAX_SIZE_N . " $max_nfo_size_nice\n", 1);


Insert below:

Code:

tr("Screenshot", "
" . MAX_SIZE_I . "\n", 1);


Open take-edit.php
Search for:
Code:

preg_match('/^(.+)\.torrent$/si', $fname, $matches);
$shortfname = $matches[1];
$dname = $row["save_as"];


Insert below:

Code:

$foldername = "uploads/";
$imgaction = $_POST['imgaction'];
if ($imgaction == "update")
{
$imgfile = $_FILES['img'];
if (!$imgfile) die("No data " . var_dump($_FILES));
if ($imgfile['size'] > 165535)
 genbark("Img is too big! Max 65,535 bytes.");
$imgfilename = $imgfile['tmp_name'];
if (@is_uploaded_file($imgfilename) && @filesize($imgfilename) > 0)
move_uploaded_file($_FILES['img']['tmp_name'], $foldername. $_FILES['img']['name']);
$updateset[] = "img = " . sqlesc($_FILES['img']['name']);
}


Open torrents-edit.php
Search for:
Code:

tr("" . NFO . ": ", "" . KEEP. "" . KEEPCURRENT . ":
".
"". UPDATENFO . ":
", 1);

Insert below:

Code:

tr("Image: ", "" . KEEP. "" . KEEPCURRENT . ":
".
"". UPDATEIMG . ":
", 1);


Open torrents-details.php
Search for:

Code:

print("
" . RATINGS . ":" . $s . "
Screenshot:Click to Enlarge


All times are GMT +2. The time now is 08:51.

Powered by vBulletin® Version 3.8.11 Beta 3
Copyright ©2000 - 2024, vBulletin Solutions Inc.