¡Bienvenido! ¿Aún no estás registrado?, deberás registrarte antes de poder usar el Chat, Comentar y Descargar en el Foro. Usa un email válido para la activación.
Calificación:
  • 0 voto(s) - 0 Media
  • 1
  • 2
  • 3
  • 4
  • 5

COMPLEMENTOS Top Posts Favorito y Top Visitado (1.3)
#1

11
Mejor respuesta del mensaje Top Posts Favorito y Top Visitado (1.3)
[img]Registrate o inicia tu sesión para ver este contenido[/img]



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

Buscar:
 
/*
        lalala
    */


Arriba agregar:
 
/* Top Posts Visitados por Vellenger ._.*/
    function topvis(){
        global $tsCore, $tsUser;
        $query = db_exec(array(__FILE__, __LINE__), 'query', 'SELECT c.cid, c.c_nombre, c.c_seo, c.c_img, p.post_hits, p.post_id, p.post_title, p.post_category, p.post_date, p.post_comments, p.post_puntos, p.post_status FROM p_categorias AS c LEFT JOIN p_posts AS p ON p.post_category = c.cid WHERE p.post_status = 0 AND p.post_hits >0  GROUP BY p.post_id ORDER BY p.post_hits DESC LIMIT 5');
        $data = result_array($query);
        //
        return $data;
    }
    /* Top Posts Favoritos por Vellenger ._.*/
    function topfav(){
        global $tsCore, $tsUser;
        $query = db_exec(array(__FILE__, __LINE__), 'query', 'SELECT c.cid, c.c_nombre, c.c_seo, c.c_img, p.post_favoritos, p.post_id, p.post_title, p.post_category, p.post_hits, p.post_date, p.post_comments, p.post_puntos, p.post_status FROM p_categorias AS c LEFT JOIN p_posts AS p ON p.post_category = c.cid WHERE p.post_status = 0 AND p.post_favoritos >0  GROUP BY p.post_id ORDER BY p.post_favoritos DESC LIMIT 5');
        $data = result_array($query);
        //
        return $data;
    }


En posts.php --> inc --> php --> posts.php

Buscar:
 
$smarty->assign("tsDo",$_GET['do']);


Debajo agregan:
 
$smarty->assign("tsTopfav",$tsPosts->topfav());
$smarty->assign("tsTopvis",$tsPosts->topvis());


En t.home.tpl --> themes --> default --> templates --> t.home.tpl

Buscar:

 
{include file='modules/m.home_stats.tpl'}


Debajo agregar:
 
{include file='modules/m.home_top_posts_fav.tpl'}

{include file='modules/m.home_top_posts_vis.tpl'}


Y subir esta carpeta

Mega
Debes agradecer para ver el contenido...

Google Drive
Debes agradecer para ver el contenido...

Mediafire
Debes agradecer para ver el contenido...




Creditos: Debes agradecer para ver el contenido...
Responder
#2

1
Gracias
Responder
#3

0
Gracias
Responder


Compartir en:

Salto de foro:


Usuarios navegando en este tema: 2 invitado(s)