SMF Ana Kategorilere Resim Ekleme Modifikasyonu

0 Üye ve 1 Ziyaretçi konuyu incelemekte.

Çevrimdışı D®agon

  • Ezberletmez Öğretir
  • *******
  • Join Date: Mar 2008
  • Yer: Ankara
  • 11650
  • +524/-0
  • Cinsiyet: Bay
    • Arif Hocam
SMF Ana Kategorilere Resim Ekleme Modifikasyonu
« : 04 Mart 2018, 18:49:25 »
BoardIndex.template.php

Aşağıdaki kodu bulun:

[code]// If theres no parent boards we can see, avoid showing an empty category (unless its collapsed)
if (empty($category['boards']) && !$category['is_collapsed'])
continue;

echo '
<table class="table_list">
<tbody class="header" id="category_', $category['id'], '">
<tr>
<td>
<div class="cat_bar">
<h3 class="catbg">';

// If this category even can collapse, show a link to collapse it.
if ($category['can_collapse'])
echo '
<a class="collapse" href="', $category['collapse_href'], '">', $category['collapse_image'], '</a>';

if (!$context['user']['is_guest'] && !empty($category['show_unread']))
echo '
<a class="unreadlink hidden-xs hidden-sm" href="', $scripturl, '?action=unread;c=', $category['id'], '">', $txt['view_unread_category'], '</a>';

echo '
', $category['link'], '
</h3>
</div>[/code]

Bununla Değiştirin:

[code]// If theres no parent boards we can see, avoid showing an empty category (unless its collapsed)
if (empty($category['boards']) && !$category['is_collapsed'])
continue;

echo '
<tbody class="header" id="category_', $category['id'], '">
<tr>
<td colspan="4">
<div class="cat_bar">
<h3 class="catbg">';

// If this category even can collapse, show a link to collapse it.
if ($category['can_collapse'])
echo '
<a class="collapse" href="', $category['collapse_href'], '">', $category['collapse_image'], '</a>';

if (!$context['user']['is_guest'] && !empty($category['show_unread']))
echo '
<a class="unreadlink" href="', $scripturl, '?action=unread;c=', $category['id'], '">', $txt['view_unread_category'], '</a>';

echo '
', $category['link'], '
</h3>
</div>
                                      <div class="headercat">
<img src="', $settings['images_url'], '/cat/', $category['id'], '.jpg" alt="category" />
</div>[/code]

Temanızın image kilasorunun icine cat diye bir kilasor oluşturun.
Resimlerinizi bunun icine atacağız.
Uzantılarını katagori nosuna göre değiştirin. 1.2.3. gibi.

index.css en altına ekleyin.

[code]img
{
max-width: 100%;
height: auto;
}[/code]