Konu: İstediğin alt bölümleri açılır menü yapmak  (Okunma sayısı 1101 defa)

0 Üye ve 1 Ziyaretçi konuyu incelemekte.

01 Haziran 2011, 03:51
  • *
    • İleti: 2018
    • Karma: 41
    • Spina Bifida
    • Profili Görüntüle

Önce alt bölümleri 2 ya da 3 sütun yapmak için ekteki paketi kurun

Board.Index.Template.php
Bul:
Kod: [Seç]
// 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 windowbg">
                  <p>', comma_format($board['posts']), ' ', $board['is_redirect'] ? $txt['redirects'] : $txt['posts'], ' [br /]
                  ', $board['is_redirect'] ? '' : comma_format($board['topics']) . ' ' . $txt['board_topics'], '
                  </p>
               </td>
               <td class="lastpost">';

Değiştir:
Kod: [Seç]
  // 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 (($board['id']==57) || ($board['id']==58) || ($board['id']==59))
           
            {
               echo '
         <table style="float:right; padding-left:10px;" width="100%" cellspacing="0" cellpadding="3" border="0">
                  <tr><td class="smalltext">
               <form action="', $scripturl, '" method="get" accept-charset="', $context['character_set'], '" name="jumptoForm">
                  <span class="smalltext"><label for="jumpto"><strong>', $txt['parent_boards'], '</strong></label>:</span>
               <select name="jumpto" id="jumpto" onchange="if (this.selectedIndex > 0 &amp;&amp; this.options[this.selectedIndex].value) window.location.href = smf_scripturl + this.options[this.selectedIndex].value.substr(smf_scripturl.indexOf(\'?\') == -1 || this.options[this.selectedIndex].value.substr(0, 1) != \'?\' ? 0 : 1);">
';
                           if (($board['id']==57))
                           echo '
                 <option value="">' . $txt['select_destination2'] . '</option>'; 

                           if (($board['id']==58))
                           echo '
                 <option value="">' . $txt['select_destination3'] . '</option>'; 

                           if (($board['id']==59))
                           echo '
                 <option value="">' . $txt['select_destination4'] . '</option>';               

            // Populate the dropdown with child boards
               foreach ($board['children'] as $child)
               {
                  // Has it posts awaiting approval?
                  if ($child['can_approve_posts'] && ($child['unapproved_posts'] | $child['unapproved_topics']) && $child['new'])
               echo '
                     <option value="?board=', $child['id'], '.0">' , $child['name'] , ' (' , $txt['new'] , ') (!)</option>';
               elseif ($child['can_approve_posts'] && ($child['unapproved_posts'] | $child['unapproved_topics']))
               echo '
                     <option value="?board=', $child['id'], '.0">' , $child['name'] , ' (!)</option>';
               elseif ($child['new'])
               echo '
                     <option value="?board=', $child['id'], '.0">' , $child['name'] , ' (' , $txt['new'] , ')</option>';
               else
               echo '
                     <option value="?board=', $child['id'], '.0">' , $child['name'] , '</option>';
               }

               echo '
               </select>&nbsp;
               </form>
            </td>
         </tr></table>';
            }
            else
            {
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'] . '</ur>]';
                     $children[] = $child['new'] ? '<img style="margin-right:5px;" src="' . $settings['images_url'] . '/new_some.png" width="12" height="12" alt=""/>' . $child['link'] . '' : '<img style="margin-right:5px;" src="' . $settings['images_url'] . '/new_none.png" width="12" height="12" alt=""/>' . $child['link'];                   
               }

               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'] . '</ur>]';
                  else
                     $child['link'] = '<a href="' . $child['href'] . '" title="' . $child['posts'] . ' ' . $txt['redirects'] . '">' . $child['name'] . '</ur>]';

                  // 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">(!)</ur>]';

                                       @$children[] = $child['new'] ? '<img style="margin-right:5px;" src="' . $settings['images_url'] . '/new_some.png" width="12" height="12" alt=""/><strong>' . $child['link'] . '</strong>' : '<img style="margin-right:5px;" src="' . $settings['images_url'] . '/new_none.png" width="12" height="12" alt=""/>' . $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="lastpost">';       
Index.turkish.php
bul:
Kod: [Seç]
?>üstüne ekle:
Kod: [Seç]
$txt['select_destination2'] = 'Kız çocuklarımız alfabetik liste &nbsp;&nbsp;&nbsp;&nbsp;';
$txt['select_destination3'] = 'Erkek çocuklarımız alfabetik liste';
$txt['select_destination4'] = 'Büyükler alfabetik liste &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;';

Index.turkish.php
Bul:
Kod: [Seç]
?>
Kendine göre editleyip üstüne ekle:
Kod: [Seç]
$txt['select_destination2'] = 'Kız çocuklarımız alfabetik liste &nbsp;&nbsp;&nbsp;&nbsp;';
$txt['select_destination3'] = 'Erkek çocuklarımız alfabetik liste';
$txt['select_destination4'] = 'Büyükler alfabetik liste &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;';
57,58,59 kategori bölümleridir.

« Son Düzenleme: 10 Mayıs 2014, 20:37 Gönderen: bolubeyi »

21 Ağustos 2011, 22:03
Yanıtla #1
  • *
    • İleti: 2
    • Karma: 0
    • Profili Görüntüle

    • Destek alabilmek
      için forum urlnizi
      profilinize giriniz.

    • Profili Görüntüle

Demo yada resim olsa daha güzel olmaz mı


22 Ağustos 2011, 00:06
Yanıtla #2
  • *
    • İleti: 2018
    • Karma: 41
    • Spina Bifida
    • Profili Görüntüle

Demosuna sitemden bakabilirsiniz. Anlatım rc3 sürüme göre yapılmış. Bu nedenle 2.0 final sürümde bazı hatalar meydana gelmekte. Çıkan hataları çözmeye çalışırız.
Kurmak isteyenler önce aşağıdaki linkteki modu kursun. Sonra bunu uygulasın.
http://destek.smfmod.com/index.php?action=downloads;cat=7


28 Ağustos 2011, 10:13
Yanıtla #3
  • *
    • İleti: 2018
    • Karma: 41
    • Spina Bifida
    • Profili Görüntüle

Anlatım 2.0 final sürüme güncellenmiştir.