Estatisticas - TOP 10 Plus

Iniciado por Joomlamz, 22 de Julho de 2007, 15:31

Tópico anterior - Tópico seguinte

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

Joomlamz

Aqui as Estatísticas - TOP 10 completas traduzido em Pt




pode ser aqui Demo Suporte SmfPt

Primeiro vamos para aqui...
sources/BoardIndex.php

Pesquisar por....
// Find all boards and categories, as well as related information.  This will be sorted by the natural order of boards and categories, which we control.
$result_boards = db_query("


Passar por cima desse código este aqui abaixo citado

[logged]
// PLUS STATIC TOP 10 by MJoRaYuLuN Traduzido por Joomlamz
// Topic replies top 10.
$topic_reply_result = db_query("
SELECT m.subject, t.numReplies, t.ID_BOARD, t.ID_TOPIC, b.name
FROM ({$db_prefix}topics AS t, {$db_prefix}messages AS m, {$db_prefix}boards AS b)
WHERE m.ID_MSG = t.ID_FIRST_MSG
AND $user_info[query_see_board]" . (!empty($modSettings['recycle_enable']) && $modSettings['recycle_board'] > 0 ? "
AND b.ID_BOARD != $modSettings[recycle_board]" : '') . "
AND t.ID_BOARD = b.ID_BOARD" . (!empty($topic_ids) ? "
AND t.ID_TOPIC IN (" . implode(', ', $topic_ids) . ")" : '') . "
ORDER BY t.numReplies DESC
LIMIT 10", __FILE__, __LINE__);
$context['top_topics_replies'] = array();
$max_num_replies = 1;
while ($row_topic_reply = mysql_fetch_assoc($topic_reply_result))
{
censorText($row_topic_reply['subject']);

$context['top_topics_replies'][] = array(
'id' => $row_topic_reply['ID_TOPIC'],
'board' => array(
'id' => $row_topic_reply['ID_BOARD'],
'name' => $row_topic_reply['name'],
'href' => $scripturl . '?board=' . $row_topic_reply['ID_BOARD'] . '.0',
'link' => '<a href="' . $scripturl . '?board=' . $row_topic_reply['ID_BOARD'] . '.0">' . $row_topic_reply['name'] . '</a>'
),
'subject' => $row_topic_reply['subject'],
'num_replies' => $row_topic_reply['numReplies'],
'href' => $scripturl . '?topic=' . $row_topic_reply['ID_TOPIC'] . '.0',
'link' => '<a href="' . $scripturl . '?topic=' . $row_topic_reply['ID_TOPIC'] . '.0">' . $row_topic_reply['subject'] . '</a>'
);

if ($max_num_replies < $row_topic_reply['numReplies'])
$max_num_replies = $row_topic_reply['numReplies'];
}
mysql_free_result($topic_reply_result);

foreach ($context['top_topics_replies'] as $i => $topic)
$context['top_topics_replies'][$i]['post_percent'] = round(($topic['num_replies'] * 100) / $max_num_replies);

// Topic views top 10.
$topic_view_result = db_query("
SELECT m.subject, t.numViews, t.ID_BOARD, t.ID_TOPIC, b.name
FROM ({$db_prefix}topics AS t, {$db_prefix}messages AS m, {$db_prefix}boards AS b)
WHERE m.ID_MSG = t.ID_FIRST_MSG
AND $user_info[query_see_board]" . (!empty($modSettings['recycle_enable']) && $modSettings['recycle_board'] > 0 ? "
AND b.ID_BOARD != $modSettings[recycle_board]" : '') . "
AND t.ID_BOARD = b.ID_BOARD" . (!empty($topic_ids) ? "
AND t.ID_TOPIC IN (" . implode(', ', $topic_ids) . ")" : '') . "
ORDER BY t.numViews DESC
LIMIT 10", __FILE__, __LINE__);
$context['top_topics_views'] = array();
$max_num_views = 1;
while ($row_topic_views = mysql_fetch_assoc($topic_view_result))
{
censorText($row_topic_views['subject']);

$context['top_topics_views'][] = array(
'id' => $row_topic_views['ID_TOPIC'],
'board' => array(
'id' => $row_topic_views['ID_BOARD'],
'name' => $row_topic_views['name'],
'href' => $scripturl . '?board=' . $row_topic_views['ID_BOARD'] . '.0',
'link' => '<a href="' . $scripturl . '?board=' . $row_topic_views['ID_BOARD'] . '.0">' . $row_topic_views['name'] . '</a>'
),
'subject' => $row_topic_views['subject'],
'num_views' => $row_topic_views['numViews'],
'href' => $scripturl . '?topic=' . $row_topic_views['ID_TOPIC'] . '.0',
'link' => '<a href="' . $scripturl . '?topic=' . $row_topic_views['ID_TOPIC'] . '.0">' . $row_topic_views['subject'] . '</a>'
);

if ($max_num_views < $row_topic_views['numViews'])
$max_num_views = $row_topic_views['numViews'];
}
mysql_free_result($topic_view_result);

foreach ($context['top_topics_views'] as $i => $topic)
$context['top_topics_views'][$i]['post_percent'] = round(($topic['num_views'] * 100) / $max_num_views);

// Time online top 10.
// !!!SLOW This query is sorta slow.  Should we just add a key? (or would that be bad in the long run?)
$temp = cache_get_data('stats_total_time_members', 600);
$members_result = db_query("
SELECT ID_MEMBER, realName, totalTimeLoggedIn
FROM {$db_prefix}members" . (!empty($temp) ? "
WHERE ID_MEMBER IN (" . implode(', ', $temp) . ")" : '') . "
ORDER BY totalTimeLoggedIn DESC
LIMIT 20", __FILE__, __LINE__);
$context['top_time_online'] = array();
$temp2 = array();
$max_time_online = 1;
while ($row_members = mysql_fetch_assoc($members_result))
{
$temp2[] = (int) $row_members['ID_MEMBER'];
if (count($context['top_time_online']) >= 10)
continue;

// Figure out the days, hours and minutes.
$timeDays = floor($row_members['totalTimeLoggedIn'] / 86400);
$timeHours = floor(($row_members['totalTimeLoggedIn'] % 86400) / 3600);

// Figure out which things to show... (days, hours, minutes, etc.)
$timelogged = '';
if ($timeDays > 0)
$timelogged .= $timeDays . $txt['totalTimeLogged5'];
if ($timeHours > 0)
$timelogged .= $timeHours . $txt['totalTimeLogged6'];
$timelogged .= floor(($row_members['totalTimeLoggedIn'] % 3600) / 60) . $txt['totalTimeLogged7'];

$context['top_time_online'][] = array(
'id' => $row_members['ID_MEMBER'],
'name' => $row_members['realName'],
'time_online' => $timelogged,
'seconds_online' => $row_members['totalTimeLoggedIn'],
'href' => $scripturl . '?action=profile;u=' . $row_members['ID_MEMBER'],
'link' => '<a href="' . $scripturl . '?action=profile;u=' . $row_members['ID_MEMBER'] . '">' . $row_members['realName'] . '</a>'
);

if ($max_time_online < $row_members['totalTimeLoggedIn'])
$max_time_online = $row_members['totalTimeLoggedIn'];
}
mysql_free_result($members_result);

foreach ($context['top_time_online'] as $i => $member)
$context['top_time_online'][$i]['time_percent'] = round(($member['seconds_online'] * 100) / $max_time_online);
      //Yeah baby give me some colors =).
if (!empty($MemberColor_ID_MEMBER)) {
//Now Load the Missing global :)
global $user_profile;
loadMemberData($MemberColor_ID_MEMBER);
$cmemcolid = NULL;
if (!empty($modSettings['MemberColorStats'])) {
// Poster top.
foreach($context['top_posters'] as $key => $value) {
$cmemcolid = $context['top_posters'][$key]['id'];
$profile = &$user_profile[$cmemcolid];
if(!empty($profile['member_group_color']) || !empty($profile['post_group_color']))
$context['top_posters'][$key]['link'] = '<a href="' . $scripturl . '?action=profile;u=' . $profile['ID_MEMBER'] . '" title="' . $txt[92] . ' ' . $profile['realName'] . '"><font color="'.(!empty($profile['member_group_color']) ? $profile['member_group_color'] : $profile['post_group_color']).'">' . $profile['realName'] . '</font></a>';
}
       }
if (!empty($modSettings['latestMember']) && !empty($modSettings['MemberColorLatestMember'])) {
$profile = &$user_profile[$modSettings['latestMember']];
if(!empty($profile['member_group_color']) || !empty($profile['post_group_color']))
$context['latest_member']['link'] = '<a href="' . $scripturl . '?action=profile;u=' . $profile['ID_MEMBER'] . '" title="' . $txt[92] . ' ' . $profile['realName'] . '"><font color="'.(!empty($profile['member_group_color']) ? $profile['member_group_color'] : $profile['post_group_color']).'">' . $profile['realName'] . '</font></a>';
}
}


// Board top 10.
$boards_result = db_query("
SELECT ID_BOARD, name, numPosts
FROM {$db_prefix}boards AS b
WHERE $user_info[query_see_board]" . (!empty($modSettings['recycle_enable']) && $modSettings['recycle_board'] > 0 ? "
AND b.ID_BOARD != $modSettings[recycle_board]" : '') . "
ORDER BY numPosts DESC
LIMIT 10", __FILE__, __LINE__);
$context['top_boards'] = array();
$max_num_posts = 1;
while ($row_board = mysql_fetch_assoc($boards_result))
{
$context['top_boards'][] = array(
'id' => $row_board['ID_BOARD'],
'name' => $row_board['name'],
'num_posts' => $row_board['numPosts'],
'href' => $scripturl . '?board=' . $row_board['ID_BOARD'] . '.0',
'link' => '<a href="' . $scripturl . '?board=' . $row_board['ID_BOARD'] . '.0">' . $row_board['name'] . '</a>'
);

if ($max_num_posts < $row_board['numPosts'])
$max_num_posts = $row_board['numPosts'];
}
mysql_free_result($boards_result);

foreach ($context['top_boards'] as $i => $board)
$context['top_boards'][$i]['post_percent'] = round(($board['num_posts'] * 100) / $max_num_posts);

// Poster

$members_result = db_query("
SELECT ID_MEMBER, realName, posts
FROM {$db_prefix}members
ORDER BY posts DESC
LIMIT 10", __FILE__, __LINE__);
$context['top_posters'] = array();
$max_num_posts = 1;
while ($row_members = mysql_fetch_assoc($members_result))
{
$context['top_posters'][] = array(
'name' => $row_members['realName'],
'id' => $row_members['ID_MEMBER'],
'num_posts' => $row_members['posts'],
'href' => $scripturl . '?action=profile;u=' . $row_members['ID_MEMBER'],
'link' => '<a href="' . $scripturl . '?action=profile;u=' . $row_members['ID_MEMBER'] . '">' . $row_members['realName'] . '</a>'
);

if (!empty($modSettings['MemberColorStats']))
$MemberColor_ID_MEMBER[$row_members['ID_MEMBER']] = $row_members['ID_MEMBER'];

if ($max_num_posts < $row_members['posts'])
$max_num_posts = $row_members['posts'];
}
mysql_free_result($members_result);

foreach ($context['top_posters'] as $i => $poster)
$context['top_posters'][$i]['post_percent'] = round(($poster['num_posts'] * 100) / $max_num_posts);

if (!empty($modSettings['latestMember']) && !empty($modSettings['MemberColorLatestMember']))
$MemberColor_ID_MEMBER[$modSettings['latestMember']] = $modSettings['latestMember'];

       //Yeah baby give me some colors =).
if (!empty($MemberColor_ID_MEMBER)) {
//Now Load the Missing global :)
global $user_profile;
loadMemberData($MemberColor_ID_MEMBER);
$cmemcolid = NULL;
if (!empty($modSettings['MemberColorStats'])) {
// Poster top.
foreach($context['top_posters'] as $key => $value) {
$cmemcolid = $context['top_posters'][$key]['id'];
$profile = &$user_profile[$cmemcolid];
if(!empty($profile['member_group_color']) || !empty($profile['post_group_color']))
$context['top_posters'][$key]['link'] = '<a href="' . $scripturl . '?action=profile;u=' . $profile['ID_MEMBER'] . '" title="' . $txt[92] . ' ' . $profile['realName'] . '"><font color="'.(!empty($profile['member_group_color']) ? $profile['member_group_color'] : $profile['post_group_color']).'">' . $profile['realName'] . '</font></a>';
}
       }
if (!empty($modSettings['latestMember']) && !empty($modSettings['MemberColorLatestMember'])) {
$profile = &$user_profile[$modSettings['latestMember']];
if(!empty($profile['member_group_color']) || !empty($profile['post_group_color']))
$context['latest_member']['link'] = '<a href="' . $scripturl . '?action=profile;u=' . $profile['ID_MEMBER'] . '" title="' . $txt[92] . ' ' . $profile['realName'] . '"><font color="'.(!empty($profile['member_group_color']) ? $profile['member_group_color'] : $profile['post_group_color']).'">' . $profile['realName'] . '</font></a>';
}
}
// yeni uyeler rallyproco
$members_result = db_query("
SELECT ID_MEMBER, realName, posts
FROM {$db_prefix}members
ORDER BY ID_MEMBER DESC
LIMIT 10", __FILE__, __LINE__);
$context['yeniuyeler'] = array();
$max_num_posts = 1;
while ($row_members = mysql_fetch_assoc($members_result))
{

$context['yeniuyeler'][] = array(
'name' => $row_members['realName'],
'id' => $row_members['ID_MEMBER'],
'num_posts' => $row_members['posts'],
'href' => $scripturl . '?action=profile;u=' . $row_members['ID_MEMBER'],
'link' => '<a href="' . $scripturl . '?action=profile;u=' . $row_members['ID_MEMBER'] . '">' . $row_members['realName'] . '</a>'
);


if (!empty($modSettings['MemberColorStats']))
$MemberColor_ID_MEMBER[$row_members['ID_MEMBER']] = $row_members['ID_MEMBER'];


if ($max_num_posts < $row_members['posts'])
$max_num_posts = $row_members['posts'];
}
mysql_free_result($members_result);

foreach ($context['yeniuyeler'] as $i => $poster)
$context['yeniuyeler'][$i]['post_percent'] = round(($poster['num_posts'] * 100) / $max_num_posts);
//Yeah baby give me some colors =).
if (!empty($MemberColor_ID_MEMBER)) {
//Now Load the Missing global :)
global $user_profile;
loadMemberData($MemberColor_ID_MEMBER);
$cmemcolid = NULL;
if (!empty($modSettings['MemberColorStats'])) {
// karma
foreach($context['yeniuyeler'] as $key => $value) {
$cmemcolid = $context['yeniuyeler'][$key]['id'];
$profile = &$user_profile[$cmemcolid];
if(!empty($profile['member_group_color']) || !empty($profile['post_group_color']))
$context['yeniuyeler'][$key]['link'] = '<a href="' . $scripturl . '?action=profile;u=' . $profile['ID_MEMBER'] . '" title="' . $txt[92] . ' ' . $profile['realName'] . '"><font color="'.(!empty($profile['member_group_color']) ? $profile['member_group_color'] : $profile['post_group_color']).'">' . $profile['realName'] . '</font></a>';
}
       }
if (!empty($modSettings['latestMember']) && !empty($modSettings['MemberColorLatestMember'])) {
$profile = &$user_profile[$modSettings['latestMember']];
if(!empty($profile['member_group_color']) || !empty($profile['post_group_color']))
$context['latest_member']['link'] = '<a href="' . $scripturl . '?action=profile;u=' . $profile['ID_MEMBER'] . '" title="' . $txt[92] . ' ' . $profile['realName'] . '"><font color="'.(!empty($profile['member_group_color']) ? $profile['member_group_color'] : $profile['post_group_color']).'">' . $profile['realName'] . '</font></a>';
}
}
// karma full


$members_result = db_query("
SELECT ID_MEMBER, realName, posts , karmaGood
FROM {$db_prefix}members
ORDER BY karmaGood DESC
LIMIT 10", __FILE__, __LINE__);
$context['karma'] = array();
$max_num_posts = 1;
while ($row_members = mysql_fetch_assoc($members_result))
{
$context['karma'][] = array(
'name' => $row_members['realName'],
'id' => $row_members['ID_MEMBER'],
'karma' => $row_members['karmaGood'],
'num_posts' => $row_members['posts'],
'href' => $scripturl . '?action=profile;u=' . $row_members['ID_MEMBER'],
'link' =>'<a href="' . $scripturl . '?action=profile;u=' . $row_members['ID_MEMBER'] . '">' . $row_members['realName'] . '</a>'
);

if (!empty($modSettings['MemberColorStats']))
$MemberColor_ID_MEMBER[$row_members['ID_MEMBER']] = $row_members['ID_MEMBER'];

if ($max_num_posts < $row_members['posts'])
$max_num_posts = $row_members['posts'];
}
mysql_free_result($members_result);

foreach ($context['karma'] as $i => $poster)
$context['karma'][$i]['post_percent'] = round(($poster['num_posts'] * 100) / $max_num_posts);
//Yeah baby give me some colors =).
if (!empty($MemberColor_ID_MEMBER)) {
//Now Load the Missing global :)
global $user_profile;
loadMemberData($MemberColor_ID_MEMBER);
$cmemcolid = NULL;
if (!empty($modSettings['MemberColorStats'])) {
// karma
foreach($context['karma'] as $key => $value) {
$cmemcolid = $context['karma'][$key]['id'];
$profile = &$user_profile[$cmemcolid];
if(!empty($profile['member_group_color']) || !empty($profile['post_group_color']))
$context['karma'][$key]['link'] = '<a href="' . $scripturl . '?action=profile;u=' . $profile['ID_MEMBER'] . '" title="' . $txt[92] . ' ' . $profile['realName'] . '"><font color="'.(!empty($profile['member_group_color']) ? $profile['member_group_color'] : $profile['post_group_color']).'">' . $profile['realName'] . '</font></a>';
}
       }
if (!empty($modSettings['latestMember']) && !empty($modSettings['MemberColorLatestMember'])) {
$profile = &$user_profile[$modSettings['latestMember']];
if(!empty($profile['member_group_color']) || !empty($profile['post_group_color']))
$context['latest_member']['link'] = '<a href="' . $scripturl . '?action=profile;u=' . $profile['ID_MEMBER'] . '" title="' . $txt[92] . ' ' . $profile['realName'] . '"><font color="'.(!empty($profile['member_group_color']) ? $profile['member_group_color'] : $profile['post_group_color']).'">' . $profile['realName'] . '</font></a>';
}
}
// Topic views
$topic_view_result = db_query("
SELECT m.subject, t.numViews, t.ID_BOARD, t.ID_TOPIC, b.name
FROM ({$db_prefix}topics AS t, {$db_prefix}messages AS m, {$db_prefix}boards AS b)
WHERE m.ID_MSG = t.ID_FIRST_MSG
AND $user_info[query_see_board]" . (!empty($modSettings['recycle_enable']) && $modSettings['recycle_board'] > 0 ? "
AND b.ID_BOARD != $modSettings[recycle_board]" : '') . "
AND t.ID_BOARD = b.ID_BOARD" . (!empty($topic_ids) ? "
AND t.ID_TOPIC IN (" . implode(', ', $topic_ids) . ")" : '') . "
ORDER BY t.numViews DESC
LIMIT 10", __FILE__, __LINE__);
$context['top_topics_views'] = array();
$max_num_views = 1;
while ($row_topic_views = mysql_fetch_assoc($topic_view_result))
{
censorText($row_topic_views['subject']);
$row_topic_views['subject'] = shorten_subject($row_topic_views['subject'], 24);
$context['top_topics_views'][] = array(
'id' => $row_topic_views['ID_TOPIC'],
'board' => array(
'id' => $row_topic_views['ID_BOARD'],
'name' => $row_topic_views['name'],
'href' => $scripturl . '?board=' . $row_topic_views['ID_BOARD'] . '.0',
'link' => '<a href="' . $scripturl . '?board=' . $row_topic_views['ID_BOARD'] . '.0">' . $row_topic_views['name'] . '</a>'
),
'num_views' => $row_topic_views['numViews'],
'href' => $scripturl . '?topic=' . $row_topic_views['ID_TOPIC'] . '.0',
'link' => '<a href="' . $scripturl . '?topic=' . $row_topic_views['ID_TOPIC'] . '.0">' . $row_topic_views['subject'] . '</a>'
);

if ($max_num_views < $row_topic_views['numViews'])
$max_num_views = $row_topic_views['numViews'];
}
mysql_free_result($topic_view_result);

foreach ($context['top_topics_views'] as $i => $topic)
$context['top_topics_views'][$i]['post_percent'] = round(($topic['num_views'] * 100) / $max_num_views);


// Try to cache this when possible, because it's a little unavoidably slow.
if (($members = cache_get_data('stats_top_starters', 360)) == null)
{
$request = db_query("
SELECT ID_MEMBER_STARTED, COUNT(ID_TOPIC) AS hits
FROM {$db_prefix}topics" . (!empty($modSettings['recycle_enable']) && $modSettings['recycle_board'] > 0 ? "
WHERE ID_BOARD != $modSettings[recycle_board]" : '') . "
GROUP BY ID_MEMBER_STARTED
ORDER BY hits DESC
LIMIT 20", __FILE__, __LINE__);
$members = array();
while ($row = mysql_fetch_assoc($request))
$members[$row['ID_MEMBER_STARTED']] = $row['hits'];
mysql_free_result($request);

cache_put_data('stats_top_starters', $members, 360);
}

if (empty($members))
$members = array(0 => 0);
// Topic poster
$members_result = db_query("
SELECT ID_MEMBER, realName
FROM {$db_prefix}members
WHERE ID_MEMBER IN (" . implode(', ', array_keys($members)) . ")
GROUP BY ID_MEMBER
ORDER BY FIND_IN_SET(ID_MEMBER, '" . implode(',', array_keys($members)) . "')
LIMIT 10", __FILE__, __LINE__);
$context['top_starters'] = array();
$max_num_topics = 1;
while ($row_members = mysql_fetch_assoc($members_result))
{
$context['top_starters'][] = array(
'name' => $row_members['realName'],
'id' => $row_members['ID_MEMBER'],
'num_topics' => $members[$row_members['ID_MEMBER']],
'href' => $scripturl . '?action=profile;u=' . $row_members['ID_MEMBER'],
'link' => '<a href="' . $scripturl . '?action=profile;u=' . $row_members['ID_MEMBER'] . '">' . $row_members['realName'] . '</a>'
);

if (!empty($modSettings['MemberColorStats']))
$MemberColor_ID_MEMBER[$row_members['ID_MEMBER']] = $row_members['ID_MEMBER'];

if ($max_num_topics < $members[$row_members['ID_MEMBER']])
$max_num_topics = $members[$row_members['ID_MEMBER']];
}
mysql_free_result($members_result);

foreach ($context['top_starters'] as $i => $topic)
$context['top_starters'][$i]['post_percent'] = round(($topic['num_topics'] * 100) / $max_num_topics);

//Yeah baby give me some colors =).
if (!empty($MemberColor_ID_MEMBER)) {
//Now Load the Missing global :)
global $user_profile;
loadMemberData($MemberColor_ID_MEMBER);
$cmemcolid = NULL;
if (!empty($modSettings['MemberColorStats'])) {
// top_starters
foreach($context['top_starters'] as $key => $value) {
$cmemcolid = $context['top_starters'][$key]['id'];
$profile = &$user_profile[$cmemcolid];
if(!empty($profile['member_group_color']) || !empty($profile['post_group_color']))
$context['top_starters'][$key]['link'] = '<a href="' . $scripturl . '?action=profile;u=' . $profile['ID_MEMBER'] . '" title="' . $txt[92] . ' ' . $profile['realName'] . '"><font color="'.(!empty($profile['member_group_color']) ? $profile['member_group_color'] : $profile['post_group_color']).'">' . $profile['realName'] . '</font></a>';
}
       }
if (!empty($modSettings['latestMember']) && !empty($modSettings['MemberColorLatestMember'])) {
$profile = &$user_profile[$modSettings['latestMember']];
if(!empty($profile['member_group_color']) || !empty($profile['post_group_color']))
$context['latest_member']['link'] = '<a href="' . $scripturl . '?action=profile;u=' . $profile['ID_MEMBER'] . '" title="' . $txt[92] . ' ' . $profile['realName'] . '"><font color="'.(!empty($profile['member_group_color']) ? $profile['member_group_color'] : $profile['post_group_color']).'">' . $profile['realName'] . '</font></a>';
}
}
// PLUS STATIC TOP 10 Traduzido por Joomlamz
[/logged]

Procuramos por :

sources/Recent.php

IFNULL(mem.realName, m.posterName) AS posterName, t.ID_BOARD, b.name AS bName,

Alterar para:

IFNULL(mem.realName, m.posterName) AS posterName, t.ID_BOARD, t.numViews, b.name AS bName,

Sem  sair continuar no recent...
Pesqusiar por :

['maxMsgID'] - 20 * $showlatestcount) . "
AND t.ID_TOPIC = m.ID_TOPIC
AND b.ID_BOARD = t.ID_BOARD" . (!empty($modSettings['recycle_enable']) && $modSettings['recycle_board'] > 0 ? "
AND b.ID_BOARD != $modSettings[recycle_board]" : '') . "
Değiştiriyoruz..


Trocar por....


['maxMsgID'] - 20 * $showlatestcount) . "
AND m.ID_MSG = t.ID_LAST_MSG
AND b.ID_BOARD = t.ID_BOARD
" . (!empty($modSettings['recycle_enable']) && $modSettings['recycle_board'] > 0 ? "
AND b.ID_BOARD != $modSettings[recycle_board]" : '') . "


teutema/BoardIndex.template.php

pesquisar por codigo: e apagar...

// This is the "Recent Posts" bar.
if (!empty($settings['number_recent_posts']))
{
echo '
<tr>
<td class="titlebg" colspan="2">', $txt[214], '</td>
</tr>
<tr>
<td class="windowbg" width="20" valign="middle" align="center">
<a href="', $scripturl, '?action=recent"><img src="', $settings['images_url'], '/post/xx.gif" alt="', $txt[214], '" /></a>
</td>
<td class="windowbg2">';

// Only show one post.
if ($settings['number_recent_posts'] == 1)
{
// latest_post has link, href, time, subject, short_subject (shortened with...), and topic. (its id.)
echo '
<b><a href="', $scripturl, '?action=recent">', $txt[214], '</a></b>
<div class="smalltext">
', $txt[234], ' &quot;', $context['latest_post']['link'], '&quot; ', $txt[235], ' (', $context['latest_post']['time'], ')<br />
</div>';
}
// Show lots of posts.
elseif (!empty($context['latest_posts']))
{
echo '
<table cellpadding="0" cellspacing="0" width="100%" border="0">';

/* Each post in latest_posts has:
board (with an id, name, and link.), topic (the topic's id.), poster (with id, name, and link.),
subject, short_subject (shortened with...), time, link, and href. */
foreach ($context['latest_posts'] as $post)
echo '
<tr>
<td class="middletext" valign="top" nowrap="nowrap"><b>', $post['link'], '</b> ', $txt[525], ' ', $post['poster']['link'], ' (', $post['board']['link'], ')</td>
<td class="middletext" align="right" valign="top" nowrap="nowrap">', $post['time'], '</td>
</tr>';
echo '
</table>';
}
echo '
</td>
</tr>';
}


Pesquisar por este :
// Here's where the "Info Center" starts...

Depois Ponha esse Codigo por  por cima:
[logged]
    // PLUS STATIC TOP 10 başlangıcı by MJoRaYuLuN
echo'<br><div class="tborder" ', $context['browser']['needs_size_fix'] && !$context['browser']['is_ie6'] ? 'style="width: 100%;"' : '', '>
<table border="0" width="100%" cellspacing="1" cellpadding="2" class="bordercolor">
<tr>
<td class="catbg" width="%100" height="24" colspan="5">
Estatisticas - TOP 10 Por JoomlaMZ
</td>
</tr>
<tr>
<td class="titlebg" width="%25"><span class="smalltext">Tópicos Mais Lidos</td>
<td class="titlebg" width="%15"><span class="smalltext">Top 10 Topico</td>
<td class="titlebg" width="%25"><span class="smalltext">Categorias Respondidas</td>
<td class="titlebg" width="%12"><span class="smalltext">Membros Recentes</td>
<td class="titlebg" width="%18"><span class="smalltext">Mensagens recentes</td>
</tr>
<tr>
<td class="windowbg"><table width="100%"><tr>';
foreach ($context['top_topics_views'] as $topic)
{echo '
<td width="75%" valign="top"><span class="smalltext">', $topic['link'], '</td>
<td width="25%" align="right" valign="top"><span class="smalltext">', $topic['num_views'], '</td></tr>';
}echo '</table>
</td>
<td class="windowbg"><table width="100%"><tr>';
foreach ($context['top_starters'] as $poster)
{echo '
<td width="50%" valign="top"><span class="smalltext">', $poster['link'], '</td>
<td width="50%" align="right" valign="top"><span class="smalltext">', $poster['num_topics'], '</td></tr>';
}echo '</table>
</td>
<td class="windowbg"><table width="100%"><tr>';
foreach ($context['top_boards'] as $board)
{echo '
<td width="80%" valign="top"><span class="smalltext">', $board['link'], '</td>
<td width="20%" align="right" valign="top"><span class="smalltext">', $board['num_posts'], '</td></tr>';
}echo '</table>
</td>
<td class="windowbg"><table width="100%"><tr>';
foreach ($context['yeniuyeler'] as $poster)
{echo '
<td width="100%" valign="top"><span class="smalltext">',$poster['link'], '</td></tr>';  
}echo '</table>
</td>
<td class="windowbg" rowspan="3"><table width="100%"><tr>';
foreach ($context['latest_posts'] as $post)
echo '
<td width="%100"><span class="smalltext"><img src="', $settings['images_url'] . '/top10arrow.gif"> <a href="',$post['href'],'">', $post['short_subject'], '</a></td></tr>';
echo' </table>
</td>
</tr>
<tr>
<td class="titlebg"><span class="smalltext">Top 10 Topicos Respondidos</td>
<td class="titlebg"><span class="smalltext">Top 10 Posters</td>
<td class="titlebg"><span class="smalltext">Top 10 Online</td>
<td class="titlebg"><span class="smalltext">Top 10 Rep</td>
</tr>
<tr>
<td class="windowbg"><table width="100%"><tr>';
foreach ($context['top_topics_replies'] as $topic)
{echo '
<td width="80%" valign="top"><span class="smalltext">', $topic['link'], '</td>
<td width="20%" align="right" valign="top"><span class="smalltext">', $topic['num_replies'], '</td></tr>';
}echo '</table>
</td>
<td class="windowbg"><table width="100%"><tr>';
foreach ($context['top_posters'] as $poster)
{echo '
<td width="75%" valign="top"><span class="smalltext">', $poster['link'], '</td>
<td width="25%" align="right" valign="top"><span class="smalltext">', $poster['num_posts'], '</td></tr>';
}echo '</table>
</td>
<td class="windowbg"><table width="100%"><tr>';
foreach ($context['top_time_online'] as $poster)
{echo '
<td width="50%" valign="top"><span class="smalltext">', $poster['link'], '</td>
<td width="50%" align="right" valign="top"><span class="smalltext">', $poster['time_online'], '</td></tr>';
}echo '</table>
</td>
<td class="windowbg"><table width="100%"><tr>';
foreach ($context['karma'] as $poster)
{echo '
<td width="75%" valign="top"><span class="smalltext">',$poster['link'], '</td>
<td width="25%" align="right" valign="top"><span class="smalltext">',$poster['karma'], '</td></tr>';
}echo '</table>
</td>

</table></div><br>';
// PLUS STATIC TOP 10 başlangıcı by MJoRaYuLuN
[/logged]


Quem não quer copiar esses códigos podem baixar ai attach .php




Apllic   Alojamentos Profissionais de Moçambique!

rui13

muito bom mesmo joomlaMZ, com isto consegui consegui resolver todos os meus problemas.

muito obrigado.
podes fechar o topico estatisticas no forum.

;)

PORTALTEK

www.portaltek.net          -> Loja On-Line
www.portaltek.net/forum -> Suporte e Outros

Joomlamz

Mais informações serão colocadas aqui

Bom Trabalho..
Apllic   Alojamentos Profissionais de Moçambique!

gabraiboy

é possível por o link para download dele ja traduzido aki? ou anexá-lo???

G A B R A I B O Y - Soluções em Informática Se é tecnologia somos a solução

Forum: Downloads diversos

candidosa2

isto e um script que tem que fazer manualmente...
nao e Mod

O procedimento todo esta ai....no primeiro topico

pass25

Olá,

Existe alguma maneira de meter os icons como tem o vosso top 15?

Aquelas estrelas, etc...?

Um abraço!

Archa

Podes copiar a que estao aqui no forum ponha na pasta imagens do teu tema acho que e isso..
depois fazes txt com IE vai ver que aparece

patrijosa

Olá!

Aproveito este tópico para dizer que estou gostando muito desta comunidade.

E gostaria também de agradecer o actor do mesmo e de todos aqui presentes pelas informações aqui disponibilizas. Principalmente por este tópico.

Cumps de Patrijosa
:palmas
O verdadeiro sábio é um eterno aprendiz!

Big Boss

Estamos aqui para ajudar a desenvolvero smf e o mundo free de cms
Qualquer informacoes agradecemos

Sharkman

Obrigados amigos por esta estatistica!!

:palmas :palmas :palmas :palmas

Friend

#10
amigo so uma duvida no Sources/BoardIndex.php

procuro este certo ?
Citação// Find all boards and categorie ......... 

mas é so mesmo essa linha que tenho de alterar ou ou que se segue tambem ?

Citação// Find all boards and categories, as well as related information.  This will be sorted by the natural order of boards and categories, which we control.
   $result_boards = db_query("
      SELECT
         c.name AS catName, c.ID_CAT, b.ID_BOARD, b.name AS boardName, b.description,
         b.numPosts, b.numTopics, b.ID_PARENT, IFNULL(m.posterTime, 0) AS posterTime,
         IFNULL(mem.memberName, m.posterName) AS posterName, m.subject, m.ID_TOPIC,
         IFNULL(mem.realName, m.posterName) AS realName," . ($user_info['is_guest'] ? "
         1 AS isRead, 0 AS new_from" : "
         (IFNULL(lb.ID_MSG, 0) >= b.ID_MSG_UPDATED) AS isRead, IFNULL(lb.ID_MSG, -1) + 1 AS new_from,
         c.canCollapse, IFNULL(cc.ID_MEMBER, 0) AS isCollapsed") . ",
         IFNULL(mem.ID_MEMBER, 0) AS ID_MEMBER, m.ID_MSG,
         IFNULL(mods_mem.ID_MEMBER, 0) AS ID_MODERATOR, mods_mem.realName AS modRealName
      FROM {$db_prefix}boards AS b
         LEFT JOIN {$db_prefix}categories AS c ON (c.ID_CAT = b.ID_CAT)
         LEFT JOIN {$db_prefix}messages AS m ON (m.ID_MSG = b.ID_LAST_MSG)
         LEFT JOIN {$db_prefix}members AS mem ON (mem.ID_MEMBER = m.ID_MEMBER)" . (!$user_info['is_guest'] ? "
         LEFT JOIN {$db_prefix}log_boards AS lb ON (lb.ID_BOARD = b.ID_BOARD AND lb.ID_MEMBER = $ID_MEMBER)
         LEFT JOIN {$db_prefix}collapsed_categories AS cc ON (cc.ID_CAT = c.ID_CAT AND cc.ID_MEMBER = $ID_MEMBER)" : '') . "
         LEFT JOIN {$db_prefix}moderators AS mods ON (mods.ID_BOARD = b.ID_BOARD)
         LEFT JOIN {$db_prefix}members AS mods_mem ON (mods_mem.ID_MEMBER = mods.ID_MEMBER)
      WHERE $user_info[query_see_board]" . (empty($modSettings['countChildPosts']) ? "
         AND b.childLevel <= 1" : ''), __FILE__, __LINE__);



ou seja sera para alterar isto tudo ??

candidosa2


Santiago@

O link do primeiro post não esta funcionando!

candidosa2

os anexos estão sim actualizados
pode conferir

Amendoim

Não á nenhuma maneira de por o MOD como automatico? para inserir no gestor de pacotes?

Obrigado!