(4 Nov, 2012, 6:24 pm)::Leon:: escribió: Ese plugin ya la tengo y no sirve para eso xD
Bueno, no importa.
<?php
function build_wol_row($user)
{
global $db, $mybb, $lang, $templates, $theme, $session;
// We have a registered user
if($user['uid'] > 0)
{
// Only those with "canviewwolinvis" permissions can view invisible users
if($user['invisible'] != 1 || $mybb->usergroup['canviewwolinvis'] == 1 || $user['uid'] == $mybb->user['uid'])
{
// Append an invisible mark if the user is invisible
if($user['invisible'] == 1)
{
$invisible_mark = "*";
}
else
{
$invisible_mark = '';
}
$query = $db->simple_select("users", "*", "uid='{$user['uid']}'");
$us = $db->fetch_array($query);
if ($us['avatar'] != "")
{
$user_avatar = '<img src="'.$us['avatar'].'" alt="Avatar" title="'.$user['username'].' \'s Avatar" width="35px" height="35px">';
}
else
{
$user_avatar = '<img src="images/default_avatar.gif" alt="Avatar" title="'.$user['username'].' \'s Avatar" width="35px" height="35px">';
}
$user['username'] = format_name($user['username'], $user['usergroup'], $user['displaygroup']);
$online_name = build_profile_link($user['username'], $user['uid']).$invisible_mark;
}
}
<?php
function build_wol_row($user)
{
global $db, $mybb, $lang, $templates, $theme, $session;
if (!$user['uid'])
{
$user_avatar = '<img src="images/default_avatar.gif" alt="Avatar" title="Guest \'s Avatar" width="35px" height="35px">';
}
// We have a registered user
if($user['uid'] > 0)
{
// Only those with "canviewwolinvis" permissions can view invisible users
if($user['invisible'] != 1 || $mybb->usergroup['canviewwolinvis'] == 1 || $user['uid'] == $mybb->user['uid'])
{
// Append an invisible mark if the user is invisible
if($user['invisible'] == 1)
{
$invisible_mark = "*";
}
else
{
$invisible_mark = '';
}
$query = $db->simple_select("users", "*", "uid='{$user['uid']}'");
$us = $db->fetch_array($query);
if ($us['avatar'] != "")
{
$user_avatar = '<img src="'.$us['avatar'].'" alt="Avatar" title="'.$user['username'].' \'s Avatar" width="35px" height="35px">';
}
else
{
$user_avatar = '<img src="images/default_avatar.gif" alt="Avatar" title="'.$user['username'].' \'s Avatar" width="35px" height="35px">';
}
$user['username'] = format_name($user['username'], $user['usergroup'], $user['displaygroup']);
$online_name = build_profile_link($user['username'], $user['uid']).$invisible_mark;
}
}
<?php
<html>
<head>
<title>{$mybb->settings['bbname']} - {$lang->users_online}</title>
{$headerinclude}
{$refresh}
</head>
<body>
{$header}
{$multipage}
<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder">
<tr>
<td class="thead" colspan="4"><strong>{$lang->users_online}</strong></td>
</tr>
<tr>
<td class="tcat" align="center" width="5%"></td>
<td class="tcat" align="center"><a href="online.php?sortby=username"><span class="smalltext"><strong>{$lang->on_username}</strong></span></a></td>
<td class="tcat" align="center"><a href="online.php?sortby=time"><span class="smalltext"><strong>{$lang->time}</strong></span></a></td>
<td class="tcat" width="50%"><a href="online.php?sortby=location"><span class="smalltext"><strong>{$lang->location}</strong></span></a></td>
</tr>
{$online_rows}
<tr>
<td class="tfoot" colspan="4" align="right"><span class="smalltext"><strong><a href="online.php?action=today">{$lang->online_today}</a> | <a href="online.php">{$lang->refresh_page}</a></strong></span></td>
</tr>
</table>
<br />
{$multipage}
{$footer}
</body>
</html>
<?php
<html>
<head>
<title>{$mybb->settings['bbname']} - {$lang->users_online}</title>
{$headerinclude}
{$refresh}
</head>
<body>
{$header}
{$multipage}
<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder">
<tr>
<td class="thead" colspan="4"><strong>{$lang->users_online}</strong></td>
</tr>
<tr>
<td class="tcat" align="center" width="5%"><a href="online.php?sortby=avatar"><span class="smalltext"><strong>Avatar</strong></td>
<td class="tcat" align="center"><a href="online.php?sortby=username"><span class="smalltext"><strong>{$lang->on_username}</strong></span></a></td>
<td class="tcat" align="center"><a href="online.php?sortby=time"><span class="smalltext"><strong>{$lang->time}</strong></span></a></td>
<td class="tcat" width="50%"><a href="online.php?sortby=location"><span class="smalltext"><strong>{$lang->location}</strong></span></a></td>
</tr>
{$online_rows}
<tr>
<td class="tfoot" colspan="4" align="right"><span class="smalltext"><strong><a href="online.php?action=today">{$lang->online_today}</a> | <a href="online.php">{$lang->refresh_page}</a></strong></span></td>
</tr>
</table>
<br />
{$multipage}
{$footer}
</body>
</html>