05-14-2024, 02:19 PM
Demo
http://Registrate o inicia tu sesión par... contenido
Captura
En c.posts.php --> inc --> class --> c.posts.php
Buscar:
Arriba agregar:
En posts.php --> inc --> php --> posts.php
Buscar:
Debajo agregar:
En t.home.tpl --> themes --> default --> templates --> t.home.tpl
Buscar:
Arriba agregar:
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
http://Registrate o inicia tu sesión par... contenido
Captura
[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:
/*
getCatData()
:: OBTENER DATOS DE UNA CATEGORIA
*/
Arriba agregar:
Código PHP:
/*
getPostsAzar()
*/
function getPostsAzar(){
global $tsCore, $tsUser;
//
$query = db_exec(array(__FILE__, __LINE__), 'query', 'SELECT p.post_id, p.post_user, p.post_category, p.post_title, p.post_date, p.post_hits, u.user_name, c.c_seo, c.c_nombre, c.c_img FROM p_posts AS p LEFT JOIN u_miembros AS u ON u.user_id = p.post_user LEFT JOIN p_categorias AS c ON c.cid = p.post_category WHERE p.post_status = \'0\' '.($tsUser->is_admod && $tsCore->settings['c_see_mod'] == 1 ? '' : 'AND u.user_activo = \'1\' && u.user_baneado = \'0\'').' ORDER BY RAND() ASC LIMIT 10');
//
$data = result_array($query);
//
return $data;
}
En posts.php --> inc --> php --> posts.php
Buscar:
Código PHP:
// TOP USERS
$smarty->assign("tsTopUsers",$tsTops->getHomeTopUsers());
Debajo agregar:
Código PHP:
//POSTS AL AZAR
$smarty->assign("tsPostsAzar",$tsPosts->getPostsAzar());
En t.home.tpl --> themes --> default --> templates --> t.home.tpl
Buscar:
Código PHP:
{if $tsConfig.c_fotos_private == 1 && !$tsUser->is_member}
{else}
{include file='modules/m.home_fotos.tpl'}
{/if}
Arriba agregar:
Código PHP:
{include file='modules/m.home_posts_azar.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