Bravo List
Register
Go Back   > Bravo List > Source Code > Archived Trackers > TBDev
Reply
  #1  
Old 30th January 2013, 16:49
SoB13skY SoB13skY is offline
Member
 
Join Date: May 2011
P2P
Posts: 3
Default I Need Mod for Small description in browse.php
I Need Mod for Small description in browse.php
Reply With Quote
  #2  
Old 31st January 2013, 19:12
DND DND is offline
VIP
 
Join Date: Dec 2008
Posts: 1,241
Default
so ? what's so hard?
you want a torrentsite but you don't know how to build it ?
Reply With Quote
  #3  
Old 31st January 2013, 19:18
SoB13skY SoB13skY is offline
Member
 
Join Date: May 2011
P2P
Posts: 3
Default
Quote:
Originally Posted by DeNeDe View Post
so ? what's so hard?
you want a torrentsite but you don't know how to build it ?
No u just need mod for small descr...what the problem?
Reply With Quote
  #4  
Old 26th February 2013, 18:27
Chez's Avatar
Chez Chez is offline
Senior Member
 
Join Date: Sep 2011
P2P
Posts: 278
Default
Credits to Fireknight

Add this SQL to your data base

PHP Code:
ALTER TABLE `torrentsADD `descriptionvarchar(120NOT NULL default ''
browse.php

Find this query

PHP Code:
$query "SELECT torrents.id, torrents.category, torrents.leechers, torrents.seeders, torrents.name, torrents.times_completed, torrents.size, torrents.added, torrents.comments,torrents.numfiles,torrents.filename,torrents.owner,IF(torrents.nfo <> '', 1, 0) AS nfoav," 
After

PHP Code:
torrents.filename
add

PHP Code:
torrents.description
upload.php

Find

PHP Code:
tr("NFO file""<input type='file' name='nfo' size='80' /><br />(<span style='font-weight:bold;'>Required.</span> Can only be viewed by Power Users.)\n"1); 
Add this above

PHP Code:
tr("Short Description""<input type=\"text\" name=\"description\" size=\"80\" /><br />This Short Description is shown under the Torrentname on the browse page.\n"1); 
takeupload.php


Find ( There are 2 lines with this )

PHP Code:
$nfo sqlesc(str_replace("\x0d\x0d\x0a""\x0d\x0a", @file_get_contents($nfofilename))); 
Add this below ( on both lines )

PHP Code:
$shortdescr $_POST["description"]; 
Find this query

PHP Code:
$ret sql_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$totallencount($filelist), $type$descr$descr$_POST["type"], $dname))) . ", '" get_date_time() . "', '" get_date_time() . "', $nfo)"); 
And add

PHP Code:
description
After

PHP Code:
ori_descr
Then add

PHP Code:
$shortdescr
After

PHP Code:
$descr
Should look like this

PHP Code:
$ret sql_query("INSERT INTO torrents (search_text, filename, owner, visible, info_hash, name, size, numfiles, type, descr, ori_descr, description,category, save_as, added, last_action, nfo) VALUES (" .
implode(","array_map("sqlesc", array(searchfield("$shortfname $dname $torrent"), $fname$CURUSER["id"], "no"$infohash$torrent$totallencount($filelist), $type$descr$descr$shortdescr$_POST["type"], $dname))) . ", '" get_date_time() . "', '" get_date_time() . "', $nfo)"); 
details.php

Find this query

PHP Code:
$res sql_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 < $min_votes, NULL, ROUND(torrents.ratingsum / torrents.numratings, 1)) AS rating, torrents.owner, torrents.comments, 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") or sqlerr(); 
After

PHP Code:
torrents.name 
Add

PHP Code:
torrents.description
Find

PHP Code:
$s=$row["name"]; 
Add this below

PHP Code:
$descrs $row["description"]; 
Find

PHP Code:
if (!empty($row["descr"]))
tr("Description"str_replace(array("\n""  "), array("\n""  "), format_comment(htmlspecialchars($row["descr"]))), 1); 
add this above

PHP Code:
if (!empty($row["description"]))
    print(
"<tr><td class='rowhead' width='1%'>Short Description</td><td width='99%' align='left'>$descrs</td></tr>"); 
Find this query

PHP Code:
$res sql_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, torrents.description,IF(torrents.numratings < $min_votes, NULL, ROUND(torrents.ratingsum / torrents.numratings, 1)) AS rating, torrents.owner, torrents.comments, 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") or sqlerr(); 
After

PHP Code:
torrents.filename
Add

PHP Code:
torrents.description
edit.php

Find.

PHP Code:
tr("Torrent Name""<input type='text' name='name' value='" htmlspecialchars($row["name"]) . "' size='80' />"1); 
Add this below

PHP Code:
tr("Short <br /> Description""<input type='text' name='description' value='" htmlspecialchars($row["description"]) . "' size='80' />"1); 
takeedit.php

Find
PHP Code:
$shortfname $matches[1]; 
Add this below
PHP Code:
$shortdescr $_POST["description"]; 
Find
PHP Code:
$updateset[] = "name = " sqlesc($name); 
Add this below
PHP Code:
$updateset[] = "description = " sqlesc($shortdescr); 
bittorrent.php

Find
PHP Code:
$dispname htmlspecialchars$row["name"] ); 
Add this below
PHP Code:
$description htmlspecialchars$row["description"] ); 
Find
PHP Code:
print( "'><b>$dispname</b></a></td>\n" ); 
Change to
PHP Code:
print( "'><b>$dispname</b><br />(&nbsp;$description&nbsp;)</a></td>\n" ); 

And That's all folks.

Again this screen shot will look different to your browse, but you get the idea.

Click the image to open in full size.
__________________
http://www.bvlist.com/images/avatars/signaturepics/sigpic16443_2.gif
Reply With Quote
The Following User Says Thank You to Chez For This Useful Post:
SoB13skY (8th March 2013)
  #5  
Old 6th October 2013, 11:34
0day 0day is offline
Member
 
Join Date: Aug 2012
P2P
Posts: 8
Default
upload.php cannt find below code. I use TBDEV09

Find

PHP Code:
tr("NFO file""<input type='file' name='nfo' size='80' /><br />(<span style='font-weight:bold;'>Required.</span> Can only be viewed by Power Users.)\n"1); 
Add this above

PHP Code:
tr("Short Description""<input type=\"text\" name=\"description\" size=\"80\" /><br />This Short Description is shown under the Torrentname on the browse page.\n"1); 
I find this code in upload.php, how can i edit it?
PHP Code:
<tr>
      <
td class='heading' valign='top' align='right'>{$lang['upload_nfo']}</td>
      <
td valign='top' align='left'><input type='file' name='nfo' size='80' /><br />({$lang['upload_nfo_info']})</td>
    </
tr

Last edited by 0day; 6th October 2013 at 13:00.
Reply With Quote
Reply

Tags
browsephp , description , mod , small

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



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