• Merhaba Sitemizi Smf den Xenforoya taşıdık bundan dolayı şifrenizi güncellemeniz gerek verdiğimiz rahatsızlıktan dolayı özür dileriz webtiryaki team.

Smf yeni istatislik top on

orhan

Moderator
Katılım
5 Ara 2018
Mesajlar
443
Puanları
28
Konum
Almanya
Web sitesi
webtiryaki.com
istatislik.png


Uzun zamandir düşünüyordum yapmayi zira yapilan istatislik modlarininin hic biri işe yaramas kimi formu sorguyla dolduruyor kimi db sorgusuyla formu kasiyor kisacasi bu mod smf kodlamasiyla bire bir entegredir
modu geliştire bilirsiniz ben başlangic,ini yapiyorum

CANLI DEMO

./Sources/Subs-Recent.php

bul

Kod:
IFNULL(mem.real_name, m.poster_name) AS poster_name,

degis

Kod:
IFNULL(mem.real_name, m.poster_name) AS poster_name, t.id_board, b.name AS board_name, t.num_views, t.num_replies,

bul

Kod:
'time' => timeformat($row['poster_time']),

altina ekle

Kod:
'views' => comma_format($row['num_views']),
        'replies' => comma_format($row['num_replies']),

./Themes/default/BoardIndex.template.php

bul (2 tane var uste ciksin derseniz ustu editleyin yoksa alti)

Kod:
// 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>';
degis

Kod:
// Show lots of posts.
      elseif (!empty($context['latest_posts']))
      {
        echo '
                              <table cellpadding="0" cellspacing="1" width="100%" border="0">
              <tr>
              <td class="catbg2" style="text-align:left;" colspan="2">',$txt['recent_title'],'</td>
              <td class="catbg2" style="text-align:center;">',$txt['recent_replies'],'</td>
              <td class="catbg2" style="text-align:center;">',$txt['recent_views'],'</td>
              <td class="catbg2" style="text-align:center;">',$txt['recent_boardname'],'</td>
              <td class="catbg2" style="text-align:center;">',$txt['recent_by'],'</td>
              <td class="catbg2" style="text-align:right;">',$txt['recent_time'],'</td>
            </tr>';


        /* 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. */
                  $cnt = 0;
        foreach ($context['latest_posts'] as $post){
        $cnt++;
        $class = ($cnt % 2) ? 'windowbg' : 'windowbg2';
        
        echo '
                    <tr>
                    <td></td>
                        <td class="', $class, '" title="', $post['preview'] ,'">', $post['link'], '</td>
                        <td class="', $class, '" style="text-align:center;">', $post['replies'], '</td>
                        <td class="', $class, '" style="text-align:center;">', $post['views'], '</td>                        
                        <td class="', $class, '" style="text-align:center;">',$post['board']['link'], '</td>
                        <td class="', $class, '" style="text-align:center;">',$post['poster']['link'], '</td>
                        <td class="', $class, '" style="text-align:right;" nowrap="nowrap">', $post['time'], '</td>

                    </tr>';
      }

        echo '
            </table>';

./Themes/default/languages/Modifications.english.php

bul
Kod:
?>

Öncesine Ekle:

Kod:
$txt['recent_title'] = 'Subject';
$txt['recent_views'] = 'Views';
$txt['recent_replies'] = 'Replies';
$txt['recent_boardname'] = 'Board name';
$txt['recent_by'] = 'Author';
$txt['recent_time'] = 'Date';

kulandiginiz dil dosyasina

Kod:
$txt['recent_title'] = 'Son Konular';
$txt['recent_views'] = 'Gösterim';
$txt['recent_replies'] = 'Yanit';
$txt['recent_boardname'] = 'Bölüm Adi';
$txt['recent_by'] = 'Gönderen';
$txt['recent_time'] = 'Tarih';

ustte cikmasini isteyen

bul sil

Kod:
// 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'], ')

 </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>';
 }

bul

Kod:
echo '
  <div id="boardindex_table">
      <table class="table_list">';

ustune ekle

Kod:
// This is the "Recent Posts" bar.
 if (!empty($settings['number_recent_posts']))
 {
 echo '
 <div class="cat_bar">
 <h3 class="catbg">
 <span class="ie6_header floatleft">
 <a href="', $scripturl, '?action=recent"><i class="icon-edit-sign icon-large"></i></a>
 ', $txt['recent_posts'], '
 </span>
 </h3>
 </div>
 <div class="hslice" id="recent_posts_content">
 <div class="entry-title" style="display: none;">', $context['forum_name_html_safe'], ' - ', $txt['RecentTopicsOnBoardIndex_recenttopics'], '</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'], ')

 </p>';
 }
 // Show lots of posts.
 elseif (!empty($context['latest_posts']))
 {
 echo '
 <table width="100%" cellpadding="0" cellspacing="2" style="font-size:11px;border:1px solid #ccc;padding:1px;">
          <tr>
              <td class="catbg2" style="text-align:left;" colspan="2">',$txt['recent_title'],'</td>
              <td class="catbg2" style="text-align:center;">',$txt['recent_replies'],'</td>
              <td class="catbg2" style="text-align:center;">',$txt['recent_views'],'</td>
              <td class="catbg2" style="text-align:center;">',$txt['recent_boardname'],'</td>
              <td class="catbg2" style="text-align:center;">',$txt['recent_by'],'</td>
              <td class="catbg2" style="text-align:right;">',$txt['recent_time'],'</td>
            </tr>';


 /* 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. */
 $cnt = 0;
 foreach ($context['latest_posts'] as $post){
        $cnt++;
        $class = ($cnt % 2) ? 'windowbg' : 'windowbg2';
        
        echo '
 <tr>
 <td></td>
 <td class="', $class, '" title="', $post['preview'] ,'">', $post['link'], '</td>
 <td class="', $class, '" style="text-align:center;">', $post['replies'], '</td>
 <td class="', $class, '" style="text-align:center;">', $post['views'], '</td> 
 <td class="', $class, '" style="text-align:center;">',$post['board']['link'], '</td>
 <td class="', $class, '" style="text-align:center;">',$post['poster']['link'], '</td>
 <td class="', $class, '" style="text-align:right;" nowrap="nowrap">', $post['time'], '</td>

 </tr>';
      }

 echo '
 </table>
 
';
 
 }
 echo '
 </div>';
 }
 
Katılım
15 Ara 2018
Mesajlar
146
Puanları
18
Web sitesi
www.replikacep.com
bu paylaştıgınız 2.0  içinmi  2.1 ise  kodlar degişmiş  kodların çogu 2.1 son halinde yok

paylaştıklarınızı denedim calışmadı malesef sshot-1.png

resimdeki gibi bekliyordum ben
 
Üst Alt