2.1 Kategori Görünümü Hakkında

Başlatan casper32, 22 Mar 2017 19:06

« önceki - sonraki »

0 Üyeler ve 1 Ziyaretçi konuyu incelemekte.



  1. 632

  2. 252

Arkadaşlar sitemde Karaca temasını kullanıyorum herşey çok iyi çok güzel de bu kategorileri sıralı gösteriyorduk ya alt alta falan. Şimdi 2.1 de hepsi yan yana çıkıyor bunun bi çözümü varmı hocam



  1. 632

  2. 252

*

  1. 3,263

  2. 596

  3. 1077
23 Mar 2017 07:44 #2 Son düzenlenme: 23 Mar 2017 07:52 snrj
evet ordaki anlatım doğru ama o alpha sürümü içindi :D yani orda table yapısı mevcut
şuan burda kullandığımız stilde yapmak istiyorsanız
boardindex.template de bulun ve silin [süslü parentezlere ve virgül vs.. dikkat yoksa hata alırsınız]
// Show the "Child Boards: ". (there's a link_children but we're going to bold the new ones...)
if (!empty($board['children']))
{
// Sort the links into an array with new boards bold so it can be imploded.
$children = array();
/* Each child in each board's children has:
id, name, description, new (is it new?), topics (#), posts (#), href, link, and last_post. */
foreach ($board['children'] as $child)
{
if (!$child['is_redirect'])
$child['link'] = '<a href="' . $child['href'] . '" ' . ($child['new'] ? 'class="board_new_posts" ' : '') . 'title="' . ($child['new'] ? $txt['new_posts'] : $txt['old_posts']) . ' (' . $txt['board_topics'] . ': ' . comma_format($child['topics']) . ', ' . $txt['posts'] . ': ' . comma_format($child['posts']) . ')">' . $child['name'] . ($child['new'] ? '</a> <a href="' . $scripturl . '?action=unread;board=' . $child['id'] . '" title="' . $txt['new_posts'] . ' (' . $txt['board_topics'] . ': ' . comma_format($child['topics']) . ', ' . $txt['posts'] . ': ' . comma_format($child['posts']) . ')"><span class="new_posts">' . $txt['new'] . '</span>' : '') . '</a>';
else
$child['link'] = '<a href="' . $child['href'] . '" title="' . comma_format($child['posts']) . ' ' . $txt['redirects'] . ' - ' . $child['short_description'] . '">' . $child['name'] . '</a>';

// Has it posts awaiting approval?
if ($child['can_approve_posts'] && ($child['unapproved_posts'] || $child['unapproved_topics']))
$child['link'] .= ' <a href="' . $scripturl . '?action=moderate;area=postmod;sa=' . ($child['unapproved_topics'] > 0 ? 'topics' : 'posts') . ';brd=' . $child['id'] . ';' . $context['session_var'] . '=' . $context['session_id'] . '" title="' . sprintf($txt['unapproved_posts'], $child['unapproved_topics'], $child['unapproved_posts']) . '" class="moderation_link">(!)</a>';

$children[] = $child['new'] ? '<strong>' . $child['link'] . '</strong>' : $child['link'];
}

echo '
<div id="board_', $board['id'], '_children" class="children">
<p><strong>', $txt['sub_boards'], '</strong>: ', implode(', ', $children), '</p>
</div>';
}
bulun
if (!empty($board['link_moderators']))
echo '
<p class="moderators">', count($board['link_moderators']) == 1 ? $txt['moderator'] : $txt['moderators'], ': ', implode(', ', $board['link_moderators']), '</p>';
Altına Ekleyin
// Show the "Child Boards: ". (there's a link_children but we're going to bold the new ones...)
if (!empty($board['children']))
{
// Sort the links into an array with new boards bold so it can be imploded.
$children = array();
/* Each child in each board's children has:
id, name, description, new (is it new?), topics (#), posts (#), href, link, and last_post. */
foreach ($board['children'] as $child)
{
if (!$child['is_redirect'])
$child['link'] = '<a href="' . $child['href'] . '" ' . ($child['new'] ? 'class="board_new_posts" ' : '') . 'title="' . ($child['new'] ? $txt['new_posts'] : $txt['old_posts']) . ' (' . $txt['board_topics'] . ': ' . comma_format($child['topics']) . ', ' . $txt['posts'] . ': ' . comma_format($child['posts']) . ')">' . $child['name'] . ($child['new'] ? '</a> <a href="' . $scripturl . '?action=unread;board=' . $child['id'] . '" title="' . $txt['new_posts'] . ' (' . $txt['board_topics'] . ': ' . comma_format($child['topics']) . ', ' . $txt['posts'] . ': ' . comma_format($child['posts']) . ')"><span class="new_posts">' . $txt['new'] . '</span>' : '') . '</a>';
else
$child['link'] = '<a href="' . $child['href'] . '" title="' . comma_format($child['posts']) . ' ' . $txt['redirects'] . ' - ' . $child['short_description'] . '">' . $child['name'] . '</a>';

// Has it posts awaiting approval?
if ($child['can_approve_posts'] && ($child['unapproved_posts'] || $child['unapproved_topics']))
$child['link'] .= ' <a href="' . $scripturl . '?action=moderate;area=postmod;sa=' . ($child['unapproved_topics'] > 0 ? 'topics' : 'posts') . ';brd=' . $child['id'] . ';' . $context['session_var'] . '=' . $context['session_id'] . '" title="' . sprintf($txt['unapproved_posts'], $child['unapproved_topics'], $child['unapproved_posts']) . '" class="moderation_link">(!)</a>';

$children[] = $child['new'] ? '<strong><span class="generic_icons im_on"></span> ' . $child['link'] . '</strong>' : '<strong><span class="generic_icons im_off"></span> '.$child['link'].'</strong>';
}

echo '
<div id="board_', $board['id'], '_children" class="children">
<p>', implode($children), '</p>
</div>';
}
index.css de en alta ekleyin
.children p strong {
    width: 49%;
    float: left;
}



  1. 632

  2. 252

bunu yapınca kategoriler yanyana değilde karşılıklı sıralı olacak dimi

*

  1. 3,263

  2. 596

  3. 1077
alt bölümler burdaki şekilde olacak
kategoriler değil
kategorilerimi 2 li sutun haline getirmeye çalışıyorsunuz



  1. 632

  2. 252


Benzer Konular (5)


MENU ×