07-07-2022, 01:46 PM
2
Captura[img]Registrate o inicia tu sesión para ver este contenido[/img]
En c.tops.php --> inc --> class --> c.tops.php
Buscar:
Código PHP: ( Seleccionar Todo )
// FAVORITOS
$data['favoritos'] = $this->getTopPostsVars($fecha, $cat, 'favoritos');
Debajo agregar:
Código PHP: ( Seleccionar Todo )
// POST MAS VISITADOS
$data['Hits'] = $this->getTopPostsVars($fecha, $cat, 'Hits');
Buscar:
Código PHP: ( Seleccionar Todo )
/*
getTopPostsQuery($data)
*/
function getTopPostsQuery($data){
//
$query = db_exec(array(__FILE__, __LINE__), 'query', 'SELECT p.post_id, p.post_category, '.$data['type'].', p.post_puntos, p.post_hits, p.post_title, c.c_seo, c.c_img FROM p_posts AS p LEFT JOIN p_categorias AS c ON c.cid = p.post_category WHERE p.post_status = \'0\' AND p.post_date BETWEEN '.$data['start'].' AND '.$data['end'].' '.$data['scat'].' ORDER BY '.$data['type'].' DESC LIMIT 10');
$datos = result_array($query);
//
return $datos;
}
Al lado de:
Código PHP: ( Seleccionar Todo )
p.post_puntos,
Agregar:
Código PHP: ( Seleccionar Todo )
p.post_hits,
En m.top_posts.tpl --> themes --> default --> templates --> modules --> m.top_posts.tpl
Buscar:
Código PHP: ( Seleccionar Todo )
<!--SEGUIDORES-->
<div class="boxy xtralarge">
<div class="boxy-title">
<h3>Top post con más seguidores</h3>
<span class="icon-noti follow-n"></span>
</div>
<div class="boxy-content">
{if !$tsTops.seguidores}<div class="emptyData">Nada por aqui</div>
{else}
<ol>
{foreach from=$tsTops.seguidores item=p}
<li class="categoriaPost clearfix" style="background-image:url({$tsConfig.tema.t_url}/images/icons/cat/{$p.c_img})"><a href="{$tsConfig.url}/posts/{$p.c_seo}/{$p.post_id}/{$p.post_title|seo}.html">{$p.post_title|truncate:45}</a> <span>{$p.post_seguidores}</span></li>
{/foreach}
</ol>
{/if}
</div>
</div>
Debajo agregar:
Código PHP: ( Seleccionar Todo )
<!--VISITAS-->
<div class="boxy xtralarge">
<div class="boxy-title">
<h3>Top post con más visitas</h3>
<span class="icon-noti follow-n"></span>
</div>
<div class="boxy-content">
{if !$tsTops.seguidores}<div class="emptyData">Nada por aqui</div>
{else}
<ol>
{foreach from=$tsTops.Hits item=p}
<li class="categoriaPost clearfix" style="background-image:url({$tsConfig.tema.t_url}/images/icons/cat/{$p.c_img})"><a href="{$tsConfig.url}/posts/{$p.c_seo}/{$p.post_id}/{$p.post_title|seo}.html">{$p.post_title|truncate:45}</a> <span>{$p.post_hits}</span></li>
{/foreach}
</ol>
{/if}
</div>
</div>
Creditos: Debes agradecer para ver el contenido...



Facebook
Twitter
Reddit
Digg
del.icio.us
Tumblr
Pinterest
Blogger
Fark
LinkedIn
Mix
Google