¡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 Post nuevo (sin visitar) en la home (Act 1.3)
#1

0
[img]Registrate o inicia tu sesión para ver este contenido[/img]


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

Buscar:

$lastPosts['data'] = result_array($query); 


Debajo agregar:

// 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:

{$p.post_title|truncate:50


Al lado agregar:

Con icono

{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

{if !$p.visto && $tsUser->is_member}<span id="pnuevo">NUEVO</span>{/if} 

Añadir al final en taringa.css:

#pnuevo {
    
font-size10px;
    
floatleft;
    
background-imagelinear-gradient(to top#096aa1, #26c3f6);
    
padding2px 6px;
    
colorwhite;
    
border-radius3px;
    
font-weight400;
    
margin-right8px;




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


Compartir en:

Salto de foro:


Usuarios navegando en este tema: 1 invitado(s)