Bravo List
Register
Go Back   > Bravo List > Source Code > Archived Trackers > TBDev
Reply
  #1  
Old 22nd February 2013, 13:32
Chez's Avatar
Chez Chez is offline
Senior Member
 
Join Date: Sep 2011
P2P
Posts: 278
Default Poster Mod
Can anyone help me with a poster mod for TBDev?
__________________
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:
Number51 (29th December 2014)
  #2  
Old 22nd February 2013, 16:52
DND DND is offline
VIP
 
Join Date: Dec 2008
Posts: 1,241
Default
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."' Click the image to open in full size.
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'], "<input type='text' name='poster' size='80' value='" . htmlspecialchars($row["poster"]) . "' alt='' /><br />{$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 .= "<tr><td style='vertical-align:top'>{$lang['details_description']}</td><td><div style='background-color:#d9e2ff;width:100%;height:150px;overflow: auto'>". str_replace(array("\n", " "), array("<br />\n", " "), format_comment( $row["descr"] ))."</div></td></tr>";
Add :
Code:
  1. if (!empty($row["poster"]))
  2. $HTMLOUT .= tr("{$lang['details_poster']}", "<img src='".$row["poster"]."' alt='' />", 1);
  3. else
  4. $HTMLOUT .= tr("{$lang['details_poster']}", "<img src='{$TBDEV['baseurl']}/pic/noposter.jpg' alt='No poster' title='No poster available' />", 1);
file - lang/en/lang_details.php add
Code:
  1. 'details_poster' => "Poster",


Reply With Quote
  #3  
Old 22nd February 2013, 17:00
Chez's Avatar
Chez Chez is offline
Senior Member
 
Join Date: Sep 2011
P2P
Posts: 278
Default
Thanx man but i want a mod for TBDev Netmaniack 1.6
__________________
http://www.bvlist.com/images/avatars/signaturepics/sigpic16443_2.gif
Reply With Quote
  #4  
Old 22nd February 2013, 17:36
DND DND is offline
VIP
 
Join Date: Dec 2008
Posts: 1,241
Default
then use it without htmlout :)
Reply With Quote
  #5  
Old 22nd February 2013, 17:40
Chez's Avatar
Chez Chez is offline
Senior Member
 
Join Date: Sep 2011
P2P
Posts: 278
Default
it didn't works ... a lot of errors
__________________
http://www.bvlist.com/images/avatars/signaturepics/sigpic16443_2.gif

Last edited by Chez; 22nd February 2013 at 17:53.
Reply With Quote
  #6  
Old 22nd February 2013, 17:55
DND DND is offline
VIP
 
Join Date: Dec 2008
Posts: 1,241
Default
post an exemple on how did u do it
&
post the errors
Reply With Quote
  #7  
Old 22nd February 2013, 18:01
Chez's Avatar
Chez Chez is offline
Senior Member
 
Join Date: Sep 2011
P2P
Posts: 278
Default
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' /><br />{$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 <tr> </tr> 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
__________________
http://www.bvlist.com/images/avatars/signaturepics/sigpic16443_2.gif
Reply With Quote
  #8  
Old 22nd February 2013, 19:13
DND DND is offline
VIP
 
Join Date: Dec 2008
Posts: 1,241
Default
well. strip down the lang code, and insert what u want to say there.
like Poster, Link, etc..
Reply With Quote
  #9  
Old 17th September 2013, 07:55
Bobert Bobert is offline
Senior Member
 
Join Date: Feb 2010
United Kingdom
Posts: 16
Angry for x fusion tracker
could someone do this for xfusion tracker im nearly there but .....not


Unknown column 'torrents.poster' in 'field list'
Reply With Quote
  #10  
Old 17th September 2013, 08:46
AutoSnipe AutoSnipe is offline
Senior Member
 
Join Date: May 2008
Posts: 84
Default
... add "poster" to the table then. or change it to what table it actually gets the uploader from .. simple really
Reply With Quote
Reply

Tags
mod , poster

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 23:19. vBulletin skin by ForumMonkeys. Powered by vBulletin® Version 3.8.11 Beta 3
Copyright ©2000 - 2024, vBulletin Solutions Inc.