PHPost | Soporte, Descargas y Tutoriales de Risus Nova
COMPLEMENTOS Últimos Shouts Home (ACT-FIX-22) - Versión para impresión

+- PHPost | Soporte, Descargas y Tutoriales de Risus Nova (https://phpost.es)
+-- Foro: Risus 1.3 (https://phpost.es/foro-Risus-1-3)
+--- Foro: Complementos (https://phpost.es/foro-Complementos)
+---- Foro: Complementos Terminados (https://phpost.es/foro-Complementos-Terminados)
+---- Tema: COMPLEMENTOS Últimos Shouts Home (ACT-FIX-22) (/tema-Complementos-Terminados-%C3%9Altimos-Shouts-Home-ACT-FIX-22)



Últimos Shouts Home (ACT-FIX-22) - Chctrpgo - 07-01-2022

Actualizado y fixeado los últimos shouts en la home, vale para cualquier tema, lo que cambia es el diseño y solo hay que adaptárselo.


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



Ejecutar esta consulta
Código PHP:
ALTER TABLE u_muro ADD p_nick varchar(16NOT NULL


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

Buscar:
Código PHP:
/*
        getRelated()
    */ 


Arriba agregar:
Código PHP:
/*Ultimos Shouts*/
    
function getNews($start 0$limit 10){
        global 
$tsUser$tsCore;
        
// OBTENEMOS LAS ULTIMAS PUBLICACIONES        
        
$query db_exec(array(__FILE____LINE__), 'query''SELECT *,u.* FROM u_muro LEFT JOIN u_miembros AS u ON p_user = u.user_id ORDER BY p_date DESC LIMIT '.$start.','.$limit.'');
        while(
$row db_exec('fetch_array'$query)){
            
// MENCIONES
            
$row['p_body'] = $tsCore->parseBadWords($tsCore->parseBBCode($tsCore->setMenciones($row['p_body'])), true);
            
// CARGAR ADJUNTOS
            
if($row['p_type'] != 1){
                
$queryDos db_exec(array(__FILE____LINE__), 'query''SELECT * FROM u_muro_adjuntos WHERE pub_id = \''.$row['pub_id'].'\' LIMIT 1');
                
$adj db_exec('fetch_assoc'$queryDos);                
                
//
                
$data[] = array_merge($row,$adj);
            } else 
$data[] = $row;
            
//
        
}
        
// RETORNAMOS
        
return array('total' => count($data), 'data' => $data);
    } 

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

Buscar:
Código PHP:
// TOP POSTS
        
$smarty->assign("tsTopPosts",$tsTops->getHomeTopPosts()); 


Debajo agregar:
Código PHP:
// ULTIMOS SHOUTS
        
$smarty->assign("tsMuro",$tsPosts->getNews()); 

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

Buscar:
Código PHP:
case 'posts-last-comentarios':
            
//<--
                
$smarty->assign("tsComments",$tsPosts->getLastComentarios());
            
//-->
        
break; 


Debajo agregar:
Código PHP:
case 'posts-last-shouts':
            
//<--
                
$smarty->assign("tsMuro",$tsPosts->getNews());
            
//-->
        
break; 


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

Buscar:                
Código PHP:
{include file='modules/m.home_afiliados.tpl'

   
Arriba agregar:
Código PHP:
{include file='modules/m.home_shouts.tpl'

   
En main_header.tpl --> themes --> default --> templates --> sections --> main_header.tpl

Buscar:    
Código PHP:
<link href="{$tsConfig.css}/{$tsPage}.css" rel="stylesheet" type="text/css" /> 


Debajo agregar:
Código PHP:
<link href="{$tsConfig.tema.t_url}/css/shadowbox.css" rel="stylesheet" type="text/css" /> 


Buscar:    
Código PHP:
<script src="{$tsConfig.js}/wysibb.js" type="text/javascript"></script


Debajo agregar:
Código PHP:
<script src="{$tsConfig.js}/shadowbox.js" type="text/javascript"></script


Buscar:    
Código PHP:
</head


Arriba agregar:
Código PHP:
<script type='text/javascript'>
{
literal}
Shadowbox.init({
overlayColor"#000",
overlayOpacity"0.6",
});
{/
literal}
</
script


En funciones.js --> themes --> default --> js --> funciones.js

Al final agregar:    
Código PHP:
/*ACTUALIZAR SHOUTS*/        
function actualizar_shouts(){
$(
'#actualizar_shouts').css('opacity'0.4);
$(
'#loading').slideDown(250);
$.
ajax({
  
type'GET',
  
urlglobal_data.url '/posts-last-shouts.php',
  
cachefalse,
  
success: function(h){
   $(
'#actualizar_shouts').html(h);
  },
  
complete: function(){
    $(
'#actualizar_shouts').css('opacity'1);
    $(
'#loading').slideUp(350);
  }
});
}        

/* Compartir shout */
$(function(){
$(
'a > .e.sho').parent('a').click(function(e){
e.preventDefault();
$(
this).parent().toggleClass('monitor-notificaciones');
$(
'#compose-box').toggle();
});

$(
'#add-new-shout').click(function(){
var 
= $('#my-shout-body-menu');
if(!
t.val() || !t.val().replace(/ /g'')){ t.focus(); return; }
var 
$t = $(this);
$.
post(global_data.url '/muro-stream.php?do=post&type=status''data=' encodeURIComponent(t.val()) + '&pid=' $t.attr('uid'), function(s){
if(
s.charAt(0) == '0'){
$(
'div#compose-box .shout-box').hide().siblings('.shout-box-submit').html(s.substring(2)).show();
}else{
$(
'div#compose-box .shout-box').hide().siblings('.shout-box-submit').show();

setTimeout(function(){

/*mio*/
$('#actualizar_shouts').css('opacity'0.4);
$(
'#loading').slideDown(250);
$.
ajax({
  
type'GET',
  
urlglobal_data.url '/posts-last-shouts.php',
  
cachefalse,
  
success: function(h){
   $(
'#actualizar_shouts').html(h);
  },
  
complete: function(){
   $(
'#actualizar_shouts').css('opacity'1);
   $(
'#loading').slideUp(350);
  }
});
/*fin mio*/
 
$('#compose-box').fadeOut('fast', function(){
$(
'.navitem').removeClass('monitor-notificaciones');
$(
'#shout').removeClass('activo');
$(
'#compose-box .shout-box-submit').hide();
$(
'#compose-box .shout-box').show();
//Limpio form
$('#my-shout-body-menu').val('');
});
}, 
500);
}
});
});
}); 
 
 
En extras.css --> themes --> default --> extras.css

Al final agregar:        
Código PHP:
.Story_Foot,.body-sh a,.body-sh p{word-wrap:break-word}.s-borde,.s-numero{font-weight:700;color:#666}.body-sh,.espacio,.newbody,.spa-s,.t-new{clear:both}.Story_Foot,.spa-s,a#video-h{position:relative}.body-sh img:hover,.s.s-come,.s.s-like{opacity:.5}.body-sh a,b#min-via{color:#067cb4!important}#otro-muro span,b#min-via{font-size:11px;font-weight:400}.i.tipo0,.i.tipo2,.i.tipo3,.i.tipo4{margin:4px 10px 0 0}#otro-muro,.body-sh,.h-Link,.newbody,.spa-s,.t-new{overflow:hidden}#lastshouts .wMod-h{background:url(images/icons/megaphone.png) left center no-repeat}#box-toup{float:right;width:125px;margin:0 0 0 5px}#box-toup img{max-width:125px;margin-top:-10px}.ct{float:right;padding-left:10px;background:url(img/wpx.png) center center repeat-x}.body-sh{background:#fff;border:1px solid #ddd;padding:5px;-moz-border-radius:5px 5px 0 0;-webkit-border-radius:5px 5px 0 0;border-radius:5px 5px 0 0}.body-sh a{display:block;float:left;font-size:12px;font-weight:700;max-width:125px}.body-sh p{float:right;width:128px;margin:0 0 20px 10px;color:#7b7b7b}.s,.s-borde,.s-numero,.t-new h2,.tiposhout,.tiposhout span{float:left}.spa-s{margin-top:0;margin-bottom:10px}.Story_Foot{float:left;width:410px;height:auto;border:1px solid #ccc;border-top:1px solid #e9e9e9!important;-moz-border-radius:0 0 5px 5px;-webkit-border-radius:0 0 5px 5px;border-radius:0 0 5px 5px;-webkit-box-shadow:0 2px 3px #eee;-moz-box-shadow:0 2px 3px #eee;box-shadow:0 2px 3px #eee;background:url(img/bfs.gif) bottom left repeat-x #fafafa}.i,.s{background:url(img/s16.png);height:16px;width:16px;display:block}.s{margin:2px 0 0!important}.tiposhout{margin:4px 0 0 10px}.s-borde{margin:0;padding:5px 10px 0;height:27px;background:url(img/button-action-s.png) left bottom no-repeat}.body-sh-img,a#min-shop img{background:#fff;width:30px;height:30px}.s.s-come{background-position:-239px -136px}.s-numero{padding:0 0 0 4px;font-size:12px;line-height:21px}.s.s-like{background-position:-170px -136px}.s.tiempo-h{background-position:-118px -136px;opacity:.5}.data-shout{display:block;float:right}.i.actu{background-position:-204px -68px}.t-new h2{margin:0;font-size:13px}.t-new{border-bottom:1px dashed #ccc;margin:0 0 15px}.espacio{margin-bottom:20px}a#video-h h3{position:absolute;padding:5px;margin:0;color:#fff!important;background:url(img/bg-overlay.png);font-size:10px;top:5px;width:110px}a#video-h span{background:url(img/play-home-azul.png) no-repeat;height:46px;width:46px;display:block;position:absolute;top:18px;left:48px;opacity:.7}.body-sh a:hover{color:#a70d44!important}.body-sh-img{padding:2px;border:1px solid #ddd}a#min-shop img{border:1px solid #fff;position:absolute;left:30px;top:30px;display:block}#otro-muro{width:132px;float:right}#otro-muro span{color:#999!important;font-style:italic;float:right}.i.tipo0{background-position:-1px -137px}.i.tipo3{background-position:-52px -137px}.i.tipo4{background-position:-18px -136px}.i.tipo2{background-position:-34px -138px}.h-Link{padding:10px;background:#eee;margin:5px 0 0;border-radius:5px;-moz-border-radius:5px;float:right;width:182px} 



Y subir esta carpeta

Descarga

Mega
http://Registrate o inicia tu sesión para ver este contenido

Google Drive
http://Registrate o inicia tu sesión para ver este contenido

Mediafire
http://Registrate o inicia tu sesión para ver este contenido

Uptobox
http://Registrate o inicia tu sesión para ver este contenido

4shared
http://Registrate o inicia tu sesión para ver este contenido






Creditos: To-Up


RE: Últimos Shouts Home (ACT-FIX-22) - will23 - 08-28-2022

Gracias