Alt Bölümleri Alt Alta Sıralama

Started by Yağız..., November 08, 2008, 08:46:39 AM

Previous topic - Next topic

Crazytoones

O resmi alt bölümünün isminin en soluna nasıl ekleyebilirim?



Yağız...

O satırı bu şekilde değiştirin:
$child['link'] = '' . ($child['new'] ? '<a href="' . $child['href'] . '" title="' . $txt['new_posts'] . ' (' . $txt['board_topics'] . ': ' . comma_format($child['topics']) . ', ' . $txt['posts'] . ': ' . comma_format($child['posts']) . ')"><img src="' . $settings['images_url'] . '/on.png" width="20" height="20" class="new_posts" alt="" />' : '') . '</a> <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>' : '') . '';

Crazytoones



jackalsahan

Quote from: Yağız... on November 08, 2008, 08:46:39 AM
Anlatımlar 1.1.x ve 2.0 RC1 sürümleri için Core, yani default tema içindir. 2.0 RC2 ve 2.0 RC3 sürümü için ise Curve, yani yeni default tema içindir.



1.1.x versiyonu için.
BoardIndex.template.php'de bulun:
foreach ($board['children'] as $child)
                    {
                            $child['link'] = '<a href="' . $child['href'] . '" title="' . ($child['new'] ? $txt[333] : $txt[334]) . ' (' . $txt[330] . ': ' . $child['topics'] . ', ' . $txt[21] . ': ' . $child['posts'] . ')">' . $child['name'] . '</a>';
                            $children[] = $child['new'] ? '<b>' . $child['link'] . '</b>' : $child['link'];
                    }

                    echo '
            <tr>
                <td colspan="3" class="windowbg', !empty($settings['seperate_sticky_lock']) ? '3' : '', '">
                    <span class="smalltext"><b>', $txt['parent_boards'], '</b>: ', implode(', ', $children), '</span>
                </td>

Değiştirin:
foreach ($board['children'] as $child)
                    {
                            $child['link'] = '<a href="' . $child['href'] . '" title="' . ($child['new'] ? $txt[333] : $txt[334]) . ' (' . $txt[330] . ': ' . $child['topics'] . ', ' . $txt[21] . ': ' . $child['posts'] . ')">' . $child['name'] . '</a>';
                            $children[] = $child['new'] ? '<img src="' . $settings['images_url'] . '/on.gif" alt="' . $txt[333] . '" width="15" height="15" style="vertical-align: middle; margin-left: 2px;" /><b>' . $child['link'] . '</b>' : '<img src="' . $settings['images_url'] . '/off.gif" alt="' . $txt[334] . '" width="15" height="15" style="vertical-align: middle; margin-right: 2px;" />' . $child['link'];
                    }

                    echo '
            <tr>
                <td colspan="3" class="windowbg', !empty($settings['seperate_sticky_lock']) ? '3' : '', '">
                    <table>
                        <tr>';

                    foreach ($children as $key => $child)
                    {
                        if ($key % 2 == 0 && $key != 0)
                            echo '
                        </tr>
                        <tr>';

                        echo '
                            <td style="padding-left: 10px;"><span class="smalltext">', $child, '</span></td>';
                    }

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

Sütunları fazlalaştırmak için:
   Değiştirdiğiniz kodun içerisinde bulunan if ($key % 2 == 0 && $key != 0) kodundaki 2 değerini, istediğiniz değerle değiştirin.



2.0 RC1 versiyonu için.
BoardIndex.template.php'de bulun:
<td class="windowbg3 smalltext largepadding"><strong>', $txt['parent_boards'], '</strong>: ', implode(', ', $children), '</td>
Değiştirin:
<td class="windowbg3 smalltext largepadding">
               <table>
                  <tr>';

               foreach ($children as $key => $child)
               {
                  if ($key % 2 == 0 && $key != 0)
                     echo '
                  </tr>
                  <tr>';

                  echo '
                     <td style="padding-left: 10px;">', $child, '</td>';
               }

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

Sütunları fazlalaştırmak için:
    Değiştirdiğiniz kodun içerisinde bulunan if ($key % 2 == 0 && $key != 0) kodundaki 2 değerini, istediğiniz değerle değiştirin.

2.0 RC2 ve 2.0 RC3 versiyonu için.
BoardIndex.template.php'de bulun:
<tr><td colspan="3" class="children windowbg"><strong>', $txt['parent_boards'], '</strong>: ', implode(', ', $children), '</td></tr>';
Değiştirin:
<tr>
                  <td colspan="3" class="children windowbg">
                     <table>
                        <tr>';

                     foreach ($children as $key => $child)
                     {
                        if ($key % 2 == 0 && $key != 0)
                           echo '
                        </tr>
                        <tr>';

                        echo '
                           <td style="padding-left: 10px;">', $child, '</td>';
                     }

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

Sütunları fazlalaştırmak için:
    Değiştirdiğiniz kodun içerisinde bulunan if ($key % 2 == 0 && $key != 0) kodundaki 2 değerini, istediğiniz değerle değiştirin.

Tenma'ya teşekkürler.



arkadaşlar ayarların tümünü yaptım fakat bir çizgi çıktı bu çızgiyi silebirmiyiz yardım ederbilirmisiniz.



N_O_A

yaptim hatta aldim

resim asagida
hxxp:www.boardsat.com/boardsatresim/solhatta.jpg [nonactive]
hxxp:odogan.com [nonactive] - hxxp:video.odogan.com [nonactive] - hxxp:haber.odogan.com [nonactive]

grafitus

Yaptığınız değişiklikte
Code (Bulun) Select
colspan="3"
Code (Değiştirin) Select
colspan="5"

arzum

selam... ben 1.1.11 Nostalji temasini kullaniyorum...verdiginiz kodlari kullana bilirmiyim?


daavidoo75

merhaba arkadaslar foruma yeni bir tema attim ve alt bölümleri alt alta siralamak istiyorum malesef boardindex.php de burda gösterilen yerleri bulamiyorum kac defa kodlari aradim taradim yok lütfen baan yardimci olurmusunuz...forumumuz smf 2.0 rc3
boardindex kodunuda atiyorum yardimci olacak arkadaslara simdiden cok tsk ederim....
function template_main()
{
   global $context, $settings, $options, $txt, $scripturl, $modSettings;

   // Show some statistics if stat info is off.
   if (!$settings['show_stats_index'])
      echo '
   <p id="stats">
      ', $txt['members'], ': ', $context['common_stats']['total_members'], ' ��� ', $txt['posts_made'], ': ', $context['common_stats']['total_posts'], ' ��� ', $txt['topics'], ': ', $context['common_stats']['total_topics'], '
      ', ($settings['show_latest_member'] ? '<br />' . $txt['welcome_member'] . ' <strong>' . $context['common_stats']['latest_member']['link'] . '</strong>' . $txt['newest_member'] : '') , '
   </p>';

   // Show the news fader?  (assuming there are things to show...)
   if ($settings['show_newsfader'] && !empty($context['fader_news_lines']))
   {
      echo '
   <div class="tborder marginbottom">
      <h3 id="newsfader" class="catbg">
         <img id="newsupshrink" src="', $settings['images_url'], '/collapse.gif" alt="*" title="', $txt['upshrink_description'], '" align="bottom" style="display: none;" />
         ', $txt['news'], '
      </h3>
      <div class="windowbg2" id="smfNewsFader">
         <div id="smfFadeScroller"><span>', $context['news_lines'][0], '</span></div>
      </div>
   </div>
   <script type="text/javascript" src="', $settings['default_theme_url'], '/scripts/fader.js"></script>
   <script type="text/javascript"><!-- // --><![CDATA[

      // Create a news fader object.
      var oNewsFader = new smf_NewsFader({
         sSelf: \'oNewsFader\',
         sFaderControlId: \'smfFadeScroller\',
         aFaderItems: [
            "',
            implode('",
            "', $context['fader_news_lines']), '"],
         sItemTemplate: ', JavaScriptEscape('<strong>%1$s</strong>'), ',
         iFadeDelay: ', empty($settings['newsfader_time']) ? 5000 : $settings['newsfader_time'], '
      });

      // Create the news fader toggle.
      var smfNewsFadeToggle = new smc_Toggle({
         bToggleEnabled: true,
         bCurrentlyCollapsed: ', empty($options['collapse_news_fader']) ? 'false' : 'true', ',
         aSwappableContainers: [
            \'smfNewsFader\'
         ],
         aSwapImages: [
            {
               sId: \'newsupshrink\',
               srcExpanded: smf_images_url + \'/collapse.gif\',
               altExpanded: ', JavaScriptEscape($txt['upshrink_description']), ',
               srcCollapsed: smf_images_url + \'/expand.gif\',
               altCollapsed: ', JavaScriptEscape($txt['upshrink_description']), '
            }
         ],
         oThemeOptions: {
            bUseThemeSettings: ', $context['user']['is_guest'] ? 'false' : 'true', ',
            sOptionName: \'collapse_news_fader\',
            sSessionVar: ', JavaScriptEscape($context['session_var']), ',
            sSessionId: ', JavaScriptEscape($context['session_id']), '
         },
         oCookieOptions: {
            bUseCookie: ', $context['user']['is_guest'] ? 'true' : 'false', ',
            sCookieName: \'newsupshrink\'
         }
      });
   // ]]></script>';
   }

   /* Each category in categories is made up of:
   id, href, link, name, is_collapsed (is it collapsed?), can_collapse (is it okay if it is?),
   new (is it new?), collapse_href (href to collapse/expand), collapse_image (up/down image),
   and boards. (see below.) */
   foreach ($context['categories'] as $category)
   {
      // 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 '
   <div class="categoryframe tborder clearfix">
      <h3 class="catbg', $category['new'] ? '2' : '', '">';

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

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

      echo $category['link'];

      echo '
      </h3>';

      // Assuming the category hasn't been collapsed...
      if (!$category['is_collapsed'])
      {
         echo '
      <table cellspacing="1" class="bordercolor boardsframe">';

         /* Each board in each category's boards has:
         new (is it new?), id, name, description, moderators (see below), link_moderators (just a list.),
         children (see below.), link_children (easier to use.), children_new (are they new?),
         topics (# of), posts (# of), link, href, and last_post. (see below.) */
         foreach ($category['boards'] as $board)
         {
            echo '
         <tr>
            <td', !empty($board['children']) ? ' rowspan="2"' : '', ' class="windowbg icon">
               <a href="', ($board['is_redirect'] || $context['user']['is_guest'] ? $board['href'] : $scripturl . '?action=unread;board=' . $board['id'] . '.0;children'), '">';

            // If the board or children is new, show an indicator.
            if ($board['new'] || $board['children_new'])
               echo '
                  <img src="', $settings['images_url'], '/on', $board['new'] ? '' : '2', '.gif" alt="', $txt['new_posts'], '" title="', $txt['new_posts'], '" border="0" />';
            // Is it a redirection board?
            elseif ($board['is_redirect'])
               echo '
                  <img src="', $settings['images_url'], '/redirect.gif" alt="*" title="*" border="0" />';
            // No new posts at all! The agony!!
            else
               echo '
                  <img src="', $settings['images_url'], '/off.gif" alt="', $txt['old_posts'], '" title="', $txt['old_posts'], '" />';

            echo '
               </a>
            </td>
            <td class="windowbg2 info">
               <h4><a href="', $board['href'], '" name="b', $board['id'], '">', $board['name'], '</a>';

            // 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 '
               </h4>
               <p>', $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', !empty($board['children']) ? ' rowspan="2"' : '', ' class="windowbg stats smalltext">
               ', comma_format($board['posts']), ' ', $board['is_redirect'] ? $txt['redirects'] : $txt['posts'], ' <br />
               ', $board['is_redirect'] ? '' : comma_format($board['topics']) . ' ' . $txt['board_topics'], '
            </td>
            <td', !empty($board['children']) ? ' rowspan="2"' : '', ' class="windowbg2 smalltext 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 '
               <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'];
            echo '
            </td>
         </tr>';

            // 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'] . '" title="' . ($child['new'] ? $txt['new_posts'] : $txt['old_posts']) . ' (' . $txt['board_topics'] . ': ' . comma_format($child['topics']) . ', ' . $txt['posts'] . ': ' . comma_format($child['posts']) . ')">' . $child['name'] . '</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'] ? '<strong>' . $child['link'] . '</strong>' : $child['link'];
               }
               echo '
         <tr>
            <td class="windowbg3 smalltext largepadding"><strong>', $txt['parent_boards'], '</strong>: ', implode(', ', $children), '</td>
         </tr>';
            }
         }
         echo '
      </table>';
      }
      echo '
   </div>';
   }

   if ($context['user']['is_logged'])
   {
      echo '
   <div id="modbuttons_bottom" class="modbuttons clearfix">
      <div id="posticons" class="clearfix marginbottom">
         <div class="smalltext floatleft" style="margin-left: 1.1em; margin-top: 1em;">
            <img src="', $settings['images_url'], '/new_some.gif" alt="" align="middle" /> ', $txt['new_posts'], '
            <img src="', $settings['images_url'], '/new_none.gif" alt="" align="middle" style="margin-left: 4ex;" /> ', $txt['old_posts'], '
         </div>';

         // Mark read button.
         $mark_read_button = array(
            'markread' => array('text' => 'mark_as_read', 'image' => 'markread.gif', 'lang' => true, 'url' => $scripturl . '?action=markasread;sa=all;' . $context['session_var'] . '=' . $context['session_id']),
         );

         // Show the mark all as read button?
         if ($settings['show_mark_read'] && !empty($context['categories']))
            template_button_strip($mark_read_button, 'top');

         echo '
         </div>
   </div>';
   }

   template_info_center();
}

emeric1

Eski haline döndürmek için kodu silip sizin bulun yazdığınız kodu yapıştırmıştım tekrar şimdi tema ayrıştırma hatası diyor napmalıyım

arzum

Selam...Arkadaşlar alt başlıkları alt alta yapmak istiyorum ama Nostalji temasını kullanıyorum...Bu kodları kullansam bir sorun olur mu? Daha öncede yazdım ama cevap veren olmadı...Lütfen bilgi verebilirmisiniz?

Emre A.

Quote from: arzum on September 26, 2010, 12:05:42 PM
Selam...Arkadaşlar alt başlıkları alt alta yapmak istiyorum ama Nostalji temasını kullanıyorum...Bu kodları kullansam bir sorun olur mu? Daha öncede yazdım ama cevap veren olmadı...Lütfen bilgi verebilirmisiniz?

kodları verilen yerlere (uygun yerlere) ekleyin. Sorun olmaz. Verilen kodlar temanızda yoksa xx temanızdaki BoardIndex dosyasını ekte verin yapalım

Basyigit45


arzum

Quote from: Emre Y on September 26, 2010, 01:35:18 PM

kodları verilen yerlere (uygun yerlere) ekleyin. Sorun olmaz. Verilen kodlar temanızda yoksa xx temanızdaki BoardIndex dosyasını ekte verin yapalım

ekledim aynen ama bu şekilde hata verdi malesef :(

You don't have permission to access /forum/index.php on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

Arkadaş

Quote from: Yağız... on December 28, 2008, 11:00:19 AM
Quote from: gurbetci on December 28, 2008, 10:41:04 AM
<td colspan="5" class="windowbg', !empty($settings['seperate_sticky_lock']) ? '3' : '', '">

usta "0"  yaptim hatta kalkti..

Pekala baslarina nasil resim ekleriz?
Bulun:
                     $children[] = $child['new'] ? '<b>' . $child['link'] . '</b>' : $child['link'];
Değiştirin:
                     $children[] = $child['new'] ? '<img style="margin-right:5px;" src="' . $settings['images_url'] . '/onk.gif" alt="' . $txt[333] . '"/><b>' . $child['link'] . '</b>' : '<img style="margin-right:5px;" src="' . $settings['images_url'] . '/offk.gif" alt="' . $txt[334] . '"/>' . $child['link'];
Yeni mesaj varken onk.gif, yokken offk.gif gözükür. Ona göre images klasörüne iki tane resim atın.

bu kodu uyguladımda forum hata mesajlarıyla dolup taşıyor :(

korsanTURK

yakında ben yayınlaacağım mod kurmadan sadece kodlarda değişiklik yaparak uzun zamandır bu işleri bırakmıştım tekrar dönme kararı aldım yarım klan temamıda bitireceğim:)

Yağız...

Quote from: Oyunindir.ws on October 23, 2010, 09:40:26 AM
Quote from: Yağız... on December 28, 2008, 11:00:19 AM
Quote from: gurbetci on December 28, 2008, 10:41:04 AM
<td colspan="5" class="windowbg', !empty($settings['seperate_sticky_lock']) ? '3' : '', '">

usta "0"  yaptim hatta kalkti..

Pekala baslarina nasil resim ekleriz?
Bulun:
                     $children[] = $child['new'] ? '<b>' . $child['link'] . '</b>' : $child['link'];
Değiştirin:
                     $children[] = $child['new'] ? '<img style="margin-right:5px;" src="' . $settings['images_url'] . '/onk.gif" alt="' . $txt[333] . '"/><b>' . $child['link'] . '</b>' : '<img style="margin-right:5px;" src="' . $settings['images_url'] . '/offk.gif" alt="' . $txt[334] . '"/>' . $child['link'];
Yeni mesaj varken onk.gif, yokken offk.gif gözükür. Ona göre images klasörüne iki tane resim atın.

bu kodu uyguladımda forum hata mesajlarıyla dolup taşıyor :(
O kodlar SMF 2.0 RC3 sürümüne uyumlu değil.

korsanTURK

Quote from: Oyunindir.ws on October 23, 2010, 09:40:26 AM
Quote from: Yağız... on December 28, 2008, 11:00:19 AM
Quote from: gurbetci on December 28, 2008, 10:41:04 AM
<td colspan="5" class="windowbg', !empty($settings['seperate_sticky_lock']) ? '3' : '', '">

usta "0"  yaptim hatta kalkti..

Pekala baslarina nasil resim ekleriz?
Bulun:
                     $children[] = $child['new'] ? '<b>' . $child['link'] . '</b>' : $child['link'];
Değiştirin:
                     $children[] = $child['new'] ? '<img style="margin-right:5px;" src="' . $settings['images_url'] . '/onk.gif" alt="' . $txt[333] . '"/><b>' . $child['link'] . '</b>' : '<img style="margin-right:5px;" src="' . $settings['images_url'] . '/offk.gif" alt="' . $txt[334] . '"/>' . $child['link'];
Yeni mesaj varken onk.gif, yokken offk.gif gözükür. Ona göre images klasörüne iki tane resim atın.

bu kodu uyguladımda forum hata mesajlarıyla dolup taşıyor :(

http://forum.birhayaldi.com/index.php  burda çoğu şey modsuz kurulu 1 hafta içinde yeniden yaptığım temamı onaya göndereceğim burda dediklerin var alt bölümler vs..vs..

hebun

hocam kullandıgım temaya uyumlu kodlar bunlar ;
Stun sayısını ve stun aralıgını nasıl degiştirebilirim teşekkürler.




Quote from: Yağız... on March 02, 2009, 07:33:06 AM
Bulun:
foreach ($board['children'] as $child)
{
$child['link'] = '<a href="' . $child['href'] . '" title="' . ($child['new'] ? $txt[333] : $txt[334]) . ' (' . $txt[330] . ': ' . $child['topics'] . ', ' . $txt[21] . ': ' . $child['posts'] . ')">' . $child['name'] . '</a>';
$children[] = $child['new'] ? '<b>' . $child['link'] . '</b>' : $child['link'];
}

echo '
<div style="padding-top: 1px;" class="smalltext"><i>', $txt['parent_boards'], ': ', implode(', ', $children), '</i></div>';
}

Değiştirin:

$sayac=0;
foreach ($board['children'] as $child)
{
$child['link'] = '<a href="' . $child['href'] . '" title="' . ($child['new'] ? $txt[333] : $txt[334]) . ' (' . $txt[330] . ': ' . $child['topics'] . ', ' . $txt[21] . ': ' . $child['posts'] . ')">' . $child['name'] . '</a>';
$children[] = $child['new'] ? '<b>' . $child['link'] . '</b>' : $child['link'];
$sayac++;
}

echo '
<div style="padding-top: 1px;" class="smalltext">
<table>
<tr>
<td valign="top">
<span class="smalltext"><b>', $txt['parent_boards'], '</b>:<br/>';
for($sayac2 = 0 ; $sayac2 < ceil($sayac/2);$sayac2++)
echo $children[$sayac2], '<br/>';
echo '
</span>
</td>
<td width="30"> </td>
<td valign="top">
<span class="smalltext"><br/>';
for(; $sayac2 < $sayac ; $sayac2++)
echo $children[$sayac2], '<br/>';
echo '
</span>
</td>
</tr>
</table>
</div>';
}


hebun

Yağız  Hocam niyetim flood yapmak degil ama bi yardımcı olursanız çok sevinirim teşekkürler.

Advertisement: