Alt Kategori Hakkında?

Başlatan cynylmz_07, 14 Haz 2014 11:27

« önceki - sonraki »

0 Üyeler ve 1 Ziyaretçi konuyu incelemekte.

*

  1. 121

  2. 37

  3. 5

Merhaba arkadaşlar kullandığım temadan ötürü alt bölümlerim karman çorman, smf destek sitelerinde 2 li ve 3 sıralama kodları var hepsini denedim ya olmadı ya sitenin şekli kaydı, sizin önereceğiniz nedir? Alt alta almak için çünkü bazı kodlar board.index.php de yok..


*

  1. 3,094

  2. 585

  3. 983
14 Haz 2014 11:38 #1 Son düzenlenme: 14 Haz 2014 12:06 Smfci
kullandığınız temada Boardindex.template.php de bulun

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

// 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="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']) . ')"><img src="' . $settings['lang_images_url'] . '/new.gif" class="new_posts" alt="" />' : '') . '</a>';
else
$child['link'] = '<a href="' . $child['href'] . '" title="' . comma_format($child['posts']) . ' ' . $txt['redirects'] . '">' . $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'] ? '' . $child['link'] . '' : $child['link'];
}
echo '
<ul id="board_', $board['id'], '_children" class="reset subforum_sh children">
<li>', implode(', ', $children), '</li>
</ul>';
}

echo '

<p class="board-description">', $board['description'] , '</p>';

// Show the "Moderators: ". Each has name, href, link, and id. (but we're gonna use link_moderators.)
if (!empty($board['moderators']))
echo '
<p class="moderators">', count($board['moderators']) == 1 ? $txt['moderator'] : $txt['moderators'], ': ', implode(', ', $board['link_moderators']), '</p>';

// Show some basic information about the number of posts, etc.
echo '
</td>
<td class="stats">
<p><strong>', comma_format($board['posts']), '</strong> ', $board['is_redirect'] ? $txt['redirects'] : $txt['posts'], ' <br />
', $board['is_redirect'] ? '' : '<strong>'. comma_format($board['topics']). '</strong>' . ' ' . $txt['board_topics'], '
</p>
</td>
<td class="lastpost">';

/* The board's and children's 'last_post's have:
time, timestamp (a number that represents the time.), id (of the post), topic (topic id.),
link, href, subject, start (where they should go for the first unread post.),
and member. (which has id, name, link, href, username in it.) */
if (!empty($board['last_post']['id']))
echo '
<p><strong>', $txt['last_post'], '</strong>  ', $txt['by'], ' ', $board['last_post']['member']['link'] , '<br />
', $txt['in'], ' ', $board['last_post']['link'], '<br />
', $txt['on'], ' ', $board['last_post']['time'],'
</p>';
echo '
</td>
</tr>';

}
echo '
</tbody>
</table>';
}
echo '
<table class="table_list">
<tbody class="divider">
<tr>
<td colspan="4"></td>
</tr>
</tbody>
</table>';
}
echo '
</div>';



Değiştirin


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


echo '

<p class="board-description">', $board['description'] , '</p>';

// Show the "Moderators: ". Each has name, href, link, and id. (but we're gonna use link_moderators.)
if (!empty($board['moderators']))
echo '
<p class="moderators">', count($board['moderators']) == 1 ? $txt['moderator'] : $txt['moderators'], ': ', implode(', ', $board['link_moderators']), '</p>';

if (empty($modSettings['hhyaltbolum'])) {
$modSettings['hhyaltbolum']=0;
}
if ($modSettings['hhyaltbolum'] == 0)
{
            // 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)
               {
       $child['link'] = '<a href="' . $child['href'] . '" title="' . ($child['new'] ? $txt['new_posts'] : $txt['old_posts']) . ' (Konu: ' . $child['topics'] . ', Mesaj: ' . $child['posts'] . ')">' . $child['name'] . '</a>';
                     $children[] = $child['new'] ? '<span><i class="fa fa-comments"></i><b>' . $child['link'] . '</span></b>' : '<span><i class="fa fa-comments-o"></i>' . $child['link']. '</span>';                     
               }

               echo '
               <table style="float:right; padding-left:10px;" width="100%" cellspacing="0" cellpadding="3" border="0">
                  <tr>';

               $child_counter = 0;
               
               if(empty($settings['child_boards_rows']))
               {
                  echo '   
                     
                     <td style="width:50%;" class="smalltext" valign="top">';
                       
                        for(; $child_counter < ceil(count($children)/2); $child_counter++)
                              echo $children[$child_counter], '<br />';
               }
               
               echo '
                     </td>
                     <td style="width:50%;" class="smalltext" valign="top">';   
                        for(; $child_counter < count($children); $child_counter++)
                              echo $children[$child_counter], '<br />';


               echo '
                     </td>
                  </tr>
               </table>';
            }
}

if ($modSettings['hhyaltbolum'] == 1)
{
            // 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. */
$sayac=0;
             foreach ($board['children'] as $child)
             {
                  if (!$child['is_redirect'])
                     $child['link'] = '<a href="' . $child['href'] . '" title="' . ($child['new'] ? $txt['new_posts'] : $txt['old_posts']) . ' (Konu: ' . $child['topics'] . ', Mesaj: ' . $child['posts'] . ')">' . $child['name'] . '</a>';
                  else
                     $child['link'] = '<a href="' . $child['href'] . '" title="' . $child['posts'] . ' ' . $txt['redirects'] . '">' . $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'] ? 'topics' : 'posts') . ';brd=' . $child['id'] . ';sesc=' . $context['session_id'] . '" title="' . sprintf($txt['unapproved_posts'], $child['unapproved_topics'], $child['unapproved_posts']) . '" class="moderation_link">(!)</a>';

                                       @$children[] = $child['new'] ? '<i class="fa fa-comments"></i>' . $child['link'] . '</strong>' : '<i class="fa fa-comments-o"></i>' . $child['link'];
                  $sayac++;
               }

             echo '
             <table style="float:right; padding-left:10px;" width="97%" cellspacing="0" cellpadding="3" border="0">
                  <tr>
                     <td style="width:33%" class="smalltext" valign="top">';
                     for($sayac2 = 0 ; $sayac2 < ceil($sayac/3);$sayac2++)
                        echo $children[$sayac2], '<br />';
                     echo '
                     </td>
                     <td style="width:33%" class="smalltext" valign="top">';
                     for(; $sayac2 < ceil($sayac/1.5);$sayac2++)
                        echo $children[$sayac2], '<br />';
                     echo '
                     </td>
                     <td style="width:33%" class="smalltext" valign="top">';
                     for(; $sayac2 < $sayac ; $sayac2++)
                        echo $children[$sayac2], '<br />';
                     echo '
                     </td></tr>
               </table>';
          }
}
// Show some basic information about the number of posts, etc.
echo '
</td>
<td class="stats windowbg2">
<p>', comma_format($board['posts']), ' ', $board['is_redirect'] ? $txt['redirects'] : $txt['posts'], '</p><p>
', $board['is_redirect'] ? '' : comma_format($board['topics']) . ' ' . $txt['board_topics'], '
</p>
</td>
<td class="lastpost">';

/* The board's and children's 'last_post's have:
time, timestamp (a number that represents the time.), id (of the post), topic (topic id.),
link, href, subject, start (where they should go for the first unread post.),
and member. (which has id, name, link, href, username in it.) */
if (!empty($board['last_post']['id']))
echo '

', $txt['in'], ' ', $board['last_post']['link'], '<br />
', $txt['by'], ' ', $board['last_post']['member']['link'] , '<br />
', $txt['on'], ' ', $board['last_post']['time'],'';
echo '
</td>
</tr>';

}
echo '
</tbody>';
}
echo '
<tbody class="divider">
<tr>
<td colspan="5"></td>
</tr>
</tbody>';
}
echo '
</table>
</div>';

*

  1. 121

  2. 37

  3. 5
Şöyle bir görüntü oldu hocam, 2 er tane ve konu ile ileti ayrıldı..


*

  1. 3,094

  2. 585

  3. 983

konu ve iletiyi birleştirmek istiyorsanız
bul
<td class="stats windowbg2">
<p>', comma_format($board['posts']), ' ', $board['is_redirect'] ? $txt['redirects'] : $txt['posts'], '</p> </td><td class="stats windowbg2"><p>
', $board['is_redirect'] ? '' : comma_format($board['topics']) . ' ' . $txt['board_topics'], '
</p>
</td>

değiştir
<td class="stats windowbg2">
<p>', comma_format($board['posts']), ' ', $board['is_redirect'] ? $txt['redirects'] : $txt['posts'], '</p><p>
', $board['is_redirect'] ? '' : comma_format($board['topics']) . ' ' . $txt['board_topics'], '
</p>
</td>

*

  1. 121

  2. 37

  3. 5
Peki alt bölümler önce eski hali sonra yeni hali şeknlinde var nasıl olucak?

*

  1. 3,094

  2. 585

  3. 983
pardon bazen oluyor böyle
Boardindex.template.php de şu kısımı bulup silin
// 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="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']) . ')"><img src="' . $settings['lang_images_url'] . '/new.gif" class="new_posts" alt="" />' : '') . '</a>';
else
$child['link'] = '<a href="' . $child['href'] . '" title="' . comma_format($child['posts']) . ' ' . $txt['redirects'] . '">' . $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'] ? '' . $child['link'] . '' : $child['link'];
}
echo '
<ul id="board_', $board['id'], '_children" class="reset subforum_sh children">
<li>', implode(', ', $children), '</li>
</ul>';
}

*

  1. 3,094

  2. 585

  3. 983

*

  1. 121

  2. 37

  3. 5

Teşekkürler oldu yanlız alt bölümlerin başına sizin sitenizdeki gibi küçük ikonlar nasıl kayabilirim?

*

  1. 3,094

  2. 585

  3. 983
Boardindex.template.php de bul
                     $children[] = $child['new'] ? '<span><i class="fa fa-comments"></i><b>' . $child['link'] . '</span></b>' : '<span><i class="fa fa-comments-o"></i>' . $child['link']. '</span>';             

değiştir
                     $children[] = $child['new'] ? '<span><img src="'. $settings['images_url']. '/new_some.png"   alt="*"/><b>' . $child['link'] . '</span></b>' : '<span><img src="'. $settings['images_url']. '/new_none.png"   alt="*"/>' . $child['link']. '</span>';       



  1. 632

  2. 251
alt kategorilere icon eklicem ama
$children[] = $child['new'] ? '<strong>' . $child['link'] . '</strong>' : $child['link']; } echo '<div style="padding-top: 5px;"> ', implode(' | ', $children), '</div> '; }

bu kod var bende nasıl yapmam lazım ?

*

  1. 3,094

  2. 585

  3. 983
şu şekilde bir değiştirip deneyin bakalım
$children[] = $child['new'] ? '<strong><img src="'. $settings['images_url']. '/new_some.png"   alt="*"/>' . $child['link'] . '</strong>' : $child['link']; } echo '<div style="padding-top: 5px;"> <img src="'. $settings['images_url']. '/new_none.png"   alt="*"/>', implode(' | ', $children), '</div> '; }


MENU ×