07-01-2022, 11:55 AM
17
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: ( Seleccionar Todo )
ALTER TABLE u_muro ADD p_nick varchar(16) NOT NULL;
En c.posts.php --> inc --> class --> c.posts.php
Buscar:
Código PHP: ( Seleccionar Todo )
/*
getRelated()
*/
Arriba agregar:
Código PHP: ( Seleccionar Todo )
/*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: ( Seleccionar Todo )
// TOP POSTS
$smarty->assign("tsTopPosts",$tsTops->getHomeTopPosts());
Debajo agregar:
Código PHP: ( Seleccionar Todo )
// ULTIMOS SHOUTS
$smarty->assign("tsMuro",$tsPosts->getNews());
En ajax.posts.php --> inc --> php --> ajax --> ajax.posts.php
Buscar:
Código PHP: ( Seleccionar Todo )
case 'posts-last-comentarios':
//<--
$smarty->assign("tsComments",$tsPosts->getLastComentarios());
//-->
break;
Debajo agregar:
Código PHP: ( Seleccionar Todo )
case 'posts-last-shouts':
//<--
$smarty->assign("tsMuro",$tsPosts->getNews());
//-->
break;
En t.home.tpl --> themes --> default --> templates --> t.home.tpl
Buscar:
Código PHP: ( Seleccionar Todo )
{include file='modules/m.home_afiliados.tpl'}
Arriba agregar:
Código PHP: ( Seleccionar Todo )
{include file='modules/m.home_shouts.tpl'}
En main_header.tpl --> themes --> default --> templates --> sections --> main_header.tpl
Buscar:
Código PHP: ( Seleccionar Todo )
<link href="{$tsConfig.css}/{$tsPage}.css" rel="stylesheet" type="text/css" />
Debajo agregar:
Código PHP: ( Seleccionar Todo )
<link href="{$tsConfig.tema.t_url}/css/shadowbox.css" rel="stylesheet" type="text/css" />
Buscar:
Código PHP: ( Seleccionar Todo )
<script src="{$tsConfig.js}/wysibb.js" type="text/javascript"></script>
Debajo agregar:
Código PHP: ( Seleccionar Todo )
<script src="{$tsConfig.js}/shadowbox.js" type="text/javascript"></script>
Buscar:
Código PHP: ( Seleccionar Todo )
</head>
Arriba agregar:
Código PHP: ( Seleccionar Todo )
<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: ( Seleccionar Todo )
/*ACTUALIZAR SHOUTS*/
function actualizar_shouts(){
$('#actualizar_shouts').css('opacity', 0.4);
$('#loading').slideDown(250);
$.ajax({
type: 'GET',
url: global_data.url + '/posts-last-shouts.php',
cache: false,
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 t = $('#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',
url: global_data.url + '/posts-last-shouts.php',
cache: false,
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: ( Seleccionar Todo )
.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
Debes agradecer para ver el contenido...
Google Drive
Debes agradecer para ver el contenido...
Mediafire
Debes agradecer para ver el contenido...
Uptobox
Debes agradecer para ver el contenido...
4shared
Debes agradecer para ver el contenido...
Creditos: Debes agradecer para ver el contenido...



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