Login
Username: Password:
Remember me

[Sign Up] / [Recover Password]

Theme / Language

Popular
New Torrents
new name
Size: 18.40 MB
Most active
new name
S: 74 L: 3
New Posters
Latest Image Block Mod...
Controls ·  Search New posts · Mark unread

You are in: Forum / Forum / v2.08 / v2 Only Mods Complete

Unknown User
2011-10-02 22:11:52
I wanted to mod A block with Image from torrent......that i can post from any catagory and any torrent image...and with 2 posters in a row....

i got this one but its only showing 1 image and problem is cannot edit from catagory or any torrent i like..its only showing latest upload..

Pic attached 1st one my site...2nd one i wanna do...im posting the code also..

Regards,

<?php

if (!$site_config["MEMBERSONLY"] || $CURUSER) {

$limit = 4; // Only show 4 max



$res = mysql_query("SELECT torrents.id, torrents.name, torrents.image1, torrents.image2, categories.name as cat_name, categories.parent_cat as cat_parent FROM torrents LEFT JOIN categories ON torrents.category=categories.id WHERE banned = 'no' AND (image1 != '' OR image2 != '') AND visible = 'yes' ORDER BY id DESC LIMIT $limit") or die(mysql_error());

if (mysql_num_rows($res)) {

begin_block(T_("LATEST_POSTERS"));



print("<table align=center cellpadding=0 cellspacing=0 width=100% border=0>");



while ($row = mysql_fetch_array($res)) {

$cat = htmlspecialchars("$row[cat_parent] - $row[cat_name]");

$name = htmlspecialchars($row["name"]);



if ($row["image1"]) {

print("<tr><td align=center><a href='$site_config[SITEURL]/torrents-details.php?id=$row[id]' title='$name / $cat'><img border='0' src='uploads/images/$row[image1]' alt=\"$name / $cat\" width=100></a><BR></td></tr>");

} else {

print("<tr><td align=center><a href='$site_config[SITEURL]/torrents-details.php?id=$row[id]' title='$name / $cat'><img border='0' src='uploads/images/$row[image2]' alt=\"$name / $cat\" width=100></a><BR></td></tr>");

}

}

print("</table>");



end_block();

}

}

?>




TT Forum Guys Are Awesome...





poster.png
poster.png
poster1.png
poster1.png
Unknown User
2011-10-04 02:46:17
Still waiting really need help...
Unknown User
2011-10-06 19:18:11
really need it...anyone.  :P  :P ;)
Unknown User
2011-10-10 17:26:17
<?php

 

$cats = implode(',', array(113, 43));



$i = 0;

$q = "SELECT torrents.id, torrents.image1 FROM torrents WHERE visible = 'yes' AND banned = 'no' AND image1 != '' AND category IN ($cats) ORDER BY id DESC LIMIT 10";

$q = mysql_query($q);



begin_block();



print '<table>';

print '<tr>';

while ( $r = mysql_fetch_object($q) )

{

print (($i && $i % 2) ? '<td><a href="torrents-details.php?id='.$r->id.'"><img src="uploads/images/' . $r->image1 . '" height="100" width="100" border="0" /></a></td></tr>' : '<tr><td><a href="torrents-details.php?id='.$r->id.'"><img src="uploads/images/' . $r->image1 . '" height="100" width="100" border="0" /></a></td>');

$i++;

}

print '</tr>';

print '</table>';



end_block();



?>


change cats to match what your looking for.

Moved to mods complete.

request.PNG
request.PNG
Unknown User
2011-10-10 20:11:44
Thank you for help..mate..you are a life saver...but is there any chance to make torrent visible with images in to that block which i like..it cud be any torrent from any catagory...
Unknown User
2011-12-30 22:42:19
hey m8 give me full code plz..
Unknown User
2011-12-30 22:56:48
full code too what?
Unknown User
2012-03-02 03:37:18
how get 7 tables 4 an middle block thx

greetz
Unknown User
2012-03-02 07:17:21
change LIMIT 10 to LIMIT 14

change ($i && $i % 2) to ($i && $i % 4)
Unknown User
2012-03-02 14:35:32
hey mostvotedplaya

damn not working 7 tables site by site und 8 -11 tables down

n1 test system Red Hat 6.2 (Linux 2.6.32-042stab044.11) so0 n1^^

thx
Unknown User
2012-03-02 14:43:31
u mean 8 vertical and 11 horizontal?
Unknown User
2012-03-02 14:55:26
y 6 -7 vertikal and 7 horizontal!

or

6 verti and 6 horizontal :]

thx
Unknown User
2012-03-02 15:38:08
change LIMIT 10 to LIMIT 36 (6 x 6 = 36)

change ($i && $i % 2) to ($i && $i % 6) (6 table data before new row)
Unknown User
2012-03-02 15:56:57
same thing so0 crazy  :blink:  what can i do?



thx



<?php

 

$cats = implode(',', array(47, 48));



$i = 0;

$q = "SELECT torrents.id, torrents.image1 FROM torrents WHERE visible = 'yes' AND banned = 'no' AND image1 != '' AND category IN ($cats) ORDER BY id DESC LIMIT 36";

$q = mysql_query($q);



begin_block();



print '<table>';

print '<tr>';

while ( $r = mysql_fetch_object($q) )

{

print (($i && $i % 6) ? '<td><a href="torrents-details.php?id='.$r->id.'"><img src="uploads/images/' . $r->image1 . '" height="100" width="100" border="0" /></a></td></tr>' : '<tr><td><a href="torrents-details.php?id='.$r->id.'"><img src="uploads/images/' . $r->image1 . '" height="100" width="100" border="0" /></a></td>');

$i++;

}

print '</tr>';

print '</table>';



end_block();



?>  

Unknown User
2012-03-02 18:21:00
you must have an image  in image1 folder for each torrent
Users online

No users online

Search



Statistics

    Torrents

  • Tracking: 3
  • Todays torrents: 0
  • Seeders: 0
  • Leechers: 0
  • Peers: 0
  • Downloaded: 89.96 GB
  • Uploaded: 9.86 GB

  • Members

  • We have: 838
  • New today: 0
  • Guest today: 9

  • Online

  • Total online: 9
  • Members: 0
  • Guests online: 9
  • Comments: 3
  • Messages: 1,728