no use genre mod you already subcategory!
in this query
PHP Code:
$query = sql_query("SELECT ".($torrentspeed == 'yes' ? '(t.size * t.times_completed + SUM(p.downloaded)) / (UNIX_TIMESTAMP(NOW()) - UNIX_TIMESTAMP(t.added)) AS totalspeed,' : '')." t.*, c.id as categoryid, c.image, c.name as categoryname, u.username, g.namestyle {$from} LEFT JOIN categories c ON (t.category=c.id) LEFT JOIN users u ON (t.owner=u.id) LEFT JOIN usergroups g ON (u.usergroup=g.gid) ".($torrentspeed == 'yes' ? 'LEFT JOIN peers p ON (t.id=p.torrent)' : '')." WHERE ".($showvisible ? "t.visible = 'yes' AND " : "")."t.banned = 'no'".(isset($extraqueries) ? $extraqueries : '')." {$groupby}{$orderbyvalue} $limit") or sqlerr(__FILE__,__LINE__);
remplace by this:
PHP Code:
$query = sql_query("SELECT ".($torrentspeed == 'yes' ? '(t.size * t.times_completed + SUM(p.downloaded)) / (UNIX_TIMESTAMP(NOW()) - UNIX_TIMESTAMP(t.added)) AS totalspeed,' : '')." t.*, c.id as categoryid, c.image, c.name as categoryname, c.pid as categorypid, u.username, g.namestyle {$from} LEFT JOIN categories c ON (t.category=c.id) LEFT JOIN users u ON (t.owner=u.id) LEFT JOIN usergroups g ON (u.usergroup=g.gid) ".($torrentspeed == 'yes' ? 'LEFT JOIN peers p ON (t.id=p.torrent)' : '')." WHERE ".($showvisible ? "t.visible = 'yes' AND " : "")."t.banned = 'no'".(isset($extraqueries) ? $extraqueries : '')." {$groupby}{$orderbyvalue} $limit") or sqlerr(__FILE__,__LINE__);
and remplace
PHP Code:
$torrent_image = '<a href="'.$seolink.'" target="_self" /><img src="'.$BASEURL.'/'.$pic_base_url.$table_cat.'/'.$torrents['image'].'" border="0" alt="'.$categoryinfo.'" title="'.$categoryinfo.'" /></a>';
by
PHP Code:
$torrent_image = '<a href="'.$seolink.'" target="_self" /><img src="'.$BASEURL.'/'.$pic_base_url.$table_cat.'/'.$torrents['image'].'" border="0" alt="'.$categoryinfo.'" title="'.$categoryinfo.'" /></a>';
//////
$cimg3 = sql_query("SELECT * FROM categories WHERE type='c' and id =" .$torrents['categorypid']);
while($catimg=mysql_fetch_assoc($cimg3))
{
$catimg2= '<a href="'.$BASEURL.'/'.$catimg['name'].'-c-'.$catimg['id'].'.ts"><img src="'.$BASEURL.'/'.$pic_base_url.$table_cat.'/'.$catimg['image'].'" alt="" title="'.$catimg['name'].'"/></a>';
}
/////
so look the variable $catimg2 ;)
is work for me :bubble: