Smf detaylı recent post düzenleme istek

Başlatan herme, 12 Mar 2018 00:09

« önceki - sonraki »

0 Üyeler ve 1 Ziyaretçi konuyu incelemekte.

*

  1. 38

  2. 14

  3. 7

Merhaba arkadaşlar smf kendi sitesinde bir mod buldum bu modu 2.0.15 kurmak istediğimde hata veriyor.Websitem için gerekli bir mod yardımcı olursanız sevinirim.

Mod site: https://custom.simplemachines.org/mods/index.php?mod=1069

*

  1. 150

  2. 40

  3. 175
link teki 1 serisi icin

bunu deneyin.

./Sources/Subs-Recent.php

bul

IFNULL(mem.real_name, m.poster_name) AS poster_name,
degis

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

'time' => timeformat($row['poster_time']),
altina ekle

'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)

// 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

// 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
?>
Öncesine Ekle:

$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

$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

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

bul

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

ustune ekle

// 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'], ')<br />
</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>
<br/>';

}
echo '
</div>';
}

*

  1. 38

  2. 14

  3. 7
Walla geçitli anlamadım hangini ekleyeceğimi

*

  1. 3,263

  2. 596

  3. 1077

"ustte cikmasini isteyen" dediği yere kadar editlemen yeterli

*

  1. 38

  2. 14

  3. 7
17 Mar 2018 19:58 #4 Son düzenlenme: 17 Mar 2018 20:07 herme
Osman recent post kuramıyorum bu konu hakkında detaylı bir konu açarmısın yada BU MODU SMF 2.015 İÇİN GÜNCELLEYEBİLİRMİSİNprofilimdeki siteye kuracam,senden başkası yapamaz bunu babacan :)

*

  1. 3,263

  2. 596

  3. 1077
herme geçitli verdiği kodlamayı yaptıysan moda gerek yokki modun zaten smf 2.0 için olanı vermiş
yukardaki kodlamayı yaptıktan sonra yönetim panelinden kullanılan tema kısmında 
"Forum ana sayfasında gösterilecek son ileti sayısı" kısmına kaç konu gösterilceğini giriyormusun
kodları ekleyemediysen buraya ilgili dosyaları ekle bakalım
/Sources/Subs-Recent.php
/Themes/default/BoardIndex.template.php

dil dosyasına eklersin zaten

örnek olarak verdiğin resimdekini birebir yapmak uzun iş o kadar vaktim yok malesef


Benzer Konular (5)


MENU ×