Yazının devamıdır......
Temanız /BoardIndex.template.php
BUL :
?>
ÜSTÜNE EKLE:
// İstatistik Fonctions D'ssConnecTed START
function istatistics(){
global $context, $settings, $txt, $scripturl;
echo'
<div id="slidedeck_frame">
<dl class="slidedeck">
<dt>'.$txt['smesaj_soniletiler'].'</dt>
<dd>',sonileti(),'</dd>
<dt>'.$txt['smesaj_okunankonu'].' - '.$txt['smesaj_yorumlanankonu'].'</dt>
<dd>',okunan(),' ',yorum(),'</dd>
<dt>'.$txt['smesaj_encokmesaj'].' - '.$txt['smesaj_encokkonu'].'</dt>
<dd>',mesaj(),' ',konu(),'</dd>
<dt>'.$txt['smesaj_encokkarma'].' - '.$txt['smesaj_encokonline'].'</dt>
<dd>',karma(),' ',eonline(),'</dd>
<dt>'.$txt['smesaj_siteistatistik'].' - '.$txt['smesaj_yeniuyeler'].'</dt>
<dd>',istatistik(),' ',yeniuye(),'</dd>
<dt>'.$txt['smesaj_cevrimiciuye'].'</dt>
<dd>',onlineuyeler(),'</dd>
</dl>
</div>
<script type="text/javascript"><!-- // --><![CDATA[
$(\'.slidedeck\').slidedeck();
// ]]></script>';
// Son 10 istatistik D'ssConnecTed END
}
function sonileti(){
global $context, $settings, $txt, $scripturl;
$ino = 1;
echo'
<div class="top10div">
<ul class="top10ul">
<li class="top10li30 titlebg"><span class="subject">',$txt['bos'],'',$txt['smesaj_mesaj'],'</span></li>
<li class="top10li25 titlebg"><span class="subject">',$txt['bos'],'',$txt['smesaj_gonderen'],'</span></li>
<li class="top10li10 titlebg"><span class="subject">',$txt['bos'],'',$txt['smesaj_hit'],'</span></li>
<li class="top10li10 titlebg"><span class="subject">',$txt['bos'],'',$txt['smesaj_cevap'],'</span></li>
<li class="top10li25 titlebg"><span class="subject">',$txt['bos'],'',$txt['smesaj_tarih'],'</span></li>';
// <li class="top10li25 titlebg"><span class="subject">',$txt['bos'],'',$txt['smesaj_konu'],'</span></li>
foreach ($context['latest_posts'] as $post){
$imag ='<img src="'.$settings['images_url'].'/top10/top'.$ino.'.gif" alt="" />';
$span ='<span class="smalltext">';
echo '
<li class="top10li30"> '.$imag.' '.$span.'<a href="',$post['href'],'" title="',$post['preview'],'">',$post['short_subject'],'</a></span></li>
<li class="top10li25"> '.$imag.' '.$span.'',$post['poster']['link'],'</span></li>
<li class="top10li10"> '.$imag.' '.$span.'',$post['hit'],'</span></li>
<li class="top10li10"> '.$imag.' '.$span.'',$post['replies'],'</span></li>
<li class="top10li25"> '.$imag.' '.$span.'',$post['time'],'</span></li>';
// <li class="top10li25"> '.$imag.' '.$span.'',$post['board']['link'],'</span></li>
$ino++;
}
echo '
</ul>
</div>';
}
function okunan(){
global $context, $settings, $txt, $scripturl;
$ino=1;
echo'
<div class="top10uldiv">
<ul class="top10ul">
<li class="titlebg top10li_80"><span class="smalltext"> ',$txt['smesaj_encok_okunan'],'</span></li>
<li class="titlebg top10li_20"><span class="smalltext">',$txt['smesaj_okunan_hit'],' </span></li>
</ul>
<ul class="top10ul">';
foreach ($context['top_topics_views'] as $topic){
$imag ='<img src="'.$settings['images_url'].'/top10/top'.$ino.'.gif" alt="" />';
$span ='<span class="smalltext">';
echo '
<li class="top10li_80">'.$imag.''.$span.' ', $topic['link'], '</span></li>
<li class="top10li_20">'.$imag.''.$span.' ', $topic['num_views'], '</span></li>';
$ino++;
}
echo'</ul>
</div>';
}
function yorum(){
global $context, $settings, $txt, $scripturl;
$ino=1;
echo'
<div class="top10uldiv">
<ul class="top10ul">
<li class="titlebg top10li_80"><span class="smalltext"> ',$txt['smesaj_encok_yorum'],'</span></li>
<li class="titlebg top10li_20"><span class="smalltext">',$txt['smesaj_yorum_hit'],' </span></li>
</ul>
<ul class="top10ul">';
foreach ($context['top_topics_replies'] as $topic){
$imag ='<img src="'.$settings['images_url'].'/top10/top'.$ino.'.gif" alt="" />';
$span ='<span class="smalltext">';
echo '
<li class="top10li_80"> '.$imag.''.$span.' ', $topic['link'], '</span></li>
<li class="top10li_20"> '.$imag.''.$span.' ', $topic['num_replies'], '</span></li>';
$ino++;
}
echo '
</ul>
</div>';
}
function mesaj(){
global $context, $settings, $txt, $scripturl;
$ino=1;
echo'
<div class="top10uldiv">
<ul class="top10ul">
<li class="titlebg top10li_80"><span class="smalltext"> '.$txt['smesaj_encok_mesaj'].'</span></li>
<li class="titlebg top10li_20"><span class="smalltext"> ',$txt['smesaj_mesaj_hit'],'</span></li>
</ul>
<ul class="top10ul">';
foreach ($context['top_posters'] as $poster){
$imag ='<img src="'.$settings['images_url'].'/top10/top'.$ino.'.gif" alt="" />';
$span ='<span class="smalltext">';
echo'
<li class="top10li_80">'.$imag.''.$span.' ', $poster['link'], '</span></li>
<li class="top10li_20">'.$imag.''.$span.' ', $poster['num_posts'], '</span></li>';
$ino++;
}
echo'
</ul>
</div>';
}
function konu(){
global $context, $settings, $txt, $scripturl;
$ino=1;
echo'
<div class="top10uldiv">
<ul class="top10ul">
<li class="titlebg top10li_80"><span class="smalltext"> '.$txt['smesaj_encok_konu'].'</span></li>
<li class="titlebg top10li_20"><span class="smalltext"> ',$txt['smesaj_konu_hit'],'</span></li>
</ul>
<ul class="top10ul">';
foreach ($context['top_starters'] as $poster){
$imag ='<img src="'.$settings['images_url'].'/top10/top'.$ino.'.gif" alt="" />';
$span ='<span class="smalltext">';
echo '
<li class="top10li_80">'.$imag.''.$span.' ', $poster['link'], '</span></li>
<li class="top10li_20">'.$imag.''.$span.' ',$poster['num_topics'], '</span></li>';
$ino++;
}
echo '
</ul>
</div>';
}
function karma(){
global $context, $settings, $txt, $scripturl;
$ino=1;
echo'
<div class="top10uldiv">
<ul class="top10ul">
<li class="titlebg top10li_80"><span class="smalltext"> '.$txt['smesaj_encok_karma'].'</span></li>
<li class="titlebg top10li_20"><span class="smalltext"> ',$txt['smesaj_karma_hit'],'</span></li>
</ul>
<ul class="top10ul">';
foreach ($context['karma'] as $mem){
$imag ='<img src="'.$settings['images_url'].'/top10/top'.$ino.'.gif" alt="" />';
$span ='<span class="smalltext">';
echo '
<li class="top10li_80">'.$imag.''.$span.' ',$mem['link'], '</span></li>
<li class="top10li_20">'.$imag.''.$span.' ',$mem['karma'], '</span></li>';
$ino++;
}
echo '
</ul>
</div>';
}
function eonline(){
global $context, $settings, $txt, $scripturl;
$ino=1;
echo'
<div class="top10uldiv">
<ul class="top10ul">
<li class="titlebg top10li_60"><span class="smalltext"> '.$txt['smesaj_online_hit'].'</span></li>
<li class="titlebg top10li_40"><span class="smalltext"> '.$txt['smesaj_encok_online'].'</span></li>
</ul>
<ul class="top10ul">';
foreach ($context['top_time_online'] as $topic){
$imag ='<img src="'.$settings['images_url'].'/top10/top'.$ino.'.gif" alt="" />';
$span ='<span class="smalltext">';
echo '
<li class="top10li_60">'.$imag.''.$span.' ', $topic['time_online'], '</span></li>
<li class="top10li_40">'.$imag.''.$span.' ', $topic['link'], '</span></li>';
$ino++;
}
echo'
</ul>
</div>';
}
function yeniuye(){
global $context, $settings, $txt, $scripturl;
$ino=1;
echo'
<div class="top10uldiv">
<ul class="top10ul">
<li class="titlebg top10li_80"><span class="smalltext"> '.$txt['smesaj_yeni_uye'].'</span></li>
<li class="titlebg top10li_20"><span class="smalltext"> '.$txt['smesaj_mesaj'].'</span></li>
</ul><ul class="top10ul">';
foreach ($context['new_members'] as $new_member){
$imag ='<img src="'.$settings['images_url'].'/top10/top'.$ino.'.gif" alt="" />';
$span ='<span class="smalltext">';
echo '
<li class="top10li_80">'.$imag.''.$span.' ', $new_member['link'], '</span></li>
<li class="top10li_20">'.$imag.''.$span.' ', $new_member['num_posts'], '</span></li>';
$ino++;
}
echo '
</ul>
</div>';
}
function istatistik(){
global $context, $settings,$modSettings, $txt, $scripturl, $db_prefix, $db_connection;
// Show istatistical information... D'issConnecTed
$sorgu = "SELECT * FROM {$db_prefix}log_activity ORDER BY date DESC Limit 1";
$bugunuye = @mysql_query($sorgu, $db_connection);
$context['sonuyesayisi'] = mysql_fetch_array($bugunuye);
echo'
<div class="top10uldiv">
<ul class="top10ul">
<li class="titlebg istatistik"><a href="', $scripturl, '?action=stats"><span class="smalltext" style="font-weight: bold;"> ', $txt['forum_stats'], '</span></a></li>
<li class="top10li_80"><img src="', $settings['images_url'], '/top10/top1.gif" alt="" /><span class="smalltext"> ', $txt['smesaj_toplamacilankonu'], '</span></li>
<li class="top10li_20"><img src="', $settings['images_url'], '/top10/top1.gif" alt="" /><span class="smalltext"> ', $context['common_stats']['total_topics'], '</span></li>
<li class="top10li_80"><img src="', $settings['images_url'], '/top10/top2.gif" alt="" /><span class="smalltext"> ', $txt['smesaj_toplamayorumsayisi'], '</span></li>
<li class="top10li_20"><img src="', $settings['images_url'], '/top10/top2.gif" alt="" /><span class="smalltext"> ', $context['common_stats']['total_posts'], '</span></li>
<li class="top10li_80"><img src="', $settings['images_url'], '/top10/top3.gif" alt="" /><span class="smalltext"> ', $txt['smesaj_toplamuyesayisi'], '</span></li>
<li class="top10li_20"><img src="', $settings['images_url'], '/top10/top3.gif" alt="" /><span class="smalltext"> ', $context['common_stats']['total_members'], '</span></li>
<li class="top10li_80"><img src="', $settings['images_url'], '/top10/top4.gif" alt="" /><span class="smalltext"> ', $txt['smesaj_bugunkonusayisi'], '</span></li>
<li class="top10li_20"><img src="', $settings['images_url'], '/top10/top4.gif" alt="" /><span class="smalltext"> ', $context['sonuyesayisi']['topics'], '</span></li>
<li class="top10li_80"><img src="', $settings['images_url'], '/top10/top5.gif" alt="" /><span class="smalltext"> ', $txt['smesaj_bugunmesajsayisi'], '</span></li>
<li class="top10li_20"><img src="', $settings['images_url'], '/top10/top5.gif" alt="" /><span class="smalltext"> ', $context['sonuyesayisi']['posts'], '</span></li>
<li class="top10li_80"><img src="', $settings['images_url'], '/top10/top6.gif" alt="" /><span class="smalltext"> ', $txt['smesaj_bugunkatilansayisi'], '</span></li>
<li class="top10li_20"><img src="', $settings['images_url'], '/top10/top6.gif" alt="" /><span class="smalltext"> ', $context['sonuyesayisi']['registers'] , '</span></li>
<li class="top10li_80"><img src="', $settings['images_url'], '/top10/top7.gif" alt="" /><span class="smalltext"> ', $txt['smesaj_misafirsayisi'], '</span></li>
<li class="top10li_20"><img src="', $settings['images_url'], '/top10/top7.gif" alt="" /><span class="smalltext"> ', $context['num_guests'],'</span></li>
<li class="top10li_80"><img src="', $settings['images_url'], '/top10/top8.gif" alt="" /><span class="smalltext"> ', $txt['smesaj_onlineuyesayisi'], '</span></li>
<li class="top10li_20"><img src="', $settings['images_url'], '/top10/top8.gif" alt="" /><span class="smalltext"> ', $context['num_users_online'],'</span></li>
<li class="top10li_80"><img src="', $settings['images_url'], '/top10/top9.gif" alt="" /><span class="smalltext"> ', $txt['most_online_today'], ':</li>
<li class="top10li_20"><img src="', $settings['images_url'], '/top10/top9.gif" alt="" /><span class="smalltext"> ', comma_format($modSettings['mostOnlineToday']), '</span></li>
<li class="top10li_80"><img src="', $settings['images_url'], '/top10/top10.gif" alt="" /><span class="smalltext"> ', $txt['smesaj_encok'], ' ', timeformat($modSettings['mostDate']), ':</li>
<li class="top10li_20"><img src="', $settings['images_url'], '/top10/top10.gif" alt="" /><span class="smalltext"> ', comma_format($modSettings['mostOnline']), '</span></li>
</ul>
</div>';
// Show statistical style information... D'issConnecTed
}
function onlineuyeler(){
global $context, $settings, $txt, $modSettings, $scripturl;
echo'
<div style="float:left;width:100%;">';
// Show information about events, birthdays, and holidays on the calendar.
if ($context['show_calendar'])
{
echo '
<ul class="top10ul">
<li class="titlebg onlinetitle">
<span class="smalltext"> <a href="', $scripturl, '?action=calendar' . '">', $context['calendar_only_today'] ? $txt['calendar_today'] : $txt['calendar_upcoming'], '</a></span>
</li>
<li class="takvim">
<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>
</li>
</ul>';
}
echo'
<ul class="top10ul">
<li class="titlebg onlinetitle">
<span class="smalltext">
', $context['show_who'] ? '<a href="' . $scripturl . '?action=who' . '"> ' : '', '', $context['show_who'] ? '</a>' : '', '
', $txt['online_users'], '
</span>
</li>
<li class="onlineuye">';
// "Users online" - in order of activity.
echo '
<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('] [', $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>';
echo'
</li>
</ul>
</div>';
// Son 10 D'ssConnecTed END
}