01-26-2021, 08:55 AM
0
[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: ( Seleccionar Todo )
$lastPosts['data'] = result_array($query);
Debajo agregar:
Código PHP: ( Seleccionar Todo )
// VISITADO?
$i = 0;
foreach($lastPosts['data'] as $dato) {
$visto = db_exec('fetch_assoc', db_exec(array(__FILE__, __LINE__), 'query', 'SELECT id FROM `w_visitas` WHERE `for` = \''.(int)$dato['post_id'].'\' && `type` = \'2\' && '.($tsUser->is_member ? '(`user` = \''.$tsUser->uid.'\' OR `ip` LIKE \''.$_SERVER['REMOTE_ADDR'].'\')' : '`ip` LIKE \''.$_SERVER['REMOTE_ADDR'].'\'').' LIMIT 1'));
($tsUser->is_member && $visto == 0) ? $lastPosts['data'][$i]['visto'] = false : $lastPosts['data'][$i]['visto'] = true;
$i++;
}
En m.home_last_posts.tpl --> themes --> default --> templates --> modules --> m.home_last_posts.tpl
Buscar:
Código PHP: ( Seleccionar Todo )
{$p.post_title|truncate:50}
Al lado agregar:
Con icono
Código PHP: ( Seleccionar Todo )
{if !$p.visto && $tsUser->is_member}<img style="vertical-align: top;margin-left: 3px;" alt="Nuevo" src="{$tsConfig.tema.t_url}/images/icons/cat/new.png">{/if}
Con texto
Código PHP: ( Seleccionar Todo )
{if !$p.visto && $tsUser->is_member}<span id="pnuevo">NUEVO</span>{/if}
Añadir al final en taringa.css:
Código PHP: ( Seleccionar Todo )
#pnuevo {
font-size: 10px;
float: left;
background-image: linear-gradient(to top, #096aa1, #26c3f6);
padding: 2px 6px;
color: white;
border-radius: 3px;
font-weight: 400;
margin-right: 8px;
}
Creditos: Debes agradecer para ver el contenido...


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