Upload 2 Images With Torrent
Files to be edited:
upload.php takeupload.php edit.php takeedit.php delete.php details.php Files to be added: thumbnail.php viewimage.php in database add this Code:
ALTER TABLE `torrents` ADD `image1` TEXT NOT NULL AFTER `ori_descr` , Code:
tr("Torrent file", "\n", 1); Code:
tr("Torrent file", "\n", 1); find Code:
tr("Torrent name", " Code:
tr("Images", "Max File Size: 500kb Code:
Code:
in takeupload find Code:
if (!isset($_FILES["file"])) Code:
if (!isset($_FILES["tfile"])) Code:
$f = $_FILES["file"]; Code:
$f = $_FILES["tfile"]; Code:
// Replace punctuation characters with spaces Code:
////////////////////////////////////////////// Code:
$ret = mysql_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)"); replace with Code:
$ret = mysql_query("INSERT INTO torrents (search_text, filename, owner, visible, info_hash, name, size, numfiles, type, descr, ori_descr, image1, image2, 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, $inames[0], $inames[1], 0 + $_POST["type"], $dname))) . ", '" . get_date_time() . "', '" . get_date_time() . "', $nfo)"); in edit.php find Code:
tr("Torrent name", "", 1); Code:
tr("Images", "Keep Image 1  "."Delete Image 1  "."Update Image 1 Code:
function bark($msg) { Code:
//////////////////////////////////////////////// Code:
$res = mysql_query("SELECT owner, filename, save_as FROM torrents WHERE id = $id"); Code:
$res = mysql_query("SELECT owner, filename, save_as, image1, image2 FROM torrents WHERE id = $id"); Code:
$dname = $row["save_as"]; Code:
$img1action = $_POST['img1action']; Code:
$res = mysql_query("SELECT name,owner,seeders FROM torrents WHERE id = $id"); Code:
$res = mysql_query("SELECT name,owner,seeders,image1,image2 FROM torrents WHERE id = $id"); Code:
deletetorrent($id); Code:
if ($row["image1"]) { Code:
$res = mysql_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 < $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.nfo, torrents.category, 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(); Code:
$res = mysql_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 < $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.nfo, torrents.image1, torrents.image2, torrents.category, 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(); Code:
if (!empty($row["descr"])) Code:
if ($row["image1"] != "" OR $row["image2"] != "") { create a new php document called 'thumbnail.php' - Add into Code:
# Constants Code:
|
thanks
Thanks man ! :chch:
|
viewimage.php
not working for me |
Quote:
Code:
define(IMAGE_BASE, '/home/vixbit/public_html/trader/torrents/images/'); |
yes i edit thumbail and wievimages not working...
|
Quote:
|
works here boys :-D
|
Code:
Parse error: syntax error, unexpected '/', expecting T_STRING or T_VARIABLE or T_NUM_STRING in /public_html/th/viewimage.php on line 11 I put it here Code:
tr("" .TORRENT_FILE. "", "\n", 1); |
upload.php
Code:
tr("Torrent file", "\n", 1); |
THank you
|
probelm
my english is not perfect
the image i don |
/home/user/public_html/trackerdir/torrents/images/$row[image2]
/home/user/public_html/trackerdir/torrents/images/$row[image1] You should edit this. |
Quote:
yes i have this change |
havin issue's
Code:
Parse error: syntax error, unexpected T_LOGICAL_OR in /dir/dir/dir/public_html/details.php on line 109 were usin the strikemulti version i seen someone else tryed it on another version other then tbdev and it still worked any idea's on how to fix this line 109 Code:
or sqlerr(); is that this is the section its in PHP Code:
|
delete the line with:
PHP Code:
|
thank you
ill give it a try didnt know if i could comment it out delete which ever not really to good with php
:drink: ok now the only error im gettin sence i got all the folder locations right is this Invalid file type! Image 1 the file type im tryin is jpg and png which i added where it says can add more if i want any ideas ? |
Quote:
|
thanks man...
will try to Convert it into U-232 of my later... -thanks :)... |
converted this to 09 version. but i can't see the thumbnails or the images.
it says that the image has errors. they are uploading them on the server, everything works fine except showing them |
How does viewimage.php work? Theres no code that calls for viewimage.php to load. Im assuming its supposed to load viewimage.php when you click on the thumbnail so you can see the full size rather thsn the 150x150 thumbnail?
|
All times are GMT +2. The time now is 16:26. |
Powered by vBulletin® Version 3.8.11 Beta 3
Copyright ©2000 - 2024, vBulletin Solutions Inc.