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
[1.6.4][Tutorial] Mostrar Avatares en "Who is Online Today?"
Páginas (2):    1 2
InfraWorld   5 Nov, 2012, 11:08 am
#11
(4 Nov, 2012, 6:24 pm)::Leon:: escribió: Ese plugin ya la tengo y no sirve para eso xD
Bueno, no importa.

Ahhh Yaaap, Ok Bueno si seguiste esta modificacion que deje en este mensaje:
http://www.mybb-es.com/hilo-1-6-4-tutori...day?page=1

Reemplaza esto:
Código PHP:
<?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;
}
}

Por esto:
Código PHP:
<?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;
}
}

O simplemente descarga este y reemplazalo por el tuyo..[attachment=1360]
Última modificación: 5 Nov, 2012, 12:39 pm por The_King_Jaas.
::Leon::   6 Nov, 2012, 7:51 am
#12
Excelente. Gracias por tu ayuda Smile
Eloy   27 Feb, 2014, 2:24 am
#13
[quote='Jaizu' pid='47559' dateline='1321911180']
Lograremos esto:

[Imagen: onlineik.png]

Se lo he triturado al máximo para que estea bastante fácil =P

Eligen su Tema en plantillas, en el Admin CP, van a Quién está en línea - Plantillas
Cambian la plantilla online por:

Código PHP:
<?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>

Agrege la palabra "Avatar" solamente para que se vea completo < Plantilla "online"

Código PHP:
<?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>

Aprendiendo cada vez mas
gamax25   20 Mar, 2014, 6:03 pm
#14
xvr men me sirvio mucho gracias
Páginas (2):    1 2
  
Powered By MyBB, © 2002-2024 MyBB Group.
Made with by Curves UI.