04-24-2022, 10:55 AM
Capturas
Ejecutar esta consulta
En c.posts.php --> inc --> class --> c.posts.php
Buscar:
Reemplazar por:
Buscar:
Debajo agregar:
Buscar:
Reemplazar por:
Agregado:
Buscar:
Debajo agregar:
Buscar:
Reemplazar por:
Agregado:
Buscar:
Reemplazar por:
Buscar:
Arriba agregar:
En posts.php --> inc --> php --> posts.php
Buscar:
Debajo agregar:
En m.agregar_from.tpl --> themes --> default --> templates --> modules --> m.agregar_from.tpl
Buscar:
Debajo agregar:
En t.home.tpl --> themes --> default --> templates --> t.home.tpl
Buscar:
Debajo agregar:
En estilo.css --> themes --> default --> estilo.css
Al final 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
Uptobox
http://Registrate o inicia tu sesión par... contenido
4shared
http://Registrate o inicia tu sesión par... contenido
Creditos: Oficialphp
[img]Registrate o inicia tu sesión para ver este contenido[/img]
[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 p_posts ADD post_destacados VARCHAR( 180 ) NOT NULL;
En c.posts.php --> inc --> class --> c.posts.php
Buscar:
Código PHP:
/*
getPreview()
*/
function getPreview(){
global $tsCore;
//
$titulo = $tsCore->setSecure($_POST['titulo'], true);
$cuerpo = $tsCore->setSecure($_POST['cuerpo'], true);
//
return array('titulo' => $titulo, 'cuerpo' => $tsCore->parseBadWords($tsCore->parseBBCode($cuerpo), true));
}
Reemplazar por:
Código PHP:
/*
getPreview()
*/
function getPreview(){
global $tsCore;
//
$titulo = $tsCore->setSecure($_POST['titulo'], true);
$destacados = $tsCore->setSecure($_POST['imagen'], true);
$cuerpo = $tsCore->setSecure($_POST['cuerpo'], true);
//
return array('titulo' => $titulo, 'destacados' => $destacados, 'cuerpo' => $tsCore->parseBadWords($tsCore->parseBBCode($cuerpo), true));
}
Buscar:
Código PHP:
'title' => $tsCore->parseBadWords($tsCore->setSecure($_POST['titulo'], true)),2,
Debajo agregar:
Código PHP:
'destacados' => $tsCore->setSecure($_POST['destacados']),
Buscar:
Código PHP:
// INSERTAMOS
$_SERVER['REMOTE_ADDR'] = $_SERVER['X_FORWARDED_FOR'] ? $_SERVER['X_FORWARDED_FOR'] : $_SERVER['REMOTE_ADDR'];
if(!filter_var($_SERVER['REMOTE_ADDR'], FILTER_VALIDATE_IP)) { die('0: Su ip no se pudo validar.'); }
if(db_exec(array(__FILE__, __LINE__), 'query', 'INSERT INTO `p_posts` (post_user, post_category, post_title, post_body, post_date, post_tags, post_ip, post_private, post_block_comments, post_sponsored, post_sticky, post_smileys, post_visitantes, post_status) VALUES (\''.$tsUser->uid.'\', \''.(int)$postData['category'].'\', \''.$postData['title'].'\', \''.$postData['body'].'\', \''.$postData['date'].'\', \''.$postData['tags'].'\', \''.$_SERVER['REMOTE_ADDR'].'\', \''.(int)$postData['private'].'\', \''.(int)$postData['block_comments'].'\', \''.(int)$postData['sponsored'].'\', \''.(int)$postData['sticky'].'\', \''.(int)$postData['smileys'].'\', \''.(int)$postData['visitantes'].'\', '.(!$tsUser->is_admod && ($tsCore->settings['c_desapprove_post'] == 1 || $tsUser->permisos['gorpap'] == true) ? '\'3\'' : '\'0\'').')')) {
$postID = db_exec('insert_id');
Reemplazar por:
Código PHP:
// INSERTAMOS
$_SERVER['REMOTE_ADDR'] = $_SERVER['X_FORWARDED_FOR'] ? $_SERVER['X_FORWARDED_FOR'] : $_SERVER['REMOTE_ADDR'];
if(!filter_var($_SERVER['REMOTE_ADDR'], FILTER_VALIDATE_IP)) { die('0: Su ip no se pudo validar.'); }
if(db_exec(array(__FILE__, __LINE__), 'query', 'INSERT INTO `p_posts` (post_user, post_category, post_title, post_body, post_date, post_tags, post_ip, post_private, post_block_comments, post_sponsored, post_sticky, post_smileys, post_visitantes, post_status, post_destacados) VALUES (\''.$tsUser->uid.'\', \''.(int)$postData['category'].'\', \''.$postData['title'].'\', \''.$postData['body'].'\', \''.$postData['date'].'\', \''.$postData['tags'].'\', \''.$postData['destacados'].'\', \''.$_SERVER['REMOTE_ADDR'].'\', \''.(int)$postData['private'].'\', \''.(int)$postData['block_comments'].'\', \''.(int)$postData['sponsored'].'\', \''.(int)$postData['sticky'].'\', \''.(int)$postData['smileys'].'\', \''.(int)$postData['visitantes'].'\', '.(!$tsUser->is_admod && ($tsCore->settings['c_desapprove_post'] == 1 || $tsUser->permisos['gorpap'] == true) ? '\'3\'' : '\'0\'').')')) {
$postID = db_exec('insert_id');
Agregado:
Código PHP:
, post_destacados
Código PHP:
\''.$postData['destacados'].'\',
Buscar:
Código PHP:
'title' => $tsCore->parseBadWords($_POST['titulo'], true),
Debajo agregar:
Código PHP:
'destacados' => $tsCore->setSecure($_POST['destacados'], true),
Buscar:
Código PHP:
// ACTUALIZAMOS
if($tsUser->uid == $data['post_user'] || !empty($tsUser->is_admod) || !empty($tsUser->permisos['moedpo'])){
if(db_exec(array(__FILE__, __LINE__), 'query', 'UPDATE p_posts SET post_title = \''.$postData['title'].'\', post_body = \''.$postData['body'].'\', post_tags = \''.$tsCore->setSecure($postData['tags']).'\', post_category = \''.(int)$postData['category'].'\', post_private = \''.$postData['private'].'\', post_block_comments = \''.$postData['block_comments'].'\', post_sponsored = \''.$postData['sponsored'].'\', post_smileys = \''.$postData['smileys'].'\', post_visitantes = \''.$postData['visitantes'].'\', post_sticky = \''.$postData['sticky'].'\' WHERE post_id = \''.(int)$post_id.'\'') or exit( show_error('Error al ejecutar la consulta de la línea '.__LINE__.' de '.__FILE__.'.', 'db') )) {
Reemplazar por:
Código PHP:
// ACTUALIZAMOS
if($tsUser->uid == $data['post_user'] || !empty($tsUser->is_admod) || !empty($tsUser->permisos['moedpo'])){
if(db_exec(array(__FILE__, __LINE__), 'query', 'UPDATE p_posts SET post_title = \''.$postData['title'].'\', post_destacados = \''.$postData['destacados'].'\', post_body = \''.$postData['body'].'\', post_tags = \''.$tsCore->setSecure($postData['tags']).'\', post_category = \''.(int)$postData['category'].'\', post_private = \''.$postData['private'].'\', post_block_comments = \''.$postData['block_comments'].'\', post_sponsored = \''.$postData['sponsored'].'\', post_smileys = \''.$postData['smileys'].'\', post_visitantes = \''.$postData['visitantes'].'\', post_sticky = \''.$postData['sticky'].'\' WHERE post_id = \''.(int)$post_id.'\'') or exit( show_error('Error al ejecutar la consulta de la línea '.__LINE__.' de '.__FILE__.'.', 'db') )) {
Agregado:
Código PHP:
, post_destacados = \''.$postData['destacados'].'\'
Buscar:
Código PHP:
/*********/
$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_comments, p.post_puntos, p.post_private, p.post_sponsored, p.post_status, p.post_sticky, u.user_id, u.user_name, u.user_activo, u.user_baneado, c.c_nombre, c.c_seo, c.c_img FROM p_posts AS p LEFT JOIN u_miembros AS u ON p.post_user = u.user_id '.($tsUser->is_admod && $tsCore->settings['c_see_mod'] == 1 ? '' : ' && u.user_activo = \'1\' && u.user_baneado = \'0\'').' LEFT JOIN p_categorias AS c ON c.cid = p.post_category WHERE '.($tsUser->is_admod && $tsCore->settings['c_see_mod'] == 1 ? 'p.post_id > 0' : 'p.post_status = \'0\' && u.user_activo = \'1\' && u.user_baneado = \'0\'').' '.$c_where.' '.$s_where.' GROUP BY p.post_id ORDER BY '.$s_order.' DESC LIMIT '.$start);
$lastPosts['data'] = result_array($query);
Reemplazar por:
Código PHP:
/*********/
$query = db_exec(array(__FILE__, __LINE__), 'query', 'SELECT p.post_id, p.post_user, p.post_category, p.post_title, p.post_destacados, p.post_date, p.post_comments, p.post_puntos, p.post_private, p.post_sponsored, p.post_status, p.post_sticky, u.user_id, u.user_name, u.user_activo, u.user_baneado, c.c_nombre, c.c_seo, c.c_img FROM p_posts AS p LEFT JOIN u_miembros AS u ON p.post_user = u.user_id '.($tsUser->is_admod && $tsCore->settings['c_see_mod'] == 1 ? '' : ' && u.user_activo = \'1\' && u.user_baneado = \'0\'').' LEFT JOIN p_categorias AS c ON c.cid = p.post_category WHERE '.($tsUser->is_admod && $tsCore->settings['c_see_mod'] == 1 ? 'p.post_id > 0' : 'p.post_status = \'0\' && u.user_activo = \'1\' && u.user_baneado = \'0\'').' '.$c_where.' '.$s_where.' GROUP BY p.post_id ORDER BY '.$s_order.' DESC LIMIT '.$start);
$lastPosts['data'] = result_array($query);
Buscar:
Código PHP:
/*
getComentarios()
*/
Arriba agregar:
Código PHP:
/*
Destacados
*/
function getLastDestacados(){
global $tsCore;
$query = db_exec(array(__FILE__, __LINE__), 'query', 'SELECT post_id, post_user, post_category, post_title, post_date, post_puntos, post_comments, post_private, post_status, post_destacados, c_nombre, c_seo, c_img FROM p_posts AS p LEFT JOIN p_categorias AS c ON c.cid = post_category WHERE post_status = 0 ORDER BY post_puntos < 60 || 80 && post_comments < 15 DESC LIMIT 10');
$data = result_array($query);
//
return $data;
}
En posts.php --> inc --> php --> posts.php
Buscar:
Código PHP:
// AFILIADOS
$smarty->assign("tsAfiliados",$tsAfiliado->getAfiliados());
Debajo agregar:
Código PHP:
// DESTACADOS
$smarty->assign("tsDestacados",$tsPosts->getLastDestacados());
En m.agregar_from.tpl --> themes --> default --> templates --> modules --> m.agregar_from.tpl
Buscar:
Código PHP:
<li>
<label>Tags</label>
<span style="display: none;" class="errormsg"></span>
<input type="text" tabindex="4" name="tags" maxlength="128" class="text-inp required" value="{$tsDraft.b_tags}"/>
Una lista separada por comas, que describa el contenido. Ejemplo: <b>gol, ingleses, Copa Oro, futbol, Chicharito, México</b>
</li>
Debajo agregar:
Código PHP:
<li class="Thumbnail">
<label>Thumbnail</label>
<span style="display: none;" class="errormsg"></span>
<input type="text" tabindex="4" name="destacados" maxlength="500" class="text-inp required" value="{$tsDraft.b_destacados}"/>
<span class="toup-ta">
<b>Agrega la url de una imagen para agregar el Thumbnail. </b>
</span>
<div class="thumb-control">
<img src="{$tsDraft.b_destacados}" class="thumbnail-preview">
</li>
En t.home.tpl --> themes --> default --> templates --> t.home.tpl
Buscar:
Código PHP:
<div id="derecha">
Debajo agregar:
Código PHP:
{include file='modules/m.home_destacados.tpl'}
En estilo.css --> themes --> default --> estilo.css
Al final agregar:
Código PHP:
.destacate{width:200px;height:70px;border-bottom:solid 1px #e0e0e0;display:block;background-color:#f8f8f8;margin-bottom:3px}.destacate a{color:#006595;background:0 0;border:none;font-size:11px;text-decoration:none;font-weight:700;cursor:pointer;width:100px;margin:-9px}.post-cat{color:#adadad;font-size:9px;line-height:14px;display:block;padding:0 5px;text-transform:uppercase}.post-image{float:left;/*! margin-right: 10px; */width:90px;height:68px;background:#eee}.post-title{color:#006595;font-size:13px;line-height:16px;font-weight:700;display:block;max-height:48px;overflow:hidden}.view-more-list{color:#006595;text-decoration:none;font-weight:700;cursor:pointer;padding:3px;border-top:1px solid #cfe9f4;border-radius:0 0 5px 5px;text-align:center;background:#eff9fd}.Thumbnail{padding:10px;background:#ddd;border-right:solid 30px #eee;position:relative;min-height:220px;margin-bottom:15px;width:320px}.Thumbnail>input{width:300px!important}.Thumbnail .thumbnail-preview{width:154px;height:116px;background:url(images/camera-big.png) #eee no-repeat center;margin:20px auto 10px;display:block;border:solid 4px #fff;outline:solid 1px #CCC}.Thumbnail label{color:#333;font-size:18px;text-shadow:1px 1px 0 #fff;padding:2px;text-align:left;margin-right:5px}#lastDestacado .wMod-h{background:url(images/icons/posts.png) no-repeat left center}.destacados-data{padding:0;text-align:center;position:relative;height:auto;overflow:hidden}
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
Uptobox
http://Registrate o inicia tu sesión par... contenido
4shared
http://Registrate o inicia tu sesión par... contenido
Creditos: Oficialphp