Wondering if this will always be free? See why free is better.
$context['page_title'] = sprintf($txt['forum_index'], $context['forum_name']);}
$context['page_title'] = sprintf($txt['forum_index'], $context['forum_name']); smfciyiz_biz_full_top_10();}function smfciyiz_biz_full_top_10(){ global $context, $smcFunc, $txt, $db_prefix, $scripturl, $modSettings, $user_info, $settings, $sourcedir; //en çok konu açan //en çok konu açan bitişi //en çok cevaplanan konular// 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']); }//en çok cevaplanana konular bitiş// 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']); } //mesaj sayısı üyeler // 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(); $context['MemberColor_ID_MEMBER'] = array(); 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 (!empty($modSettings['MemberColorStats']) && !empty($row_members['id_member'])) $context['MemberColor_ID_MEMBER'][$row_members['id_member']] = $row_members['id_member']; } $smcFunc['db_free_result']($members_result); if (!empty($modSettings['latestMember']) && !empty($modSettings['MemberColorLatestMember'])) $context['MemberColor_ID_MEMBER'][$modSettings['latestMember']] = $modSettings['latestMember']; //Yeah baby give me some colors =). if (!empty($context['MemberColor_ID_MEMBER'])) { //Now Load the Missing global global $user_profile; loadMemberData($context['MemberColor_ID_MEMBER']); $cmemcolid = NULL; if (!empty($modSettings['MemberColorStats'])) { // First the Top Posters =) 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['profile_of'] . ' ' . $profile['real_name'] . '"><span style="color:'.(!empty($profile['member_group_color']) ? $profile['member_group_color'] : $profile['post_group_color']).';">' . $profile['real_name'] . '</span></a>'; } // First the Top Starter =) 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['profile_of'] . ' ' . $profile['real_name'] . '"><span style="color:'.(!empty($profile['member_group_color']) ? $profile['member_group_color'] : $profile['post_group_color']).';">' . $profile['real_name'] . '</span></a>'; } // First the Top Onliner =) foreach($context['top_time_online'] as $key => $value) { $cmemcolid = $context['top_time_online'][$key]['id']; $profile = &$user_profile[$cmemcolid]; if(!empty($profile['member_group_color']) || !empty($profile['post_group_color'])) $context['top_time_online'][$key]['link'] = '<a href="' . $scripturl . '?action=profile;u=' . $profile['id_member'] . '" title="' . $txt['profile_of'] . ' ' . $profile['real_name'] . '"><span style="color:'.(!empty($profile['member_group_color']) ? $profile['member_group_color'] : $profile['post_group_color']).';">' . $profile['real_name'] . '</span></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['profile_of'] . ' ' . $profile['real_name'] . '"><span style="color:'.(!empty($profile['member_group_color']) ? $profile['member_group_color'] : $profile['post_group_color']).';">' . $profile['real_name'] . '</span></a>'; } } //mesaj sayısı bitiş//en çok görüntülenen konular bitiş // Newest members top 10 $members_result = $smcFunc['db_query']('', ' SELECT id_member, real_name, posts FROM {db_prefix}members ORDER BY id_member DESC LIMIT 10', array( ) ); $context['new_members'] = array(); //www.smfciyiz.biz while ($row_members = $smcFunc['db_fetch_assoc']($members_result)) { $context['new_members'][] = array( 'name' => $row_members['real_name'], 'id' => $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>' ); } $smcFunc['db_free_result']($members_result); // Retrieve the latests posts if the theme settings require it. if (isset($settings['number_recent_posts']) && $settings['number_recent_posts'] > 1) { $latestPostOptions = array( 'number_posts' => $settings['number_recent_posts'], ); $context['latest_posts'] = cache_quick_get('boardindex-latest_posts:' . md5($user_info['query_wanna_see_board'] . $user_info['language']), 'Subs-Recent.php', 'cache_getLastPosts', array($latestPostOptions)); }}
function template_info_center(){ global $context, $settings, $options, $txt, $scripturl, $modSettings;
// TopXStats by_yağız echo ' <table border="0" width="100%" cellspacing="1" cellpadding="2" class="bordercolor"> <tr> <td width="100%" colspan="4" class="catbg" height="24">Istatistikler - Top 10</td> </tr> <tr class="titlebg"> <td width=25%><span class="smalltext">En çok Mesaj Gönderenler</span></td> <td width=25%><span class="smalltext">Yeni üyeler</span></td> <td width=50%><span class="smalltext">Son Mesajlar</span></td> </tr> <tr class="windowbg2"> <td width="25%" valign="top"> <table width="100%"> <tr> <td class="windowbg2"><b><span class="smalltext">Üye:</span></b></td> <td class="windowbg2" align="right"><b><span class="smalltext">Mesaj:</span></b></td> </tr>'; foreach ($context['top_posters'] as $poster) { echo ' <tr> <td class="windowbg2" ><span class="smalltext">', $poster['link'], '</span></td> <td class="windowbg2" align="right"><span class="smalltext">', $poster['num_posts'], '</span></td> </tr>'; } echo ' </table> </td> <td width="20%" valign="top"> <table width="100%"> <tr> <td class="windowbg2"><b><span class="smalltext">Üye:</span></b></td> </tr>'; foreach ($context['new_members'] as $poster) { echo ' <tr> <td class="windowbg2" valign="top"><span class="smalltext">',$poster['link'], '</span></td> </tr>'; } echo ' </table> </td> <td width="50%" valign="top">'; // Show lots of posts. if (!empty($context['latest_posts'])) { echo ' <table width="100%"> <tr class="windowbg2"> <td width="42%"><b><span class="smalltext">Konu:</span></b></td> <td width="22%"><b><span class="smalltext">Gönderen:</span></b></td> <td width="36%"><b><span class="smalltext">Tarih:</span></b></td> </tr>'; foreach ($context['latest_posts'] as $poster) echo ' <tr> <td class="windowbg2" valign="top" ><span class="smalltext"><a href="',$poster['href'],'">', $poster['short_subject'], '</a></span></td> <td class="windowbg2" valign="top"><span class="smalltext">', $poster['poster']['link'], '</span></td> <td class="windowbg2" valign="top"><span class="smalltext">', $poster['time'], '</span></td> </tr>'; echo ' </table>'; } echo ' </td> </tr>';//popüleriteecho' <tr> <td class="titlebg" colspan="2" width="50%"><span class="smalltext"><b>Top10 Konu (ileti)</b></span></td> <td class="titlebg" width="50%"><span class="smalltext"><b>Top10 Konu (gösterim)</b></span></td> </tr><tr> <td class="windowbg2" colspan="2" width="50%" valign="top"> <table border="0" cellpadding="1" cellspacing="0" width="100%">'; foreach ($context['top_topics_replies'] as $topic) echo ' <tr> <td width="60%" valign="top"><span class="smalltext">', $topic['link'], '</span></td> <td width="20%" align="left" valign="top"><span class="smalltext">', $topic['num_replies'] > 0 ? '<img src="' . $settings['images_url'] . '/bar.gif" width="' . $topic['post_percent'] . '" height="15" alt="" />' : ' ', '</span></td> <td width="20%" align="right" valign="top"><span class="smalltext">', $topic['num_replies'], '</span></td> </tr>'; echo ' </table> </td> <td class="windowbg2" width="50%" valign="top"> <table border="0" cellpadding="1" cellspacing="0" width="100%">'; foreach ($context['top_topics_views'] as $topic) echo ' <tr> <td width="60%" valign="top"><span class="smalltext">', $topic['link'], '</span></td> <td width="20%" align="left" valign="top"><span class="smalltext">', $topic['num_views'] > 0 ? '<img src="' . $settings['images_url'] . '/bar.gif" width="' . $topic['post_percent'] . '" height="15" alt="" />' : ' ', '</span></td> <td width="20%" align="right" valign="top"><span class="smalltext">', $topic['num_views'], '</span></td> </tr>'; echo ' </table> </td> </tr> </table>'; // Info center collapse object. echo ' <script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[ // And create the info center object. var infoHeader = new smfToggle("upshrinkIC", ', empty($options['collapse_header_ic']) ? 'false' : 'true', '); infoHeader.useCookie(', $context['user']['is_guest'] ? 1 : 0, '); infoHeader.setOptions("collapse_header_ic", "', $context['session_id'], '"); infoHeader.addToggleImage("upshrink_ic", "/collapse.gif", "/expand.gif"); infoHeader.addTogglePanel("upshrinkHeaderIC"); // ]]></script>'; // Here's where the "Info Center" starts... echo ' <div class="tborder clearfix" id="infocenterframe"> <h3 class="catbg headerpadding"> <a href="#" onclick="infoHeader.toggle(); return false;"><img id="upshrink_ic" src="', $settings['images_url'], '/', empty($options['collapse_header_ic']) ? 'collapse.gif' : 'expand.gif', '" alt="*" title="', $txt['upshrink_description'], '" style="margin-right: 2ex;" align="right" /></a> ', sprintf($txt['info_center_title'], $context['forum_name']), ' </h3> <div id="upshrinkHeaderIC"', empty($options['collapse_header_ic']) ? '' : ' style="display: none;"', '>'; // This is the "Recent Posts" bar. if (!empty($settings['number_recent_posts'])) { echo ' <div class="infocenter_section"> <h4 class="headerpadding titlebg">', $txt['recent_posts'], '</h4> <div class="windowbg"> <p class="section"> <a href="', $scripturl, '?action=recent"><img src="', $settings['images_url'], '/post/xx.gif" alt="', $txt['recent_posts'], '" /></a> </p> <div class="windowbg2 sectionbody 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="smalltext"> ', $txt['recent_view'], ' "', $context['latest_post']['link'], '" ', $txt['recent_updated'], ' (', $context['latest_post']['time'], ')<br /> </p>'; } // Show lots of posts. elseif (!empty($context['latest_posts'])) { echo ' <dl id="infocenter_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> </div> </div>'; }
Arama yapın cevabı var.
//Güncel...
Quote from: AS21 on August 10, 2011, 02:56:50 PM//Güncel...