Bravo List

Bravo List (http://www.bvlist.com/index.php)
-   TBDev (http://www.bvlist.com/forumdisplay.php?f=20)
-   -   Poster Mod (http://www.bvlist.com/showthread.php?t=8906)

Chez 22nd February 2013 13:32

Poster Mod
 
Can anyone help me with a poster mod for TBDev?

";

Add :
Code:

  1. if (!empty($row["poster"]))

  2.     $HTMLOUT .= tr("{$lang['details_poster']}", "", 1);

  3.     else

  4.     $HTMLOUT .= tr("{$lang['details_poster']}", "/pic/noposter.jpg' alt='No poster' title='No poster available' />", 1);


file - lang/en/lang_details.php add
Code:

  1. 'details_poster' => "Poster",




DND 22nd February 2013 16:52

SQL
Code:

ALTER TABLE torrents ADD `poster` VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT 'pic/noposter.jpg';
file - upload.php

under :
Code:

  1. <tr>

  2.       <td class='heading' valign='top' align='right'>{$lang['upload_torrent']}td>

  3.       <td valign='top' align='left'><input type='file' name='file' size='80' />td>

  4.       tr>


add
Code:

  1. <tr>

  2.       <td class='heading' valign='top' align='right'>{$lang['upload_poster']}td>

  3.       <td valign='top' align='left'><input type='text' name='poster' size='80' /><br />{$lang['upload_poster1']}td>

  4.       tr>


file lang/en/lang_upload.php add :
Code:

  1. 'upload_poster' => "Poster",

  2. 'upload_poster1' => "Direct link for a poster image to be shown on the details page",


file - takeupload.php

under :
Code:

  1. if (!isset($_FILES["file"]))

  2.       stderr($lang['takeupload_failed'], $lang['takeupload_no_formdata']);


add :
Code:

  1. if (!empty($_POST['poster']))

  2.     $poster = unesc($_POST['poster']);


Then add poster, poster, to the insert into torrents query
Code:

  1. $ret = mysql_query("INSERT INTO torrents (search_text, filename,


to
Code:

  1. $ret = mysql_query("INSERT INTO torrents (search_text, filename, poster,


same for , '".$poster."' http://forum.u-232.com/Smileys/default/smiley.gif
Code:

  1. implode(",", array_map("sqlesc", array(searchfield("$shortfname $dname $torrent"), $fname, $CURUSER["id"], "no"


to
Code:

  1. implode(",", array_map("sqlesc", array(searchfield("$shortfname $dname $torrent"), $fname, '".$poster."', $CURUSER["id"], "no"


file - edit.php add :
Code:

  1. $HTMLOUT .= tr($lang['edit_poster'], "{$lang['edit_poster1']}\n", 1)


file lang/en/lang_edit.php add :
Code:

  1. 'edit_poster' => "Poster",

  2. 'edit_poster1' => "Direct link for a poster image to be shown on the details page",


file takeedit.php add
Code:

  1. $poster = $_POST["poster"];

  2. $updateset[] = "poster = " . sqlesc($poster);


file details.php

add into the torrents query :
Code:

  1. torrents.poster,


Then under :
Code:

  1. if (!empty($row["descr"]))

  2. $HTMLOUT .= "
{$lang['details_description']}
". str_replace(array("\n", "  "), array("\n", "  "), format_comment( $row["descr"] ))."

Chez 22nd February 2013 17:00

Thanx man but i want a mod for TBDev Netmaniack 1.6:drink:

DND 22nd February 2013 17:36

then use it without htmlout :)

Chez 22nd February 2013 17:40

it didn't works ... a lot of errors :muscle:

DND 22nd February 2013 17:55

post an exemple on how did u do it
&
post the errors

but is show me same error but on another line

i tried this
PHP Code:

      tr("<td class='heading' valign='top' align='right'>{$lang['upload_torrent']}</td>");

      
tr("<td valign='top' align='left'><input type='file' name='file' size='80' /></td>"); 

but is show me on upload page this errors:


Warning: Missing argument 2 for tr(), called in D:\xampp\htdocs\upload.php on line 48 and defined in D:\xampp\htdocs\include\tracker.php on line 493

Warning: Missing argument 2 for tr(), called in D:\xampp\htdocs\upload.php on line 50 and defined in D:\xampp\htdocs\include\tracker.php on line 493

Bump: and i don't have the lang files in this source:wallbash:
Chez 22nd February 2013 18:01

i started with sql ... and after i put in upload.php this:



PHP Code:

<tr>

      <
tr>

      <
td class='heading' valign='top' align='right'>{$lang['upload_poster']}</td>

      <
td valign='top' align='left'><input type='text' name='poster' size='80' />{$lang['upload_poster1']}</td>

      </
tr>


      </
tr

and is show me this error:


Parse error: syntax error, unexpected '<' in D:\xampp\htdocs\upload.php on line 46


i removed

DND 22nd February 2013 19:13

well. strip down the lang code, and insert what u want to say there.
like Poster, Link, etc..

Bobert 17th September 2013 07:55

for x fusion tracker
 
could someone do this for xfusion tracker im nearly there but .....not


Unknown column 'torrents.poster' in 'field list'

AutoSnipe 17th September 2013 08:46

... add "poster" to the table then. or change it to what table it actually gets the uploader from .. simple really


All times are GMT +2. The time now is 18:53.

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