Deprecated: str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /var/www/mybb-es.com/html/inc/class_language.php on line 201
Mostrar bans
Glas   4 Jun, 2012, 12:32 pm
#1
Hoy hubo un conflicto donde tuve que banear a varios usuarios y otros me consultaron porque en vez de explicar uno por uno, seria bueno que hubiese un plugin que te muesta los bans + el motivo del baneo

eso

encontre este
pero no funciono

http://mods.mybb.com/download/banned-users-page Confusedtick:
Cluster   4 Jun, 2012, 12:56 pm
#2
Con el plugin del page manager puedes usar la siguiente pagina php

Código PHP:
<?php

global $headerinclude, $header, $theme, $footer, $lang;

if(!
$mybb->user['uid']) error_no_permission();

$lang->load('modcp');

$bannedquery = $db->simple_select("banned", "uid, admin, reason, dateline, lifted", "", array("order_by" => 'dateline', "order_dir" => 'DESC'));

if (
$db->num_rows($bannedquery) > 0)
{
$bannedtablerows = "";
while (
$ban = $db->fetch_array($bannedquery))
{
$banneduser = get_user($ban['uid']);
$banby = get_user($ban['admin']);

if (
$ban['lifted'] > 0)
$unbandate = my_date($mybb->settings['dateformat'], $ban['lifted']);
else
$unbandate = $lang->never;

$bannedtablerows .= '<tr>
<td class="trow1">'
. build_profile_link($banneduser['username'], $banneduser['uid']). '</td>
<td class="trow1">'
. $ban['reason']. '</td>
<td class="trow1">'
. build_profile_link($banby['username'], $banby['uid']). '</td>
<td class="trow1">'
. my_date($mybb->settings['dateformat'], $ban['dateline']) .'</td>
<td class="trow1">'
. $unbandate .'</td>
</tr>'
;
}
}
else
{
$bannedtablerows = '<tr><td class="trow1" colspan="5" align="center">'. $lang->no_banned .'</td></tr>';
}

$template='<html>
<head>
<title>'
.$pages['name'].'</title>
{$headerinclude}
</head>
<body>
{$header}
<table border="0" cellspacing="1" cellpadding="4" class="tborder">
<tr><td class="thead" colspan="5"><strong>{$lang->ban_banned}</strong></td></tr>
<tr>
<td class="tcat"><span class="smalltext"><strong>{$lang->username}</strong></span></td>
<td class="tcat"><span class="smalltext"><strong>{$lang->reason}</strong></span></td>
<td class="tcat"><span class="smalltext"><strong>{$lang->ban_bannedby}</strong></span></td>
<td class="tcat"><span class="smalltext"><strong>{$lang->start_date}</strong></span></td>
<td class="tcat"><span class="smalltext"><strong>{$lang->end_date}</strong></span></td>
</tr>
{$bannedtablerows}
</table>
{$footer}
</body>
</html>'
;

$template=str_replace("\'", "'", addslashes($template));

add_breadcrumb($pages['name']);

eval(
"\$page=\"".$template."\";");

output_page($page);

?>

:)
Glas   4 Jun, 2012, 1:35 pm
#3
D:! IDOLO!!!

Muchas gracias!
Cluster   4 Jun, 2012, 1:40 pm
#4
Saludos y los creditos son de evilito.

:)
  
Powered By MyBB, © 2002-2024 MyBB Group.
Made with by Curves UI.