[2.0.4]Poster/Screenshot mod
Add a poster and Screenshots to your torrents detail's
This Mod was a request From TryHarder at seed-bytes as he prepares for his Move to PMBT. First off you well want to make a change to your database By running this SQL Please remember to alter the prefix If needed Code:
ALTER TABLE `torrent_torrents` ADD `post_img` TEXT CHARACTER SET utf8 COLLATE utf8_bin NULL AFTER `descr` , Find Code:
echo " Code:
// Poster Modd Find Code:
if(!isset($build)) $build = "no"; Code:
if(isset($post_img) && $post_img != ''){ Code:
$torrentfields[] = "descr"; Code:
// Poster Modd find Code:
$sql = "SELECT A.id as id, A.exeem, A.seeders, A.leechers, A.tot_peer, A.speed, A.info_hash, A.filename, A.banned, A.nuked, A.nukereason, A.password, UNIX_TIMESTAMP() - UNIX_TIMESTAMP(A.last_action) AS lastseed, A.numratings, A.name, IF(A.numratings < '".$minvotes."', NULL, ROUND(A.ratingsum / A.numratings, 1)) AS rating, A.save_as, A.banned, A.descr, A.visible, A.size, A.plen, A.added, A.views, A.downloaded, A.completed, A.type, A.private, A.min_ratio, A.numfiles, A.owner, A.ownertype, A.complaints, A.evidence, A.tracker, A.tracker_list, A.dht as dht, A.md5sum as md5sum, A.uploader_host as user_host, B.name AS cat_name, IF(C.name IS NULL, C.username, C.name) as ownername, A.tracker_update, COUNT(S.status) as auths FROM ".$db_prefix."_torrents A LEFT JOIN ".$db_prefix."_categories B ON A.category = B.id LEFT JOIN ".$db_prefix."_users C ON A.owner = C.id LEFT JOIN ".$db_prefix."_privacy_file S ON S.torrent = A.id AND S.status = 'pending' WHERE A.id = '".$_GET['torrent']."' GROUP BY A.id LIMIT 1;"; Code:
$sql = "SELECT A.id as id,A.post_img,A.screan1,A.screan2,A.screan3,A.screan4, A.exeem, A.seeders, A.leechers, A.tot_peer, A.speed, A.info_hash, A.filename, A.banned, A.nuked, A.nukereason, A.password, UNIX_TIMESTAMP() - UNIX_TIMESTAMP(A.last_action) AS lastseed, A.numratings, A.name, IF(A.numratings < '".$minvotes."', NULL, ROUND(A.ratingsum / A.numratings, 1)) AS rating, A.save_as, A.descr, A.visible, A.size, A.plen, A.added, A.views, A.downloaded, A.completed, A.type, A.private, A.min_ratio, A.numfiles, A.owner, A.ownertype, A.complaints, A.evidence, A.tracker, A.tracker_list, A.dht as dht, A.md5sum as md5sum, A.uploader_host as user_host, B.name AS cat_name, IF(C.name IS NULL, C.username, C.name) as ownername, A.tracker_update, COUNT(S.status) as auths FROM ".$db_prefix."_torrents A LEFT JOIN ".$db_prefix."_categories B ON A.category = B.id LEFT JOIN ".$db_prefix."_users C ON A.owner = C.id LEFT JOIN ".$db_prefix."_privacy_file S ON S.torrent = A.id AND S.status = 'pending' WHERE A.id = '".$_GET['torrent']."' GROUP BY A.id LIMIT 1;"; Code:
if ($torrent_global_privacy AND $user->user AND !$user->premium AND $torrent_global_privacy AND $download_level=="user" AND $torrent["owner"] != $user->id AND $torrent["private"] == "true" AND $torrent["owner"] != 0) { Code:
#Poster Code:
if (!empty($torrent["descr"])) {//Sometimes massive upload Torrents do not have description Code:
#Sceenshot and find the last row not commented out and add Code:
define("_bt_poster","Poster"); |
I asked about this Months ago, Nice work joe buddy :D now i can work on more stuff to go with this .:drink:
p.s is there a reason you spellt screen -> screan ? |
Quote:
|
no problem, iv correctd them anyway.
|
ok but, at about what line?
Quote:
|
Quote:
mine tells me it is on line 1439, yours will be roundabouts there. |
here is the edit part
open edit.php and find Code:
else $owner = $original_owner; Code:
if(isset($post_img) && $post_img != ''){ Code:
$sql = "UPDATE ".$db_prefix."_torrents SET name = '".$namex."', exeem = '".$exeem."', descr = '".$descr."', category = '".$torrent_category."', ownertype = '".$ownertype."', owner = '".$owner."', password = ".$password.", banned = '".$banned."', nuked = '".$nuked."', ratiobuild = '".$build."', nukereason='".$nukereason."', evidence = '".$evidence."', imdb = '".$imdblink."' WHERE id = '".$id."';"; Code:
$sql = "UPDATE ".$db_prefix."_torrents SET Code:
echo " Code:
echo " |
latest posters
1 Attachment(s)
be nice to have a latest images block for this to..... Updated: some time later.... hahaha here goes latest images with Seeds and Leechs stats. Thanks to joe on this one. add attached to blocks add below where want it to show. index.php or blocks/usercp.php Code:
if ($user->user) { user code below for horizontal (center of site) instead of vertical (side of site) Code:
} CloseTable(); ?> screen: http://www.place2bscene.co.uk/UserFiles/daffy/la2.jpg Bump: ok this is to add IMDB link in details. find below in ajax.php (i am going off if you have above installed, if not, im sure youl see where to place the line Code:
$sql = "SELECT A.id as id,A.post_img,A.screan1,A.screan2,A.screan3,A.screan4, A.exeem, A.seeders, A.leechers, A.tot_peer, A.speed, A.info_hash, A.filename, A.banned, A.nuked, A.nukereason, A.password, UNIX_TIMESTAMP() - UNIX_TIMESTAMP(A.last_action) AS lastseed, A.numratings, A.name, IF(A.numratings < '".$minvotes."', NULL, ROUND(A.ratingsum / A.numratings, 1)) AS rating, A.save_as, A.descr, A.visible, A.size, A.plen, A.added, A.views, A.downloaded, A.completed, A.type, A.private, A.min_ratio, A.numfiles, A.owner, A.ownertype, A.complaints, A.evidence, A.tracker, A.tracker_list, A.dht as dht, A.md5sum as md5sum, A.uploader_host as user_host, B.name AS cat_name, IF(C.name IS NULL, C.username, C.name) as ownername, A.tracker_update, COUNT(S.status) as auths FROM ".$db_prefix."_torrents A LEFT JOIN ".$db_prefix."_categories B ON A.category = B.id LEFT JOIN ".$db_prefix."_users C ON A.owner = C.id LEFT JOIN ".$db_prefix."_privacy_file S ON S.torrent = A.id AND S.status = 'pending' WHERE A.id = '".$_GET['torrent']."' GROUP BY A.id LIMIT 1;"; Code:
$sql = "SELECT A.id as id,A.post_img,A.screan1,A.screan2,A.screan3,A.screan4, A.imdb, A.exeem, A.seeders, A.leechers, A.tot_peer, A.speed, A.info_hash, A.filename, A.banned, A.nuked, A.nukereason, A.password, UNIX_TIMESTAMP() - UNIX_TIMESTAMP(A.last_action) AS lastseed, A.numratings, A.name, IF(A.numratings < '".$minvotes."', NULL, ROUND(A.ratingsum / A.numratings, 1)) AS rating, A.save_as, A.descr, A.visible, A.size, A.plen, A.added, A.views, A.downloaded, A.completed, A.type, A.private, A.min_ratio, A.numfiles, A.owner, A.ownertype, A.complaints, A.evidence, A.tracker, A.tracker_list, A.dht as dht, A.md5sum as md5sum, A.uploader_host as user_host, B.name AS cat_name, IF(C.name IS NULL, C.username, C.name) as ownername, A.tracker_update, COUNT(S.status) as auths FROM ".$db_prefix."_torrents A LEFT JOIN ".$db_prefix."_categories B ON A.category = B.id LEFT JOIN ".$db_prefix."_users C ON A.owner = C.id LEFT JOIN ".$db_prefix."_privacy_file S ON S.torrent = A.id AND S.status = 'pending' WHERE A.id = '".$_GET['torrent']."' GROUP BY A.id LIMIT 1;"; Code:
#Sceenshot Add Below |
Hey guys
First off, thank you for an amazing bittorrent package. It has been an absolute breeze setting it up and all the included features are really great. My only request would be an easier way to upload images. Currently we have to use the image bucket to upload a picture and then reference the location in the description field with [IMG]sitename/username/image.jpg[/IMG] I just found this thread and applied all the code changes but it looks like the mod only allows for image location via url. Is there anyway to modify this to allow clients to browse their local machine for the image to upload? Could that image location then be auto populated at the bottom of the description window? Thanks so much |
go to admin->image-bucket and you can set it up there the link for uploading well appear under the description box in upload
|
All times are GMT +2. The time now is 19:24. |
Powered by vBulletin® Version 3.8.11 Beta 3
Copyright ©2000 - 2024, vBulletin Solutions Inc.