Phpost

Versión completa: Top Categorías en la Home (Act 1.3)
Actualmente estas viendo una versión simplificada de nuestro contenido. Ver la versión completa con el formato correcto.
Capturas
[img]Registrate o inicia tu sesión para ver este contenido[/img]
 
[img]Registrate o inicia tu sesión para ver este contenido[/img]



En c.posts.php  --> inc --> class --> c.posts.php

Buscar:
Código PHP:
/*
        lalala
    */ 
 
 
Arriba agregar:
Código PHP:
/* Top Categorias*/
    
function topcat(){
       global 
$tsUser$tsCore;
       
$query db_exec(array(__FILE____LINE__), 'query''SELECT c.cid, c.c_nombre,c.c_seo, c.c_img, COUNT(p.post_id) AS total, p.post_category FROM p_categorias AS c LEFT JOIN p_posts AS p ON p.post_category = c.cid WHERE post_status = 0 GROUP BY c.c_nombre ORDER BY c.c_nombre ASC');
       
$data result_array($query);
       return 
$data;
    } 
 
 
En posts.php  --> inc --> php --> posts.php

Buscar:
Código PHP:
$smarty->assign("tsDo",$_GET['do']); 
 
 
Debajo agregar:
Código PHP:
$smarty->assign("tsTopcat",$tsPosts->topcat()); 
 
 
En t.home.tpl --> themes --> default --> templates --> t.home.tpl

Buscar:
Código PHP:
{include file='modules/m.home_afiliados.tpl'
 
 
Arriba agregar:
Código PHP:
{include file='modules/m.home_topcat.tpl'
 
 
Y subir esta carpeta

Mega
http://Registrate o inicia tu sesión par... contenido

Google Drive
http://Registrate o inicia tu sesión par... contenido

Mediafire
http://Registrate o inicia tu sesión par... contenido

Uptobox
http://Registrate o inicia tu sesión par... contenido

4shared
http://Registrate o inicia tu sesión par... contenido



Creditos: Vellenger
Gracias
Gracias