View Single Post
  #4  
Old 12th April 2011, 05:30
lafouine022 lafouine022 is offline
Senior Member
 
Join Date: Feb 2010
P2P
Posts: 120
Talking
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:

Last edited by lafouine022; 12th April 2011 at 06:30.
Reply With Quote
The Following User Says Thank You to lafouine022 For This Useful Post:
Marco (21st August 2013)