02-26-2021, 11:58 AM
9
[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]
[img]Registrate o inicia tu sesión para ver este contenido[/img]
En .htaccess buscar:
Código: ( Seleccionar Todo )
RewriteRule ^admin/news/nueva inc/php/admin.php?action=news&act=nuevo [QSA,L]
Debajo agregar:
Código: ( Seleccionar Todo )
RewriteRule ^admin/mensajes/leer/([0-9]+)$ inc/php/admin.php?action=mensajes&act=leer&mpid=$1 [QSA,L]
En c.user.php --> inc --> class --> c.user.php buscar:
Código: ( Seleccionar Todo )
/*
getUserName($user_id)
*/
function getUserName($user_id){
//
$query = db_exec(array(__FILE__, __LINE__), 'query', 'SELECT user_name FROM u_miembros WHERE user_id = \''.(int)$user_id.'\' LIMIT 1');
$tsUser = db_exec('fetch_assoc', $query);
//
return $tsUser['user_name'];
}
Debajo agregar:
Código: ( Seleccionar Todo )
/*
getUserRango($user_id)
*/
function getUserRango($user_id = NULL){
//
$query = db_exec(array(__FILE__, __LINE__), 'query', 'SELECT r.rango_id, r.r_name, r.r_color, u.user_id, u.user_rango FROM u_rangos AS r LEFT JOIN u_miembros AS u ON u.user_rango = r.rango_id WHERE user_id = \''.(int)$user_id.'\' LIMIT 1');
$tsUser = db_exec('fetch_assoc', $query);
//
return $tsUser['r_color'];
}
En c.admin.php --> inc --> class --> c.admin.php al final buscar:
Código: ( Seleccionar Todo )
/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
}
Agregar arriba:
Código: ( Seleccionar Todo )
function delMensajes()
{
global $tsCore;
$mp = $_POST['mp'];
if (db_exec('num_rows', db_exec(array(__FILE__, __LINE__), 'query', 'SELECT mp_id FROM u_mensajes WHERE mp_id = \'' .
$tsCore->setSecure($mp) . '\' LIMIT 1')))
{
if (db_exec(array(__FILE__, __LINE__), 'query', 'DELETE FROM u_mensajes WHERE mp_id = \'' . $tsCore->setSecure($mp) . '\''))
db_exec(array(__FILE__, __LINE__), 'query', 'DELETE FROM u_respuestas WHERE mp_id = \'' . $tsCore->setSecure($mp) . '\'');
return '1: Mensaje Eliminado';
} else
return '0: El mensaje no existe';
}
function delMpres()
{
global $tsCore;
$rmp = $_POST['rmp'];
if (db_exec('num_rows', db_exec(array(__FILE__, __LINE__), 'query', 'SELECT mr_id FROM u_respuestas WHERE mr_id = \'' .
$tsCore->setSecure($rmp) . '\' LIMIT 1')))
{
if (db_exec(array(__FILE__, __LINE__), 'query', 'DELETE FROM u_respuestas WHERE mr_id = \'' . $tsCore->setSecure($rmp) . '\''))
return '1: Respuesta Eliminada';
} else
return '0: El mensaje no existe';
}
En admin.php --> inc --> php --> admin.php buscar:
Código: ( Seleccionar Todo )
} elseif($action == 'temas'){
Reemplazar por:
Código: ( Seleccionar Todo )
}elseif($action == 'mensajes'){
include("../class/c.mp.php");
$tsMp =new tsMp();
if(empty($act)){
$smarty->assign("tsCmp",$tsMp->getControlMp());
} elseif($act == 'leer'){
$smarty->assign("tsDatamp",$tsMp->getDatmp());
$smarty->assign("tsLeermp",$tsMp->getLeermp());
}
} elseif($action == 'temas'){
Buscar:
Código: ( Seleccionar Todo )
$smarty->assign("tsUsername",$tsUser->getUserName($user_id));
Debajo agregar:
Código: ( Seleccionar Todo )
$smarty->assign("tsUserRango",$tsUser->getUserRango($user_id));
En ajax.admin.php --> inc --> php --> ajax --> ajax.admin.php buscar:
Código: ( Seleccionar Todo )
'admin-badwords-delete' => array('n' => 4, 'p' => ''),
Debajo agregar:
Código: ( Seleccionar Todo )
'admin-mensajes-borrar' => array('n' => 4, 'p' => ''),
'admin-respuestas-borrar' => array('n' => 4, 'p' => ''),
Buscar:
Código: ( Seleccionar Todo )
default:
die('0: Este archivo no existe.');
break;
Arriba agregar:
Código: ( Seleccionar Todo )
case 'admin-mensajes-borrar':
//<---
echo $tsAdmin->delMensajes();
//--->
break;
case 'admin-respuestas-borrar':
//<---
echo $tsAdmin->delMpres();
//--->
break;
En admin.js --> themes --> default --> js --> admin.js buscar:
Código: ( Seleccionar Todo )
users: {
setInActive: function(uid){
Arriba agregar:
Código: ( Seleccionar Todo )
mp : {
borrar:function(mp_id, gew){
if(!gew){
mydialog.show();
mydialog.title('Borrar Mensaje');
mydialog.body('¿Quieres borrar el mensaje completo?');
mydialog.buttons(true, true, 'Sí', "admin.mp.borrar('" + mp_id + "', true)", true, false, true, 'No', 'close', true, true);
mydialog.center();
}else{
$('#loading').fadeIn(250);
$.post(global_data.url + '/admin-mensajes-borrar.php', 'mp=' + mp_id, function(a){
mydialog.alert((a.charAt(0) == '0' ? 'Opps!' : 'Hecho'), a.substring(3), false);
mydialog.center();
success: if(a.charAt(0) == '1') $('#mp_' + mp_id).fadeOut(); $('#loading').fadeOut(350);
});
}
},
},
rmp : {
borrar:function(mr_id, gew){
if(!gew){
mydialog.show();
mydialog.title('Borrar Respuesta');
mydialog.body('¿Quiere borrar la respuesta?');
mydialog.buttons(true, true, 'Sí', "admin.rmp.borrar('" + mr_id + "', true)", true, false, true, 'No', 'close', true, true);
mydialog.center();
}else{
$('#loading').fadeIn(250);
$.post(global_data.url + '/admin-respuestas-borrar.php', 'rmp=' + mr_id, function(a){
mydialog.alert((a.charAt(0) == '0' ? 'Opps!' : 'Hecho'), a.substring(3), false);
mydialog.center();
success: if(a.charAt(0) == '1') $('#rmp_' + mr_id).fadeOut(); $('#loading').fadeOut(350);
});
}
},
},
En t.admin.tpl --> themes --> default --> templates --> t.admin.tpl buscar:
Código: ( Seleccionar Todo )
{/if}
Arriba agregar:
Código: ( Seleccionar Todo )
{elseif $tsAction == 'mensajes'}
{include file='admin_mods/m.admin_control_mp.tpl'}
Tema Default
En extras.css --> themes --> default --> extras.css agregar al final:
Código: ( Seleccionar Todo )
ul.lest-mp li{display:block;padding:5px 5px 5px 10px;border-bottom:1px solid #eee}
ul.lest-mp li a img{width:38px;height:38px;padding:1px;border:1px solid #ccc}
ul.lest-mp li a img:hover{background:#fff;opacity:.7}
ul.lest-mp{border:1px solid #eee;border-bottom:none}
ul.lest-mp li span{position:absolute;margin-left:10px;color:#999}
ul.lest-mp li span a{margin-right:10px}
ul.lest-mp li h2{font-weight:300;color:#000}
ul.lest-mp li h2 a{font-weight:300}
.bodymp{position:relative;background:#eee;width:620px;padding:5px;height:auto;margin:-20px 5px 5px 52px;border:1px dashed #ccc;border-radius:5px;-moz-border-radius:5px;-webkit-border-radius:5px;-o-border-radius:5px;color:#666}
.frommp{height:40px;background:#dedede url(images/icons/comments.png) no-repeat 10px 10px;border-radius:5px 5px 0 0;-moz-border-radius:5px 5px 0 0;-webkit-border-radius:5px 5px 0 0;-o-border-radius:5px 5px 0 0;border:1px solid #ccc}
.frommp h2{margin-left:40px}
.delres{position:absolute;right:30px}
.pag-compl{overflow:hidden;clear:both;color:transparent;margin:10px 0 10px 25px}
.pag-compl b{-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;color:#fff;background:#65d43b;background:-moz-linear-gradient(top,#88e64f 0,#5ed037 100%);background:-webkit-gradient(linear,0 0,0 100%,from(#88e64f),to(#5ed037));border:1px solid #53a32e;padding:4px 10px;display:inline-block;text-shadow:0 -1px 1px #6acb3c}
.pag-compl a{padding:5px 10px;display:inline-block;font-weight:700;border:1px solid #bbb;color:#555!important;text-shadow:0 1px 0 #eee;background:#e4e4e4;background:-moz-linear-gradient(top,#fcfcfc 0,#eee 100%);background:-webkit-gradient(linear,0 0,0 100%,from(#fcfcfc),to(#eee));-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px}
.pag-compl a:hover{color:#888!important;text-shadow:0 1px 0 #eee;background:#e4e4e4!important;text-decoration:none;background:-moz-linear-gradient(top,#fcfcfc 0,#ddd 100%)!important;background:-webkit-gradient(linear,0 0,0 100%,from(#fcfcfc),to(#ddd))!important}
Tema V6
En extras.css --> themes --> default --> extras.css agregar al final:
Código: ( Seleccionar Todo )
ul.lest-mp li{display:block;padding:5px 5px 5px 10px;border-bottom:1px solid #414447}
ul.lest-mp li a img{width:38px;height:38px;padding:1px;border:1px solid #ccc}
ul.lest-mp li a img:hover{background:#fff;opacity:.7}
ul.lest-mp{border:1px solid #414447;border-bottom:none}
ul.lest-mp li span{position:absolute;margin-left:10px;color:#999}
ul.lest-mp li span a{margin-right:10px}
ul.lest-mp li h2{font-weight:300;color:white}
ul.lest-mp li h2 a{font-weight:300}
.bodymp{position:relative;background:#eee;width:840px;padding:5px;height:auto;margin:-20px 5px 5px 52px;border:1px dashed #ccc;border-radius:5px;-moz-border-radius:5px;-webkit-border-radius:5px;-o-border-radius:5px;color:#666}
.frommp{height:40px;background:#1b1d21 url(images/icons/comments.png) no-repeat 10px 10px;border-radius:5px 5px 0 0;-moz-border-radius:5px 5px 0 0;-webkit-border-radius:5px 5px 0 0;-o-border-radius:5px 5px 0 0;border:1px solid #414447;}
.frommp h2{margin-left:40px;margin-top: 5px;color: white;}
.delres{position:absolute;right:30px}
.pag-compl{overflow:hidden;clear:both;color:transparent;margin:10px 0 10px 25px}
.pag-compl b{-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;color:#fff;background:#65d43b;background:-moz-linear-gradient(top,#88e64f 0,#5ed037 100%);background:-webkit-gradient(linear,0 0,0 100%,from(#88e64f),to(#5ed037));border:1px solid #53a32e;padding:4px 10px;display:inline-block;text-shadow:0 -1px 1px #6acb3c}
.pag-compl a{padding:5px 10px;display:inline-block;font-weight:700;border:1px solid #bbb;color:#555!important;text-shadow:0 1px 0 #eee;background:#e4e4e4;background:-moz-linear-gradient(top,#fcfcfc 0,#eee 100%);background:-webkit-gradient(linear,0 0,0 100%,from(#fcfcfc),to(#eee));-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px}
.pag-compl a:hover{color:#888!important;text-shadow:0 1px 0 #eee;background:#e4e4e4!important;text-decoration:none;background:-moz-linear-gradient(top,#fcfcfc 0,#ddd 100%)!important;background:-webkit-gradient(linear,0 0,0 100%,from(#fcfcfc),to(#ddd))!important}
En m.admin_sidemenu.tpl --> themes --> default --> templates --> admin_mods --> m.admin_sidemenu.tpl buscar:
Código: ( Seleccionar Todo )
<li id="a_rangos"><span class="cat-title"><a href="{$tsConfig.url}/admin/rangos">Rangos de Usuarios</a></span></li>
Agregar debajo:
Código: ( Seleccionar Todo )
<li id="a_mensajes"><span class="cat-title"><a href="{$tsConfig.url}/admin/mensajes">Control de Mensajes</a></span></li>
En admin.css --> themes --> default --> css --> admin.css buscar:
Código: ( Seleccionar Todo )
li#a_rangos {background-image: url(../images/icons/crown.png);}
Agregar debajo:
Código: ( Seleccionar Todo )
li#a_mensajes {background-image: url(../images/icon-mensajes-recibidos.gif);}
Para el tema Default y V6 suben esta carpeta, la V5 solo hay que hacer los pasos de la instalación
Tema Default
Mega
Google Drive
Mediafire
Tema V6
[b]Mega
Google Drive
Mediafire
Creditos: Debes agradecer para ver el contenido...[/b]