Autor Tópico: Perfil Acção do utilizador  (Lida 7490 vezes)

0 Membros e 1 Visitante estão a ver este tópico.

Offline candidosa2

  • Suporte Tecnico
  • Fundador
  • *
  • Mensagens: 5072
  • Rank: 1658
  • Sexo: Masculino
  • Suporte
    • Hosting Moçambique
Perfil Acção do utilizador
« em: 13 de Fevereiro de 2011, 17:44 »
LINK MOD Mod Nome: Profile User Action
Autores: Rudolf
Versões: 1.1.x Todas as séries


Sources/Profile.php

Código: [Seleccione]
// They haven't even been registered for a full day!?
Código: [Seleccione]
//-Profile User Action MOD- Start
if (allowedTo('who_view'))
{
// Look for people online, provided they don't mind if you see they are.
$request = db_query("
SELECT (UNIX_TIMESTAMP(lo.logTime) - UNIX_TIMESTAMP() + " . time() . ") AS logTime, lo.url,
IFNULL(mem.showOnline, 1) AS showOnline, lo.session
FROM {$db_prefix}log_online AS lo LEFT JOIN {$db_prefix}members AS mem ON (mem.ID_MEMBER = lo.ID_MEMBER)
WHERE lo.ID_MEMBER = $memID " . (!allowedTo('moderate_forum') && $memID != $context['user']['id'] ? " AND IFNULL(mem.showOnline, 1) = 1" : '') . "
LIMIT 1", __FILE__, __LINE__);
$url_data = '';
while ($row = mysql_fetch_assoc($request))
{
$actions = @unserialize($row['url']);
if ($actions === false)
continue;

$context['user_action'] = array(
'showOnline' => $row['showOnline'],
'time' => strtr(timeformat($row['logTime']), array($txt['smf10'] => '', $txt['smf10b'] => '')),
'timestamp' => forum_time(true, $row['logTime']),
'is_hidden' => $row['showOnline'] == 0,
'action' => ''
);
$url_data[0] = array($row['url'],$memID);
}

if (!empty($url_data))
{
require_once($sourcedir.'/Who.php');
      list($context['user_action']['action']) = determineActions($url_data);
}
}
  //-Profile User Action MOD- End


Themes/default/Profile.template.php

Código: [Seleccione]
<tr>
<td><b>', $txt['lastLoggedIn'], ': </b></td>
<td>', $context['member']['last_login'], '</td>
</tr>';

Código: [Seleccione]
//-Profile User Action MOD- Start
if (!empty($context['user_action']))
echo '
<tr>
<td><b>', $txt['who_action'], ': </b></td>
<td><span', $context['user_action']['is_hidden'] ? ' style="font-style: italic;"' : '', '>', $context['user_action']['action'],' <span style="white-space: nowrap">(', $context['user_action']['time'], ')</span></span></td>
</tr>';
  //-Profile User Action MOD- End