bunca koda sorguya ne gerek var anlamadim sizin gibi kod yapisini bilen birinin her kulanilan if kodunun bir sorgu oluşturacağını ıyı bılırsınız kaldiki sitede 40 blok osa yuzlerce sorgu demektir arti css ye eklenen onca kod? oysa kücük bir düzenleme kafi gelir buna
BoardIndex.template
bulun
değişin
bu arada index.css uygun bir yere ekleyin
BoardIndex.template
bulun
Kod Seç
// 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>
değişin
Kod Seç
// 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>
şimdi image kilasorunun icine cat diye bir kilasor oluşturun resimlerinizi icine atin uzantilarini katagori nosuna gore değişin 1.2.3. gibibu arada index.css uygun bir yere ekleyin
Kod Seç
img
{
max-width: 100%;
height: auto;
}