Bravo List

Bravo List (http://www.bvlist.com/index.php)
-   TBDev (http://www.bvlist.com/forumdisplay.php?f=20)
-   -   I Need Mod for Small description in browse.php (http://www.bvlist.com/showthread.php?t=8822)

SoB13skY 30th January 2013 16:49

I Need Mod for Small description in browse.php
 
I Need Mod for Small description in browse.php :wild:

DND 31st January 2013 19:12

so ? what's so hard?
you want a torrentsite but you don't know how to build it ?

SoB13skY 31st January 2013 19:18

Quote:

Originally Posted by DeNeDe (Post 39177)
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?

Chez 26th February 2013 18:27

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' />(<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\" />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  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>(&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.

http://www.freetsp.info/uploads/post...7665_thumb.png

0day 6th October 2013 11:34

upload.php cannt find below code. I use TBDEV09

Find

PHP Code:

tr("NFO file""<input type='file' name='nfo' size='80' />(<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\" />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' />({$lang['upload_nfo_info']})</td>
    </
tr



All times are GMT +2. The time now is 00:09.

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