Advertisement:

Author Topic: İstatistikler top 10. manuel mod. 2.0.15  (Read 6616 times)

Offline D'ssConneTed

  • Semi-Newbie
  • *
  • Posts: 21
  • Gender: Male
  • www.BenimProjem.net
İstatistikler top 10. manuel mod. 2.0.15
« on: December 27, 2017, 07:03:36 PM »
2.0.15 için yapılmıştır. ve sadece default temada denenmiştir.


Subs-Recent.php
BUL:
Code: [Select]
// Find all the posts.  Newer ones will have higher IDs.  (assuming the last 20 * number are accessable...)
// !!!SLOW This query is now slow, NEEDS to be fixed.  Maybe break into two?
$request = $smcFunc['db_query']('substring', '
SELECT
m.poster_time, m.subject, m.id_topic, m.id_member, m.id_msg,
IFNULL(mem.real_name, m.poster_name) AS poster_name, t.id_board, b.name AS board_name,
SUBSTRING(m.body, 1, 385) AS body, m.smileys_enabled
FROM {db_prefix}messages AS m
INNER JOIN {db_prefix}topics AS t ON (t.id_topic = m.id_topic)
INNER JOIN {db_prefix}boards AS b ON (b.id_board = t.id_board)
LEFT JOIN {db_prefix}members AS mem ON (mem.id_member = m.id_member)
WHERE m.id_msg >= {int:likely_max_msg}' .
(!empty($modSettings['recycle_enable']) && $modSettings['recycle_board'] > 0 ? '
AND b.id_board != {int:recycle_board}' : '') . '
AND {query_wanna_see_board}' . ($modSettings['postmod_active'] ? '
AND t.approved = {int:is_approved}
AND m.approved = {int:is_approved}' : '') . '
ORDER BY m.id_msg DESC
LIMIT ' . $latestPostOptions['number_posts'],
array(
'likely_max_msg' => max(0, $modSettings['maxMsgID'] - 50 * $latestPostOptions['number_posts']),
'recycle_board' => $modSettings['recycle_board'],
'is_approved' => 1,
)
);
DEĞİŞTİR:
Code: [Select]
// Find all the posts.  Newer ones will have higher IDs.  (assuming the last 20 * number are accessable...)
// !!!SLOW This query is now slow, NEEDS to be fixed.  Maybe break into two?
$request = $smcFunc['db_query']('substring', '
SELECT
m.poster_time, m.subject, m.id_topic, m.id_member, m.id_msg,
IFNULL(mem.real_name, m.poster_name) AS poster_name, t.id_board, t.num_views, t.num_replies, b.name AS board_name,
SUBSTRING(m.body, 1, 385) AS body, m.smileys_enabled
FROM {db_prefix}topics AS t
INNER JOIN {db_prefix}messages AS m ON (m.id_msg = t.id_last_msg)
INNER JOIN {db_prefix}boards AS b ON (b.id_board = t.id_board)
LEFT JOIN {db_prefix}members AS mem ON (mem.id_member = m.id_member)' . (!$user_info['is_guest'] ? '
LEFT JOIN {db_prefix}log_topics AS lt ON (lt.id_topic = t.id_topic AND lt.id_member = {int:current_member})
LEFT JOIN {db_prefix}log_mark_read AS lmr ON (lmr.id_board = b.id_board AND lmr.id_member = {int:current_member})' : '') . '
WHERE t.id_last_msg >= {int:likely_max_msg}
AND ' . $user_info['query_wanna_see_board'] . ($modSettings['postmod_active'] ? '
AND t.approved = {int:is_approved}
AND m.approved = {int:is_approved}' : '') . '
ORDER BY t.id_last_msg DESC
LIMIT ' . $latestPostOptions['number_posts'],
array(
'current_member' => $user_info['id'],
'likely_max_msg' => max(0, $modSettings['maxMsgID'] - 50 * $latestPostOptions['number_posts']),
'is_approved' => 1,
)
);
BUL:
Code: [Select]
// Build the array.
$posts[] = array(
'board' => array(

DEĞİŞ:
Code: [Select]
// Build the array.
$posts[] = array(
    'views' => $row['num_views'],
'replies' => $row['num_replies'],
'board' => array(

BoardIndex.php

Bul :
Code: [Select]
$context['page_title'] = sprintf($txt['forum_index'], $context['forum_name']);


Altına ekle:
Code: [Select]
// Forum istatistikleri START...

$context['html_headers'] ='
        <link rel="stylesheet" type="text/css" href="'.$settings['default_theme_url'].'/css/istatistics.css" />';


// Get averages...
$result = $smcFunc['db_query']('', '
SELECT
SUM(posts) AS posts, SUM(topics) AS topics, SUM(registers) AS registers,
SUM(most_on) AS most_on, MIN(date) AS date, SUM(hits) AS hits
FROM {db_prefix}log_activity',
array(
)
);
$row = $smcFunc['db_fetch_assoc']($result);
$smcFunc['db_free_result']($result);

// This would be the amount of time the forum has been up... in days...
$total_days_up = ceil((time() - strtotime($row['date'])) / (60 * 60 * 24));

$context['average_posts'] = comma_format(round($row['posts'] / $total_days_up, 2));
$context['average_topics'] = comma_format(round($row['topics'] / $total_days_up, 2));
$context['average_members'] = comma_format(round($row['registers'] / $total_days_up, 2));
$context['average_online'] = comma_format(round($row['most_on'] / $total_days_up, 2));
$context['average_hits'] = comma_format(round($row['hits'] / $total_days_up, 2));

$context['num_hits'] = comma_format($row['hits'], 0);

// How many users are online now.
$result = $smcFunc['db_query']('', '
SELECT COUNT(*)
FROM {db_prefix}log_online',
array(
)
);
list ($context['users_online']) = $smcFunc['db_fetch_row']($result);
$smcFunc['db_free_result']($result);

// Statistics such as number of boards, categories, etc.
$result = $smcFunc['db_query']('', '
SELECT COUNT(*)
FROM {db_prefix}boards AS b
WHERE b.redirect = {string:blank_redirect}',
array(
'blank_redirect' => '',
)
);
list ($context['num_boards']) = $smcFunc['db_fetch_row']($result);
$smcFunc['db_free_result']($result);

$result = $smcFunc['db_query']('', '
SELECT COUNT(*)
FROM {db_prefix}categories AS c',
array(
)
);
list ($context['num_categories']) = $smcFunc['db_fetch_row']($result);
$smcFunc['db_free_result']($result);

// Format the numbers nicely.
$context['users_online'] = comma_format($context['users_online']);
$context['num_boards'] = comma_format($context['num_boards']);
$context['num_categories'] = comma_format($context['num_categories']);

$context['num_members'] = comma_format($modSettings['totalMembers']);
$context['num_posts'] = comma_format($modSettings['totalMessages']);
$context['num_topics'] = comma_format($modSettings['totalTopics']);
$context['most_members_online'] = array(
'number' => comma_format($modSettings['mostOnline']),
'date' => timeformat($modSettings['mostDate'])
);
$context['latest_member'] = &$context['common_stats']['latest_member'];

// Male vs. female ratio - let's calculate this only every four minutes.
if (($context['gender'] = cache_get_data('stats_gender', 240)) == null)
{
$result = $smcFunc['db_query']('', '
SELECT COUNT(*) AS total_members, gender
FROM {db_prefix}members
GROUP BY gender',
array(
)
);
$context['gender'] = array();
while ($row = $smcFunc['db_fetch_assoc']($result))
{
// Assuming we're telling... male or female?
if (!empty($row['gender']))
$context['gender'][$row['gender'] == 2 ? 'females' : 'males'] = $row['total_members'];
}
$smcFunc['db_free_result']($result);

// Set these two zero if the didn't get set at all.
if (empty($context['gender']['males']))
$context['gender']['males'] = 0;
if (empty($context['gender']['females']))
$context['gender']['females'] = 0;

// Try and come up with some "sensible" default states in case of a non-mixed board.
if ($context['gender']['males'] == $context['gender']['females'])
$context['gender']['ratio'] = '1:1';
elseif ($context['gender']['males'] == 0)
$context['gender']['ratio'] = '0:1';
elseif ($context['gender']['females'] == 0)
$context['gender']['ratio'] = '1:0';
elseif ($context['gender']['males'] > $context['gender']['females'])
$context['gender']['ratio'] = round($context['gender']['males'] / $context['gender']['females'], 1) . ':1';
elseif ($context['gender']['females'] > $context['gender']['males'])
$context['gender']['ratio'] = '1:' . round($context['gender']['females'] / $context['gender']['males'], 1);

cache_put_data('stats_gender', $context['gender'], 240);
}

$date = strftime('%Y-%m-%d', forum_time(false));

// Members online so far today.
$result = $smcFunc['db_query']('', '
SELECT most_on
FROM {db_prefix}log_activity
WHERE date = {date:today_date}
LIMIT 1',
array(
'today_date' => $date,
)
);
list ($context['online_today']) = $smcFunc['db_fetch_row']($result);
$smcFunc['db_free_result']($result);

$context['online_today'] = comma_format((int) $context['online_today']);



// Board top 10.
$boards_result = $smcFunc['db_query']('', '
SELECT id_board, name, num_posts
FROM {db_prefix}boards AS b
WHERE {query_see_board}' . (!empty($modSettings['recycle_enable']) && $modSettings['recycle_board'] > 0 ? '
AND b.id_board != {int:recycle_board}' : '') . '
AND b.redirect = {string:blank_redirect}
ORDER BY num_posts DESC
LIMIT 10',
array(
'recycle_board' => $modSettings['recycle_board'],
'blank_redirect' => '',
)
);
$context['top_boards'] = array();
$max_num_posts = 1;
while ($row_board = $smcFunc['db_fetch_assoc']($boards_result))
{
$context['top_boards'][] = array(
'id' => $row_board['id_board'],
'name' => $row_board['name'],
'num_posts' => $row_board['num_posts'],
'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['num_posts'])
$max_num_posts = $row_board['num_posts'];
}
$smcFunc['db_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);
$context['top_boards'][$i]['num_posts'] = comma_format($context['top_boards'][$i]['num_posts']);
}

// Are you on a larger forum?  If so, let's try to limit the number of topics we search through.
if ($modSettings['totalMessages'] > 100000)
{
$request = $smcFunc['db_query']('', '
SELECT id_topic
FROM {db_prefix}topics
WHERE num_replies != {int:no_replies}' . ($modSettings['postmod_active'] ? '
AND approved = {int:is_approved}' : '') . '
ORDER BY num_replies DESC
LIMIT 100',
array(
'no_replies' => 0,
'is_approved' => 1,
)
);
$topic_ids = array();
while ($row = $smcFunc['db_fetch_assoc']($request))
$topic_ids[] = $row['id_topic'];
$smcFunc['db_free_result']($request);
}
else
$topic_ids = array();



// Topic replies top 10.
$topic_reply_result = $smcFunc['db_query']('', '
SELECT m.subject, t.num_replies, t.id_board, t.id_topic, b.name
FROM {db_prefix}topics AS t
INNER JOIN {db_prefix}messages AS m ON (m.id_msg = t.id_first_msg)
INNER JOIN {db_prefix}boards AS b ON (b.id_board = t.id_board' . (!empty($modSettings['recycle_enable']) && $modSettings['recycle_board'] > 0 ? '
AND b.id_board != {int:recycle_board}' : '') . ')
WHERE {query_see_board}' . (!empty($topic_ids) ? '
AND t.id_topic IN ({array_int:topic_list})' : ($modSettings['postmod_active'] ? '
AND t.approved = {int:is_approved}' : '')) . '
ORDER BY t.num_replies DESC
LIMIT 10',
array(
'topic_list' => $topic_ids,
'recycle_board' => $modSettings['recycle_board'],
'is_approved' => 1,
)
);
$context['top_topics_replies'] = array();
$max_num_replies = 1;
while ($row_topic_reply = $smcFunc['db_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['num_replies'],
'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['num_replies'])
$max_num_replies = $row_topic_reply['num_replies'];
}
$smcFunc['db_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);
$context['top_topics_replies'][$i]['num_replies'] = comma_format($context['top_topics_replies'][$i]['num_replies']);
}

// Large forums may need a bit more prodding...
if ($modSettings['totalMessages'] > 100000)
{
$request = $smcFunc['db_query']('', '
SELECT id_topic
FROM {db_prefix}topics
WHERE num_views != {int:no_views}
ORDER BY num_views DESC
LIMIT 100',
array(
'no_views' => 0,
)
);
$topic_ids = array();
while ($row = $smcFunc['db_fetch_assoc']($request))
$topic_ids[] = $row['id_topic'];
$smcFunc['db_free_result']($request);
}
else
$topic_ids = array();



// Topic views top 10.
$topic_view_result = $smcFunc['db_query']('', '
SELECT m.subject, t.num_views, t.id_board, t.id_topic, b.name
FROM {db_prefix}topics AS t
INNER JOIN {db_prefix}messages AS m ON (m.id_msg = t.id_first_msg)
INNER JOIN {db_prefix}boards AS b ON (b.id_board = t.id_board' . (!empty($modSettings['recycle_enable']) && $modSettings['recycle_board'] > 0 ? '
AND b.id_board != {int:recycle_board}' : '') . ')
WHERE {query_see_board}' . (!empty($topic_ids) ? '
AND t.id_topic IN ({array_int:topic_list})' : ($modSettings['postmod_active'] ? '
AND t.approved = {int:is_approved}' : '')) . '
ORDER BY t.num_views DESC
LIMIT 10',
array(
'topic_list' => $topic_ids,
'recycle_board' => $modSettings['recycle_board'],
'is_approved' => 1,
)
);
$context['top_topics_views'] = array();
$max_num_views = 1;
while ($row_topic_views = $smcFunc['db_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['num_views'],
'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['num_views'])
$max_num_views = $row_topic_views['num_views'];
}
$smcFunc['db_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);
$context['top_topics_views'][$i]['num_views'] = comma_format($context['top_topics_views'][$i]['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 = $smcFunc['db_query']('', '
SELECT id_member_started, COUNT(*) AS hits
FROM {db_prefix}topics' . (!empty($modSettings['recycle_enable']) && $modSettings['recycle_board'] > 0 ? '
WHERE id_board != {int:recycle_board}' : '') . '
GROUP BY id_member_started
ORDER BY hits DESC
LIMIT 20',
array(
'recycle_board' => $modSettings['recycle_board'],
)
);
$members = array();
while ($row = $smcFunc['db_fetch_assoc']($request))
$members[$row['id_member_started']] = $row['hits'];
$smcFunc['db_free_result']($request);

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

if (empty($members))
$members = array(0 => 0);


    // Poster top 10.
$members_result = $smcFunc['db_query']('', '
SELECT id_member, real_name, posts
FROM {db_prefix}members
WHERE posts > {int:no_posts}
ORDER BY posts DESC
LIMIT 10',
array(
'no_posts' => 0,
)
);
$context['top_posters'] = array();
$max_num_posts = 1;
while ($row_members = $smcFunc['db_fetch_assoc']($members_result))
{
$context['top_posters'][] = array(
'name' => $row_members['real_name'],
'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['real_name'] . '</a>'
);

if ($max_num_posts < $row_members['posts'])
$max_num_posts = $row_members['posts'];
}
$smcFunc['db_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);
$context['top_posters'][$i]['num_posts'] = comma_format($context['top_posters'][$i]['num_posts']);
}


// Topic poster top 10.
$members_result = $smcFunc['db_query']('top_topic_starters', '
SELECT id_member, real_name
FROM {db_prefix}members
WHERE id_member IN ({array_int:member_list})
ORDER BY FIND_IN_SET(id_member, {string:top_topic_posters})
LIMIT 10',
array(
'member_list' => array_keys($members),
'top_topic_posters' => implode(',', array_keys($members)),
)
);
$context['top_starters'] = array();
$max_num_topics = 1;
while ($row_members = $smcFunc['db_fetch_assoc']($members_result))
{
$context['top_starters'][] = array(
'name' => $row_members['real_name'],
'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['real_name'] . '</a>'
);

if ($max_num_topics < $members[$row_members['id_member']])
$max_num_topics = $members[$row_members['id_member']];
}
$smcFunc['db_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);
$context['top_starters'][$i]['num_topics'] = comma_format($context['top_starters'][$i]['num_topics']);
}




// Time online top 10.
$temp = cache_get_data('stats_total_time_members', 600);
$members_result = $smcFunc['db_query']('', '
SELECT id_member, real_name, total_time_logged_in
FROM {db_prefix}members' . (!empty($temp) ? '
WHERE id_member IN ({array_int:member_list_cached})' : '') . '
ORDER BY total_time_logged_in DESC
LIMIT 20',
array(
'member_list_cached' => $temp,
)
);
$context['top_time_online'] = array();
$temp2 = array();
$max_time_online = 1;
while ($row_members = $smcFunc['db_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['total_time_logged_in'] / 86400);
$timeHours = floor(($row_members['total_time_logged_in'] % 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['total_time_logged_in'] % 3600) / 60) . $txt['totalTimeLogged7'];

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

if ($max_time_online < $row_members['total_time_logged_in'])
$max_time_online = $row_members['total_time_logged_in'];
}
$smcFunc['db_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);

// Cache the ones we found for a bit, just so we don't have to look again.
if ($temp !== $temp2)
cache_put_data('stats_total_time_members', $temp2, 480);


// Forum istatistikleri END...

           

Offline D'ssConneTed

  • Semi-Newbie
  • *
  • Posts: 21
  • Gender: Male
  • www.BenimProjem.net
Re: İstatistikler top 10. manuel mod. 2.0.15
« Reply #1 on: December 27, 2017, 07:09:06 PM »
BoardIndex.template.php

Bul:
Code: [Select]
function template_info_center()
{
global $context, $settings, $options, $txt, $scripturl, $modSettings;

// Here's where the "Info Center" starts...
echo '
<span class="clear upperframe"><span></span></span>
<div class="roundframe"><div class="innerframe">
<div class="cat_bar">
<h3 class="catbg">
<img class="icon" id="upshrink_ic" src="', $settings['images_url'], '/collapse.gif" alt="*" title="', $txt['upshrink_description'], '" style="display: none;" />
', sprintf($txt['info_center_title'], $context['forum_name_html_safe']), '
</h3>
</div>
<div id="upshrinkHeaderIC"', empty($options['collapse_header_ic']) ? '' : ' style="display: none;"', '>';

// This is the "Recent Posts" bar.
if (!empty($settings['number_recent_posts']) && (!empty($context['latest_posts']) || !empty($context['latest_post'])))
{
echo '
<div class="title_barIC">
<h4 class="titlebg">
<span class="ie6_header floatleft">
<a href="', $scripturl, '?action=recent"><img class="icon" src="', $settings['images_url'], '/post/xx.gif" alt="', $txt['recent_posts'], '" /></a>
', $txt['recent_posts'], '
</span>
</h4>
</div>
<div class="hslice" id="recent_posts_content">
<div class="entry-title" style="display: none;">', $context['forum_name_html_safe'], ' - ', $txt['recent_posts'], '</div>
<div class="entry-content" style="display: none;">
<a rel="feedurl" href="', $scripturl, '?action=.xml;type=webslice">', $txt['subscribe_webslice'], '</a>
</div>';

// 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 '
<strong><a href="', $scripturl, '?action=recent">', $txt['recent_posts'], '</a></strong>
<p id="infocenter_onepost" class="middletext">
', $txt['recent_view'], ' &quot;', $context['latest_post']['link'], '&quot; ', $txt['recent_updated'], ' (', $context['latest_post']['time'], ')<br />
</p>';
}
// Show lots of posts.
elseif (!empty($context['latest_posts']))
{
echo '
<dl id="ic_recentposts" class="middletext">';

/* 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 '
<dt><strong>', $post['link'], '</strong> ', $txt['by'], ' ', $post['poster']['link'], ' (', $post['board']['link'], ')</dt>
<dd>', $post['time'], '</dd>';
echo '
</dl>';
}
echo '
</div>';
}

// Show information about events, birthdays, and holidays on the calendar.
if ($context['show_calendar'])
{
echo '
<div class="title_barIC">
<h4 class="titlebg">
<span class="ie6_header floatleft">
<a href="', $scripturl, '?action=calendar' . '"><img class="icon" src="', $settings['images_url'], '/icons/calendar.gif', '" alt="', $context['calendar_only_today'] ? $txt['calendar_today'] : $txt['calendar_upcoming'], '" /></a>
', $context['calendar_only_today'] ? $txt['calendar_today'] : $txt['calendar_upcoming'], '
</span>
</h4>
</div>
<p class="smalltext">';

// Holidays like "Christmas", "Chanukah", and "We Love [Unknown] Day" :P.
if (!empty($context['calendar_holidays']))
echo '
<span class="holiday">', $txt['calendar_prompt'], ' ', implode(', ', $context['calendar_holidays']), '</span><br />';

// People's birthdays. Like mine. And yours, I guess. Kidding.
if (!empty($context['calendar_birthdays']))
{
echo '
<span class="birthday">', $context['calendar_only_today'] ? $txt['birthdays'] : $txt['birthdays_upcoming'], '</span> ';
/* Each member in calendar_birthdays has:
id, name (person), age (if they have one set?), is_last. (last in list?), and is_today (birthday is today?) */
foreach ($context['calendar_birthdays'] as $member)
echo '
<a href="', $scripturl, '?action=profile;u=', $member['id'], '">', $member['is_today'] ? '<strong>' : '', $member['name'], $member['is_today'] ? '</strong>' : '', isset($member['age']) ? ' (' . $member['age'] . ')' : '', '</a>', $member['is_last'] ? '<br />' : ', ';
}
// Events like community get-togethers.
if (!empty($context['calendar_events']))
{
echo '
<span class="event">', $context['calendar_only_today'] ? $txt['events'] : $txt['events_upcoming'], '</span> ';
/* Each event in calendar_events should have:
title, href, is_last, can_edit (are they allowed?), modify_href, and is_today. */
foreach ($context['calendar_events'] as $event)
echo '
', $event['can_edit'] ? '<a href="' . $event['modify_href'] . '" title="' . $txt['calendar_edit'] . '"><img src="' . $settings['images_url'] . '/icons/modify_small.gif" alt="*" /></a> ' : '', $event['href'] == '' ? '' : '<a href="' . $event['href'] . '">', $event['is_today'] ? '<strong>' . $event['title'] . '</strong>' : $event['title'], $event['href'] == '' ? '' : '</a>', $event['is_last'] ? '<br />' : ', ';
}
echo '
</p>';
}

// Show statistical style information...
if ($settings['show_stats_index'])
{
echo '
<div class="title_barIC">
<h4 class="titlebg">
<span class="ie6_header floatleft">
<a href="', $scripturl, '?action=stats"><img class="icon" src="', $settings['images_url'], '/icons/info.gif" alt="', $txt['forum_stats'], '" /></a>
', $txt['forum_stats'], '
</span>
</h4>
</div>
<p>
', $context['common_stats']['total_posts'], ' ', $txt['posts_made'], ' ', $txt['in'], ' ', $context['common_stats']['total_topics'], ' ', $txt['topics'], ' ', $txt['by'], ' ', $context['common_stats']['total_members'], ' ', $txt['members'], '. ', !empty($settings['show_latest_member']) ? $txt['latest_member'] . ': <strong> ' . $context['common_stats']['latest_member']['link'] . '</strong>' : '', '<br />
', (!empty($context['latest_post']) ? $txt['latest_post'] . ': <strong>&quot;' . $context['latest_post']['link'] . '&quot;</strong>  ( ' . $context['latest_post']['time'] . ' )<br />' : ''), '
<a href="', $scripturl, '?action=recent">', $txt['recent_view'], '</a>', $context['show_stats'] ? '<br />
<a href="' . $scripturl . '?action=stats">' . $txt['more_stats'] . '</a>' : '', '
</p>';
}

// "Users online" - in order of activity.
echo '
<div class="title_barIC">
<h4 class="titlebg">
<span class="ie6_header floatleft">
', $context['show_who'] ? '<a href="' . $scripturl . '?action=who' . '">' : '', '<img class="icon" src="', $settings['images_url'], '/icons/online.gif', '" alt="', $txt['online_users'], '" />', $context['show_who'] ? '</a>' : '', '
', $txt['online_users'], '
</span>
</h4>
</div>
<p class="inline stats">
', $context['show_who'] ? '<a href="' . $scripturl . '?action=who">' : '', comma_format($context['num_guests']), ' ', $context['num_guests'] == 1 ? $txt['guest'] : $txt['guests'], ', ' . comma_format($context['num_users_online']), ' ', $context['num_users_online'] == 1 ? $txt['user'] : $txt['users'];

// Handle hidden users and buddies.
$bracketList = array();
if ($context['show_buddies'])
$bracketList[] = comma_format($context['num_buddies']) . ' ' . ($context['num_buddies'] == 1 ? $txt['buddy'] : $txt['buddies']);
if (!empty($context['num_spiders']))
$bracketList[] = comma_format($context['num_spiders']) . ' ' . ($context['num_spiders'] == 1 ? $txt['spider'] : $txt['spiders']);
if (!empty($context['num_users_hidden']))
$bracketList[] = comma_format($context['num_users_hidden']) . ' ' . $txt['hidden'];

if (!empty($bracketList))
echo ' (' . implode(', ', $bracketList) . ')';

echo $context['show_who'] ? '</a>' : '', '
</p>
<p class="inline smalltext">';

// Assuming there ARE users online... each user in users_online has an id, username, name, group, href, and link.
if (!empty($context['users_online']))
{
echo '
', sprintf($txt['users_active'], $modSettings['lastActive']), ':<br />', implode(', ', $context['list_users_online']);

// Showing membergroups?
if (!empty($settings['show_group_key']) && !empty($context['membergroups']))
echo '
<br />[' . implode(']&nbsp;&nbsp;[', $context['membergroups']) . ']';
}

echo '
</p>
<p class="last smalltext">
', $txt['most_online_today'], ': <strong>', comma_format($modSettings['mostOnlineToday']), '</strong>.
', $txt['most_online_ever'], ': ', comma_format($modSettings['mostOnline']), ' (', timeformat($modSettings['mostDate']), ')
</p>';

// If they are logged in, but statistical information is off... show a personal message bar.
if ($context['user']['is_logged'] && !$settings['show_stats_index'])
{
echo '
<div class="title_barIC">
<h4 class="titlebg">
<span class="ie6_header floatleft">
', $context['allow_pm'] ? '<a href="' . $scripturl . '?action=pm">' : '', '<img class="icon" src="', $settings['images_url'], '/message_sm.gif" alt="', $txt['personal_message'], '" />', $context['allow_pm'] ? '</a>' : '', '
<span>', $txt['personal_message'], '</span>
</span>
</h4>
</div>
<p class="pminfo">
<strong><a href="', $scripturl, '?action=pm">', $txt['personal_message'], '</a></strong>
<span class="smalltext">
', $txt['you_have'], ' ', comma_format($context['user']['messages']), ' ', $context['user']['messages'] == 1 ? $txt['message_lowercase'] : $txt['msg_alert_messages'], '.... ', $txt['click'], ' <a href="', $scripturl, '?action=pm">', $txt['here'], '</a> ', $txt['to_view'], '
</span>
</p>';
}

echo '
</div>
</div></div>
<span class="lowerframe"><span></span></span>';

// Info center collapse object.
echo '
<script type="text/javascript"><!-- // --><![CDATA[
var oInfoCenterToggle = new smc_Toggle({
bToggleEnabled: true,
bCurrentlyCollapsed: ', empty($options['collapse_header_ic']) ? 'false' : 'true', ',
aSwappableContainers: [
\'upshrinkHeaderIC\'
],
aSwapImages: [
{
sId: \'upshrink_ic\',
srcExpanded: smf_images_url + \'/collapse.gif\',
altExpanded: ', JavaScriptEscape($txt['upshrink_description']), ',
srcCollapsed: smf_images_url + \'/expand.gif\',
altCollapsed: ', JavaScriptEscape($txt['upshrink_description']), '
}
],
oThemeOptions: {
bUseThemeSettings: ', $context['user']['is_guest'] ? 'false' : 'true', ',
sOptionName: \'collapse_header_ic\',
sSessionVar: ', JavaScriptEscape($context['session_var']), ',
sSessionId: ', JavaScriptEscape($context['session_id']), '
},
oCookieOptions: {
bUseCookie: ', $context['user']['is_guest'] ? 'true' : 'false', ',
sCookieName: \'upshrinkIC\'
}
});
// ]]></script>';
}


Offline D'ssConneTed

  • Semi-Newbie
  • *
  • Posts: 21
  • Gender: Male
  • www.BenimProjem.net
Re: İstatistikler top 10. manuel mod. 2.0.15
« Reply #2 on: December 27, 2017, 07:09:50 PM »
Değiştir:

Code: [Select]
function template_info_center()
{
global $context, $settings, $options, $txt, $scripturl, $modSettings;
// Here's where the "Info Center" starts...
echo'
<span class="clear upperframe"><span></span></span>
<div class="roundframe"><div class="innerframe"> ';
// This is the "Recent Posts" bar.
if (!empty($settings['number_recent_posts']) && (!empty($context['latest_posts']) || !empty($context['latest_post'])))
{
echo'
<div class="hslice" id="recent_posts_content">';
// 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'
<strong><a href="', $scripturl, '?action=recent">', $txt['recent_posts'], '</a></strong>
<p id="infocenter_onepost" class="middletext">
', $txt['recent_view'], ' &quot;', $context['latest_post']['link'], '&quot; ', $txt['recent_updated'], ' (', $context['latest_post']['time'], ')<br />
</p>';
}
// Show lots of posts.
elseif (!empty($context['latest_posts']))
{
echo'
<!-- İstatistikler START -->
<div class="tabconteiner">
                <div class="tab">
                    <button class="tablinks" onclick="stabs(event, \'sonileti\')" id="dOpen">'.$txt['stats_lp'].'</button>
                    <button class="tablinks" onclick="stabs(event, \'forumist\')">'.$txt['stats_ist'].'</button>
                    <button class="tablinks" onclick="stabs(event, \'sonline\')">'.$txt['stats_on'].'</button>
                    <button class="tablinks" onclick="stabs(event, \'konumesaj\')">'.$txt['stats_rw'].'</button>
                    <button class="tablinks" onclick="stabs(event, \'konucevaphit\')">'.$txt['stats_rv'].'</button>
                    <button class="tablinks" onclick="stabs(event, \'enonline_bolum\')">'.$txt['stats_ob'].'</button>
                </div>';
    sonileti();
    scalendar();
                fista();
enonline_bolum();
konucevaphit();
konumesaj();

        echo'
            </div>
        <script type="text/javascript">
<!-- // --><![CDATA[
    function stabs(event, id) {
                var i, tabs, tablinks;
                tabs = document.getElementsByClassName("tabcontent");
                for (i = 0; i < tabs.length; i++) {
                    tabs[i].style.display = "none";}
                tablinks = document.getElementsByClassName("tablinks");
                for (i = 0; i < tablinks.length; i++) {
                    tablinks[i].className = tablinks[i].className.replace(" active", "");}
                document.getElementById(id).style.display = "block";
                event.currentTarget.className += " active";
            }
            document.getElementById("dOpen").click();
// ]]>
        </script>
<!-- İstatistikler END --> ';
}
echo '
</div>';
}
echo '<br style="clear: both;" />
</div></div>
<span class="lowerframe"><span></span></span>';
}

// Son 10 İleti D'ssConnecTed START
function sonileti(){
    global $context, $settings, $txt, $scripturl;
$ino = 1;
echo'
<div id="sonileti" class="tabcontent">
        <table class="istatistics" style="width:100%;">
<tr style="width:100%;">
    <th class="to40"><span class="stext">&nbsp;', $txt['stats_m'], '</span></th>
<th class="to25"><span class="stext">', $txt['stats_g'], '</span></th>
            <th class="to5"> <span class="stext">', $txt['stats_v'], '</span></th>
<th class="to5"> <span class="stext">', $txt['stats_r'], '</span></th>
            <th class="to25"><span class="stext">', $txt['stats_d'], '</span></th>
</tr>';
foreach ($context['latest_posts'] as $post){
    $imag ='<img src="'.$settings['images_url'].'/istatistics/y'.$ino.'.png" alt="" class="sayi" />';
        echo'
<tr style="width:100%;">
            <td class="to40 hov">&nbsp;'.$imag.' <a href="',$post['href'],'" title="',$post['preview'],'"><span class="lefttext">',$post['short_subject'],'</span></a>';
if ($post['replies'] > 0){
echo'<a href="', $scripturl, '?topic=', $post['topic'], '' . '"><img src="', $settings['images_url'], '/istatistics/firstmesaj.png', '" class="right" alt="', $txt['stats_fi'], '" title="', $txt['stats_fi'], '" /></a>';
}
echo'</td>
<td class="to25 hov"><span class="stext">',$post['poster']['link'],'</span></td>
<td class="to5 hov"> <span class="stext">',$post['views'],'</span></td>
<td class="to5 hov"> <span class="stext">',$post['replies'],'</span></td>
            <td class="to25 hov"><span class="stext">',$post['time'],'</span></td>
</tr>';
$ino++;
}
    echo '
   </table>
</div>';
}
function fista(){
global $txt, $context, $settings, $modSettings, $scripturl;
// Show statistical style information...
echo '<div id="forumist" class="tabcontent">
<table style="width:100%;">
    <tbody>
    <tr style="width:100%;">
            <th class="to50"><span class="stext">&nbsp;'.$txt['stats_ist'].'</span></th>
        <th class="to50"><span class="stext"> </span></th>
        </tr>
    <tr style="width:100%;">
    <td style="width:50%;">
    <table class="istatistics" style="width:100%;">
                    <tr style="width:100%;">
                        <td class="to80 hov"><img src="'.$settings['images_url'].'/istatistics/m1.png" alt="" class="sayi" />
<span class="lefttext">&nbsp;', $txt['total_members'], '</span></td>
                    <td class="to20 hov"><span class="stext">', $context['show_member_list'] ? '<a href="' . $scripturl . '?action=mlist">' . $context['num_members'] . '</a>' : $context['num_members'], '</span></td>
                    </tr><tr style="width:100%;">
                        <td class="to80 hov"><img src="'.$settings['images_url'].'/istatistics/m2.png" alt="" class="sayi" />
<span class="lefttext">&nbsp;', $txt['total_posts'], '</span></td>
                    <td class="to20 hov"><span class="stext">', $context['num_posts'], '</span></td>
                    </tr><tr style="width:100%;">
                        <td class="to80 hov"><img src="'.$settings['images_url'].'/istatistics/m3.png" alt="" class="sayi" />
<span class="lefttext">&nbsp;', $txt['total_topics'], '</span></td>
                    <td class="to20 hov"><span class="stext">', $context['num_topics'], '</span></td>
                    </tr><tr style="width:100%;">
                        <td class="to80 hov"><img src="'.$settings['images_url'].'/istatistics/m4.png" alt="" class="sayi" />
<span class="lefttext">&nbsp;', $txt['total_cats'], '</span></td>
                    <td class="to20 hov"><span class="stext">', $context['num_categories'], '</span></td>
                    </tr><tr style="width:100%;">
                        <td class="to80 hov"><img src="'.$settings['images_url'].'/istatistics/m5.png" alt="" class="sayi" />
<span class="lefttext">&nbsp;', $txt['users_online'], '</span></td>
                    <td class="to20 hov"><span class="stext">', $context['users_online'], '</span></td>
                    </tr><tr style="width:100%;">
                        <td class="to80 hov"><img src="'.$settings['images_url'].'/istatistics/m6.png" alt="" class="sayi" />
<span class="lefttext">&nbsp;', $txt['most_online'], ' - ', $context['most_members_online']['date'], '</span></td>
                    <td class="to20 hov"><span class="stext">', $context['most_members_online']['number'], '</span></td>
                    </tr><tr style="width:100%;">
                        <td class="to80 hov"><img src="'.$settings['images_url'].'/istatistics/m7.png" alt="" class="sayi" />
<span class="lefttext">&nbsp;', $txt['users_online_today'], '</span></td>
                    <td class="to20 hov"><span class="stext">', $context['online_today'], '</span></td>
                    </tr>';
                if (!empty($modSettings['hitStats']))
                echo '
                <tr style="width:100%;">
                        <td class="to80 hov"><img src="'.$settings['images_url'].'/istatistics/m8.png" alt="" class="sayi" />
<span class="lefttext">&nbsp;', $txt['num_hits'], '</span></td>
                    <td class="to20 hov"><span class="stext">', $context['num_hits'], '</span></td>
                    </tr>';
                echo '
            </table>
        </td>
<td style="width:50%;">
            <table class="istatistics" style="width:100%;">
                <tr style="width:100%;">
                        <td class="to60 hov"><img src="'.$settings['images_url'].'/istatistics/tu1.png" alt="" class="sayi" />
<span class="lefttext">&nbsp;', $txt['average_members'], '</span></td>
                    <td class="to40 hov"><span class="stext">', $context['average_members'], '</span></td>
                    </tr><tr style="width:100%;">
                        <td class="to60 hov"><img src="'.$settings['images_url'].'/istatistics/tu2.png" alt="" class="sayi" />
<span class="lefttext">&nbsp;', $txt['average_posts'], '</span></td>
                    <td class="to40 hov"><span class="stext">', $context['average_posts'], '</span></td>
                    </tr><tr style="width:100%;">
                        <td class="to60 hov"><img src="'.$settings['images_url'].'/istatistics/tu3.png" alt="" class="sayi" />
<span class="lefttext">&nbsp;', $txt['average_topics'], '</span></td>
                    <td class="to40 hov"><span class="stext">', $context['average_topics'], '</span></td>
                    </tr><tr style="width:100%;">
                        <td class="to60 hov"><img src="'.$settings['images_url'].'/istatistics/tu4.png" alt="" class="sayi" />
<span class="lefttext">&nbsp;', $txt['total_boards'], '</span></td>
                    <td class="to40 hov"><span class="stext">', $context['num_boards'], '</span></td>
                    </tr><tr style="width:100%;">
                        <td class="to60 hov"><img src="'.$settings['images_url'].'/istatistics/tu5.png" alt="" class="sayi" />
<span class="lefttext">&nbsp;', $txt['latest_member'], '</span></td>
                    <td class="to40 hov"><span class="stext">', $context['common_stats']['latest_member']['link'], '</span></td>
                    </tr><tr style="width:100%;">
                        <td class="to60 hov"><img src="'.$settings['images_url'].'/istatistics/tu6.png" alt="" class="sayi" />
<span class="lefttext">&nbsp;', $txt['average_online'], '</span></td>
                    <td class="to40 hov"><span class="stext">', $context['average_online'], '</span></td>
                    </tr><tr style="width:100%;">
                        <td class="to60 hov"><img src="'.$settings['images_url'].'/istatistics/tu7.png" alt="" class="sayi" />
<span class="lefttext">&nbsp;', $txt['gender_ratio'], '</span></td>
                    <td class="to40 hov"><span class="stext">', $context['gender']['ratio'], '</span></td>
                    </tr>';
                  if (!empty($modSettings['hitStats']))
                echo '
            <tr style="width:100%;">
                       <td class="to60 hov"><img src="'.$settings['images_url'].'/istatistics/tu8.png" alt="" class="sayi" />
<span class="lefttext">&nbsp;', $txt['average_hits'], '</span></td>
                   <td class="to40 hov"><span class="stext">', $context['average_hits'], '</span></td>
                    </tr>';
                echo '
            </table>
</td>
</tr>
</tbody>
</table>
</div>';
}

function scalendar(){
global $context, $scripturl, $txt, $settings, $modSettings;

// "Users online" - in order of activity.
echo '
<div id="sonline" class="tabcontent">
<table class="istatistics" style="width:100%;">
<tbody>
    <tr style="width:100%;">
        <th style="width:100%;"><span class="stext">&nbsp;
<img class="icon" src="', $settings['images_url'], '/icons/members.gif', '" height="13" width="13" alt="" />&nbsp;&nbsp;
', $context['show_who'] ? '<a href="' . $scripturl . '?action=who" style="color:#fff;">' : '', comma_format($context['num_guests']), ' ', $context['num_guests'] == 1 ? $txt['guest'] : $txt['guests'], ', ' . comma_format($context['num_users_online']), ' ', $context['num_users_online'] == 1 ? $txt['user'] : $txt['users'];

// Handle hidden users and buddies.
$bracketList = array();
if ($context['show_buddies'])
$bracketList[] = comma_format($context['num_buddies']) . ' ' . ($context['num_buddies'] == 1 ? $txt['buddy'] : $txt['buddies']);
if (!empty($context['num_spiders']))
$bracketList[] = comma_format($context['num_spiders']) . ' ' . ($context['num_spiders'] == 1 ? $txt['spider'] : $txt['spiders']);
if (!empty($context['num_users_hidden']))
$bracketList[] = comma_format($context['num_users_hidden']) . ' ' . $txt['hidden'];

if (!empty($bracketList))
echo ' (' . implode(', ', $bracketList) . ')';

echo $context['show_who'] ? '</a>' : '', ' </span>
</th>
</tr>
<tr>
    <td class="nohov" style="width:100%;"><p class="stext" style="color:#000;">';

// Assuming there ARE users online... each user in users_online has an id, username, name, group, href, and link.
if (!empty($context['users_online']))
{
echo '
', sprintf($txt['users_active'], $modSettings['lastActive']), ':<br />', implode(', ', $context['list_users_online']);

// Showing membergroups?
if (!empty($settings['show_group_key']) && !empty($context['membergroups']))
echo '
<br />[' . implode(']&nbsp;&nbsp;[', $context['membergroups']) . ']';
}

echo '</p></td>
    </tr>
</tbody>
</table>';

// If they are logged in, but statistical information is off... show a personal message bar.
if ($context['user']['is_logged'] && !$settings['show_stats_index'])
{
echo '<table class="istatistics" style="width:100%;">
<tbody>
    <tr style="width:100%;">
        <td style="width:100%;"><span class="stext">&nbsp;
', $context['allow_pm'] ? '<a href="' . $scripturl . '?action=pm">' : '', '<img class="icon" src="', $settings['images_url'], '/message_sm.gif" alt="', $txt['personal_message'], '" />', $context['allow_pm'] ? '</a>' : '', '
<span><a href="', $scripturl, '?action=pm">', $txt['personal_message'], '</a></span>
</span>
</td></tr><tr>
<tr><td class="window-bg" style="width:100%;">
<span class="smalltext">
', $txt['you_have'], ' ', comma_format($context['user']['messages']), ' ', $context['user']['messages'] == 1 ? $txt['message_lowercase'] : $txt['msg_alert_messages'], '.... ', $txt['click'], ' <a href="', $scripturl, '?action=pm">', $txt['here'], '</a> ', $txt['to_view'], '
</span>
</td>
    </tr>
</tbody>
</table>';
}
// Show information about events, birthdays, and holidays on the calendar.
if ($context['show_calendar'])
{
echo '<table class="istatistics" style="width:100%;">
<tbody>
    <tr class="title-bg" style="width:100%;">
        <th style="width:100%;"><span class="stext">&nbsp;
<img class="icon" src="', $settings['images_url'], '/icons/calendar.gif', '" height="16" width="16" alt="" />&nbsp;&nbsp;<a href="' . $scripturl . '?action=calendar" style="color:#fff;">', $txt['stats_ca'], '</a></span>
</th>
</tr>
<tr>
    <td class="window-bg stext" style="width:100%;">';
// Holidays like "Christmas", "Chanukah", and "We Love [Unknown] Day" :P.
if (!empty($context['calendar_holidays']))
echo '
<span class="holiday stext">', $txt['calendar_prompt'], ' ', implode(', ', $context['calendar_holidays']), '</span><br />';

// People's birthdays. Like mine. And yours, I guess. Kidding.
if (!empty($context['calendar_birthdays']))
{
echo '
<span class="stext">', $context['calendar_only_today'] ? $txt['birthdays'] : $txt['birthdays_upcoming'], '</span> ';
/* Each member in calendar_birthdays has:
id, name (person), age (if they have one set?), is_last. (last in list?), and is_today (birthday is today?) */
foreach ($context['calendar_birthdays'] as $member)
echo '
<a href="', $scripturl, '?action=profile;u=', $member['id'], '">', $member['is_today'] ? '<strong>' : '', $member['name'], $member['is_today'] ? '</strong>' : '', isset($member['age']) ? ' (' . $member['age'] . ')' : '', '</a>', $member['is_last'] ? '<br />' : ', ';
}
// Events like community get-togethers.
if (!empty($context['calendar_events']))
{
echo '
<span class="stext">', $context['calendar_only_today'] ? $txt['events'] : $txt['events_upcoming'], '</span> ';
/* Each event in calendar_events should have:
title, href, is_last, can_edit (are they allowed?), modify_href, and is_today. */
foreach ($context['calendar_events'] as $event)
echo '
', $event['can_edit'] ? '<a href="' . $event['modify_href'] . '" title="' . $txt['calendar_edit'] . '"><img src="' . $settings['images_url'] . '/icons/modify_small.gif" alt="*" /></a> ' : '', $event['href'] == '' ? '' : '<a href="' . $event['href'] . '">', $event['is_today'] ? '<strong>' . $event['title'] . '</strong>' : $event['title'], $event['href'] == '' ? '' : '</a>', $event['is_last'] ? '<br />' : ', ';
}
echo '
    </td>
    </tr>
</tbody>
</table>';
}
        echo'
</div>';
}




// en çok konu mesaj D'ssConnecTed START
function enonline_bolum(){
    global $context, $settings, $txt, $scripturl;

echo '
    <div id="enonline_bolum"  class="tabcontent">
<table style="width:100%;">
    <tbody style="width:100%;">
    <tr style="width:100%;">
            <th class="to50"><span class="stext">&nbsp;',$txt['most_time_online'],'</span> <span class="stext right" style="margin-right:50px;">&nbsp;',$txt['stats_time'],'</span></th>
       
<th class="to50"><span class="stext">&nbsp;',$txt['top_boards'],'</span><span class="stext right">&nbsp;',$txt['stats_m'],'</span></th>
       
        </tr>
    <tr style="width:100%;">
    <td style="width:50%;">
    <table class="istatistics" style="width:100%;">';
$ino=1;
                    foreach ($context['top_time_online'] as $timeonline){
                        $imag ='';
                            echo'
                    <tr style="width:100%;">
                                <td class="to50 hov">&nbsp;<img src="'.$settings['images_url'].'/istatistics/sa'.$ino.'.png" alt="" class="sayi" />
                        <a href="',$timeonline['href'],'" title="',$timeonline['name'],'"><span class="lefttext">',$timeonline['name'],'</span></a>
                    </td>
                        <td class="hov to50"><span class="stext">'.$timeonline['time_online'].'</span></td>
</tr>';

                    $ino ++;
                    }
            echo'
            </table>
        </td>
<td style="width:50%;">
            <table class="istatistics" style="width:100%;">';
$ino=1;
                    foreach ($context['top_boards'] as $tboard){
                        $imag ='';
                            echo'
                    <tr style="width:100%;">
                                <td class="to80 hov">&nbsp;<img src="'.$settings['images_url'].'/istatistics/s'.$ino.'.png" alt="" class="sayi" />
                        <a href="',$tboard['href'],'" title="',$tboard['name'],'"><span class="lefttext">',$tboard['name'],'</span></a>
                    </td>
                        <td class="hov to20"><span class="stext">'.$tboard['num_posts'].'</span></td>
</tr>';

                    $ino ++;
                    }
            echo'
            </table>
</td>
</tr>
    </tbody>
</table>
</div>';

}
// en çok konu mesaj ve gösterim D'ssConnecTed START
function konucevaphit(){
    global $context, $settings, $txt, $scripturl;

echo '
    <div id="konucevaphit"  class="tabcontent">
<table style="width:100%;">
    <tbody style="width:100%;">
    <tr style="width:100%;">
            <th class="to50"><span class="stext">&nbsp;',$txt['top_topics_replies'],'</span> <span class="stext right" style="margin-right:40px;">&nbsp;',$txt['stats_rep'],'</span></th>
       
<th class="to50"><span class="stext">&nbsp;',$txt['top_topics_views'],'</span><span class="stext right" style="margin-right:40px;">&nbsp;',$txt['stats_hit'],'</span></th>
       
        </tr>
    <tr style="width:100%;">
    <td style="width:50%;">
    <table class="istatistics" style="width:100%;">';
$ino=1;
                    foreach ($context['top_topics_replies'] as $treplies){
                        $imag ='';
                            echo'
                    <tr style="width:100%;">
                                <td class="to80 hov">&nbsp;<img src="'.$settings['images_url'].'/istatistics/b'.$ino.'.png" alt="" class="sayi" />
                        <a href="',$treplies['href'],'" title="',$treplies['board']['name'],'"><span class="lefttext">',$treplies['subject'],'</span></a>
                    </td>
                        <td class="hov to20"><span class="stext">'.$treplies['num_replies'].'</span></td>
</tr>';

                    $ino ++;
                    }
            echo'
            </table>
        </td>
<td style="width:50%;">
            <table class="istatistics" style="width:100%;">';
$ino=1;
                    foreach ($context['top_topics_views'] as $tviews){
                        $imag ='';
                            echo'
                    <tr style="width:100%;">
                                <td class="to80 hov">&nbsp;<img src="'.$settings['images_url'].'/istatistics/si'.$ino.'.png" alt="" class="sayi" />
                        <a href="',$tviews['href'],'" title="',$tviews['board']['name'],'"><span class="lefttext">',$tviews['subject'],'</span></a>
                    </td>
                        <td class="hov to20"><span class="stext">'.$tviews['num_views'].'</span></td>
</tr>';

                    $ino ++;
                    }
            echo'
            </table>
</td>
</tr>
    </tbody>
</table>
</div>';

}
// en çok konu-mesaj D'ssConnecTed START
function konumesaj(){
    global $context, $settings, $txt, $scripturl;
echo '
    <div id="konumesaj"  class="tabcontent">
<table style="width:100%;">
    <tbody style="width:100%;">
    <tr style="width:100%;">
            <th class="to50"><span class="stext">&nbsp;',$txt['top_starters'],'</span> <span class="stext right" style="margin-right:30px;">&nbsp;',$txt['stats_k'],'</span></th>
       
<th class="to50"><span class="stext">&nbsp;',$txt['top_posters'],'</span><span class="stext right" style="margin-right:30px;">&nbsp;',$txt['stats_m'],'</span></th>
       
        </tr>
    <tr style="width:100%;">
    <td style="width:50%;">
    <table class="istatistics" style="width:100%;">';
$ino=1;
                    foreach ($context['top_starters'] as $konua){
                        $imag ='';
                            echo'
                    <tr style="width:100%;">
                                <td class="to80 hov">&nbsp;<img src="'.$settings['images_url'].'/istatistics/ma'.$ino.'.png" alt="" class="sayi" />
                        <a href="',$konua['href'],'" title="',$konua['name'],'"><span class="lefttext">',$konua['name'],'</span></a>
                    </td>
                        <td class="hov to20"><span class="stext">'.$konua['num_topics'].'</span></td>
</tr>';

                    $ino ++;
                    }
            echo'
            </table>
        </td>
<td style="width:50%;">
            <table class="istatistics" style="width:100%;">';
$ino=1;
                    foreach ($context['top_posters'] as $posters){
                        $imag ='';
                            echo'
                    <tr style="width:100%;">
                                <td class="to80 hov">&nbsp;<img src="'.$settings['images_url'].'/istatistics/p'.$ino.'.png" alt="" class="sayi" />
                        <a href="',$posters['href'],'" title="',$posters['name'],'"><span class="lefttext">',$posters['name'],'</span></a>
                    </td>
                        <td class="hov to20"><span class="stext">'.$posters['num_posts'].'</span></td>
</tr>';

                    $ino ++;
                    }
            echo'
            </table>
</td>
</tr>
    </tbody>
</table>
</div>';

}

Offline D'ssConneTed

  • Semi-Newbie
  • *
  • Posts: 21
  • Gender: Male
  • www.BenimProjem.net
Re: İstatistikler top 10. manuel mod. 2.0.15
« Reply #3 on: December 27, 2017, 07:10:28 PM »
Modifications.turkish.php

Bul:
?>

Ütüne ekle:
Code: [Select]
$txt['most_online'] = 'En çok çevrimiçi';

$txt['stats_m'] = 'Mesaj';
$txt['stats_g'] = 'Gönderen';
$txt['stats_v'] = 'Okuma';
$txt['stats_r'] = 'Cevap';
$txt['stats_d'] = 'Tarih';
$txt['stats_fi'] = 'İlk Mesaja Git';
$txt['stats_ist'] = 'Forum İstatistikleri';
$txt['stats_lp'] = 'Son İletiler';
$txt['stats_rw'] = 'Konu Açan - Mesaj Atan';
$txt['stats_rv'] = 'Konu Cevap - Konu Hit';
$txt['stats_ob'] = 'Çevrimiçi - Bölüm';
$txt['stats_on'] = 'Şuan Online Onlanlar';
$txt['stats_ca'] = 'Takvim';
$txt['stats_time'] = 'Süre';
$txt['stats_rep'] = 'Yanıt';
$txt['stats_hit'] = 'Hit';
$txt['stats_k'] = 'Konu';


$txt['top_posters'] = 'En çok Mesaj Atanlar';
$txt['top_boards'] = 'En İyi 10 Bölüm';

$txt['stats_new_topics'] = 'Yeni Konular';
$txt['stats_new_posts'] = 'Yeni İletiler';
$txt['stats_new_members'] = 'Yeni Üyeler';

$txt['top_topics_replies'] = 'En İyi 10 Konu (Yanıtlara göre)';
$txt['top_topics_views'] = 'En İyi 10 Konu (Gösterime göre)';

$txt['smf_stats_14'] = 'En çok çevrimiçi Üye Sayısı';
$txt['top_starters'] = 'En çok Konu Açanlar';
$txt['most_time_online'] = 'En çok çevrimiçi Olanlar';
$txt['best_karma'] = 'En İyi Karma';
$txt['worst_karma'] = 'En Kötü Karma';


$txt['average_members'] = 'Ortalama günlük kayıt';
$txt['average_posts'] = 'Günlük ortalama ileti sayısı';
$txt['average_topics'] = 'Günlük ortalama konu sayısı';
$txt['average_online'] = 'Ortalama günlük çevrimiçi üye';
$txt['users_online'] = 'Çevrimiçi Kullanıcılar';
$txt['gender_ratio'] = 'Erkek Bayan oranı';
$txt['users_online_today'] = 'Bugün çeviriçi Olanlar';
$txt['num_hits'] = 'Toplam sayfa gösterimi';
$txt['average_hits'] = 'Ortalama günlük sayfa gösterimi';



İlk mesajda Ekteki rar daki istatistics klasörünü images klasörüne atınız.
istatistics.css  yide css klasörüne atınız.
« Last Edit: December 27, 2017, 07:22:08 PM by D'ssConneTed »