News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

Alinhar Sub-Quadros

Started by LorenciaMaker, June 06, 2011, 01:21:49 PM

Previous topic - Next topic

LorenciaMaker

Bom gente tive pesquisando sobre um mod que deixe a lista de sub quadros alinhadas em 2 colunas, pois ela fica em só uma linha e fica meio desorganizado.

Irei da um exemplo de como ta e como queria que ficasse.

Como esta:
Sub-Quadro: Mu [Server], Mu [Sites], Mu [Client], Barzinho de Lorencia, Mu [ SQL, Jobs, Scripts e Querys ], Mu [ Utilitários ], Mu [ Skins & Customizações ]

Queria saber se tem como ele ficar assim:

Mu [Server]                Mu [Sites]
Mu [Client]                 Barzinho de Lorencia


Assim Por diante. bom axei um tal de: mod Aling child Boards so que esta dando notfoud aqui , procurei por outro achei um: Tidy Child Boards mais não funcionou aqui fala que esta corrompido.

Bom se poderem mim ajudar ficarei grato =D

Aguardando uma resposta =D

BÉLVI®

Boa tarde amigo usuario smf, então eu uso uma modificação em meu forum não mod e sim que eu mesmo modifiquei o código

em bordindex.template.php procure por

/* 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'] ? '<strong>' . $child['link'] . '</strong>' : $child['link'];
}
echo '
<tr id="board_', $board['id'], '_children">
<td colspan="3" class="children windowbg">
<strong>', $txt['parent_boards'], '</strong>: ', implode(', ', $children), '
</td>
</tr>';
}
}
}
echo '
</tbody>
<tbody class="divider">
<tr>
<td colspan="4"></td>
</tr>
</tbody>';


Substitua por

/* 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']) . ' (' . $txt['board_topics'] . ': ' . $child['topics'] . ', ' . $txt['posts'] . ': ' . $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'] ? '<img style="margin-right:5px;" src="' . $settings['images_url'] . '/on.gif" width="12" height="12" alt="' . $txt[333] . '"/><strong>' . $child['link'] . '</strong>' : '<img style="margin-right:5px;" src="' . $settings['images_url'] . '/off.gif" width="12" height="12" alt="' . $txt[334] . '"/>' . $child['link'];
                  $sayac++;
               }
               echo '
         <tr>
            <td class="windowbg3 smalltext largepadding">
         <table style="float:right; padding-left:10px;margin-top: 15px;" width="97%" cellspacing="0" cellpadding="3" border="0">
                  <tr>
                     <td style="width:50%" valign="top">
                        <strong>', $txt['parent_boards'], '</strong>:<br/>';
                     for($sayac2 = 0 ; $sayac2 < ceil($sayac/2);$sayac2++)
                        echo $children[$sayac2], '<br/>';
                     echo '
                     </td>
                     <td style="width:60%" valign="top">
                        <br/>';
                     for(; $sayac2 < $sayac ; $sayac2++)
                        echo $children[$sayac2], '<br/>';
                     echo '
                     </td>
                  </tr>
               </table>
            </td>


Só lembrando que essa modificação minha só funciona em 2.0 nunca testei em oitras versões blz forte abraço.
...:::sou eu...............o mesmo de sempre:::...

Usuario UFSXHWK, BB5 KING, MX-KEY, Setools Box 3 ativada LGETool.

XPeria X8 android 2.3.7 baseband 015 Kernel 2.6.29 SEMCUser@SEMCHost #1 Vmod GingerDX NVv021

LorenciaMaker

Melhor mim passa todo o codigo, axo que pode funcionar. tentei por o codigo mais axo que eu não consigo. poso lhe passar todo o codigo e voce pode colocalo para mim , nao tenho experiencia nisso =X

Erro que deu:

O ficheiro que está a tentar gravar gerou o seguinte erro:
Parse error: syntax error, unexpected ',' in BoardIndex.template.php on line 215


Codigo:

function template_main()
{
   global $context, $settings, $options, $txt, $scripturl, $modSettings;

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

   // Show the news fader?  (assuming there are things to show...)
   if ($settings['show_newsfader'] && !empty($context['fader_news_lines']))
   {
      echo '
   <div id="newsfader">
      <div class="cat_bar">
         <h3 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>
      <ul class="reset" id="smfFadeScroller"', empty($options['collapse_news_fader']) ? '' : ' style="display: none;"', '>';

         foreach ($context['news_lines'] as $news)
            echo '
         <li>', $news, '</li>';

   echo '
      </ul>
   </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\',
         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: [
            \'smfFadeScroller\'
         ],
         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>';
   }

   echo '
   <div id="boardindex_table">';

   /* 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 '
      <table class="table_list">
         <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>
               </td>
            </tr>
         </tbody>
      </table>
      <table class="table_list separate_cats">
         <tbody class="content" id="category_', $category['id'], '_boards">';

      // Assuming the category hasn't been collapsed...
      if (!$category['is_collapsed'])
      {
     
      // Titles Board,topic,post,etc.
      echo'
        <tr class="sub_cat">
         <td class="icon">&nbsp;</td>
         <td class="board_title">',$txt['board'],'</td>
         <td class="stats">&nbsp;</td>
         <td class="lastpost">',$txt['last_post'],'</td>
        </tr>';
       
         /* 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 id="board_', $board['id'], '" class="windowbg2', !empty($board['children']) ? ' borderchild' : '', '">
               <td class="icon windowbg"', !empty($board['children']) ? ' rowspan="2"' : '', '>
                  <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'], '/', $context['theme_variant_url'], 'on', $board['new'] ? '' : '2', '.png" alt="', $txt['new_posts'], '" title="', $txt['new_posts'], '" />';
            // Is it a redirection board?
            elseif ($board['is_redirect'])
               echo '
                     <img src="', $settings['images_url'], '/', $context['theme_variant_url'], 'redirect.png" alt="*" title="*" />';
            // No new posts at all! The agony!!
            else
               echo '
                     <img src="', $settings['images_url'], '/', $context['theme_variant_url'], 'off.png" alt="', $txt['old_posts'], '" title="', $txt['old_posts'], '" />';

            echo '
                  </a>
               </td>
               <td class="info">
                  <a class="subject" 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 '

                  <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 class="stats windowbg', $board['is_redirect'] ? ' redirect':'','">
                  <p>', $board['is_redirect'] ? $txt['redirects']: $txt['posts'], ': ', comma_format($board['posts']), '<br />
                  ', $board['is_redirect'] ? '' : $txt['board_topics'].': '.comma_format($board['topics']) . '';
                  echo '
                  </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><span>', $board['last_post']['link'], '</span><br />
                  ', $txt['by'], ' ', $board['last_post']['member']['link'] , '<br />                 
                  ', $board['last_post']['time'],'
                  </p>';
               else echo '- - - - -';
            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'] . '" ' . ($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'] ? '<strong>' . $child['link'] . '</strong>' : $child['link'];
               }
               echo '
               <tr id="board_', $board['id'], '_children">
                  <td colspan="3" class="children windowbg">
                     <strong>', $txt['parent_boards'], '</strong>: ', implode(', ', $children), '
                  </td>
               </tr>';
            }
         }
      }
      echo '
         </tbody>
         <tbody class="divider">
            <tr>
               <td colspan="4">
               <div class="bot_bar">
               <span></span></div>
               </td>
            </tr>
         </tbody>
      </table>';
   }
   echo '
   </div>';

   if ($context['user']['is_logged'])
   {
      echo '
   <div id="posting_icons" class="floatleft">';

      // 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']),
      );

      echo '
      <ul class="reset">
         <li class="floatleft"><img src="', $settings['images_url'], '/', $context['theme_variant_url'], 'new_some.png" alt="" /> ', $txt['new_posts'], '</li>
         <li class="floatleft"><img src="', $settings['images_url'], '/', $context['theme_variant_url'], 'new_none.png" alt="" /> ', $txt['old_posts'], '</li>
         <li class="floatleft"><img src="', $settings['images_url'], '/', $context['theme_variant_url'], 'new_redirect.png" alt="" /> ', $txt['redirect_board'], '</li>
      </ul>
   </div>';

      // Show the mark all as read button?
      if ($settings['show_mark_read'] && !empty($context['categories']))
         echo '<div class="mark_read">', template_button_strip($mark_read_button, 'right'), '</div>';
   }
   else
   {
      echo '
   <div id="posting_icons" class="flow_hidden">
      <ul class="reset">
         <li class="floatleft"><img src="', $settings['images_url'], '/new_none.png" alt="" /> ', $txt['old_posts'], '</li>
         <li class="floatleft"><img src="', $settings['images_url'], '/new_redirect.png" alt="" /> ', $txt['redirect_board'], '</li>
      </ul>
   </div>';
   }

   template_info_center();
}




esperando uma ajuda >.<

BÉLVI®

Quote from: LorenciaMaker on June 06, 2011, 02:20:29 PM
Melhor mim passa todo o codigo, axo que pode funcionar. tentei por o codigo mais axo que eu não consigo. poso lhe passar todo o codigo e voce pode colocalo para mim , nao tenho experiencia nisso =X

Erro que deu:

O ficheiro que está a tentar gravar gerou o seguinte erro:
Parse error: syntax error, unexpected ',' in BoardIndex.template.php on line 215


Codigo:

function template_main()
{
   global $context, $settings, $options, $txt, $scripturl, $modSettings;

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

   // Show the news fader?  (assuming there are things to show...)
   if ($settings['show_newsfader'] && !empty($context['fader_news_lines']))
   {
      echo '
   <div id="newsfader">
      <div class="cat_bar">
         <h3 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>
      <ul class="reset" id="smfFadeScroller"', empty($options['collapse_news_fader']) ? '' : ' style="display: none;"', '>';

         foreach ($context['news_lines'] as $news)
            echo '
         <li>', $news, '</li>';

   echo '
      </ul>
   </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\',
         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: [
            \'smfFadeScroller\'
         ],
         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>';
   }

   echo '
   <div id="boardindex_table">';

   /* 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 '
      <table class="table_list">
         <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>
               </td>
            </tr>
         </tbody>
      </table>
      <table class="table_list separate_cats">
         <tbody class="content" id="category_', $category['id'], '_boards">';

      // Assuming the category hasn't been collapsed...
      if (!$category['is_collapsed'])
      {
     
      // Titles Board,topic,post,etc.
      echo'
        <tr class="sub_cat">
         <td class="icon">&nbsp;</td>
         <td class="board_title">',$txt['board'],'</td>
         <td class="stats">&nbsp;</td>
         <td class="lastpost">',$txt['last_post'],'</td>
        </tr>';
       
         /* 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 id="board_', $board['id'], '" class="windowbg2', !empty($board['children']) ? ' borderchild' : '', '">
               <td class="icon windowbg"', !empty($board['children']) ? ' rowspan="2"' : '', '>
                  <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'], '/', $context['theme_variant_url'], 'on', $board['new'] ? '' : '2', '.png" alt="', $txt['new_posts'], '" title="', $txt['new_posts'], '" />';
            // Is it a redirection board?
            elseif ($board['is_redirect'])
               echo '
                     <img src="', $settings['images_url'], '/', $context['theme_variant_url'], 'redirect.png" alt="*" title="*" />';
            // No new posts at all! The agony!!
            else
               echo '
                     <img src="', $settings['images_url'], '/', $context['theme_variant_url'], 'off.png" alt="', $txt['old_posts'], '" title="', $txt['old_posts'], '" />';

            echo '
                  </a>
               </td>
               <td class="info">
                  <a class="subject" 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 '

                  <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 class="stats windowbg', $board['is_redirect'] ? ' redirect':'','">
                  <p>', $board['is_redirect'] ? $txt['redirects']: $txt['posts'], ': ', comma_format($board['posts']), '<br />
                  ', $board['is_redirect'] ? '' : $txt['board_topics'].': '.comma_format($board['topics']) . '';
                  echo '
                  </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><span>', $board['last_post']['link'], '</span><br />
                  ', $txt['by'], ' ', $board['last_post']['member']['link'] , '<br />                 
                  ', $board['last_post']['time'],'
                  </p>';
               else echo '- - - - -';
            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'] . '" ' . ($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'] ? '<strong>' . $child['link'] . '</strong>' : $child['link'];
               }
               echo '
               <tr id="board_', $board['id'], '_children">
                  <td colspan="3" class="children windowbg">
                     <strong>', $txt['parent_boards'], '</strong>: ', implode(', ', $children), '
                  </td>
               </tr>';
            }
         }
      }
      echo '
         </tbody>
         <tbody class="divider">
            <tr>
               <td colspan="4">
               <div class="bot_bar">
               <span></span></div>
               </td>
            </tr>
         </tbody>
      </table>';
   }
   echo '
   </div>';

   if ($context['user']['is_logged'])
   {
      echo '
   <div id="posting_icons" class="floatleft">';

      // 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']),
      );

      echo '
      <ul class="reset">
         <li class="floatleft"><img src="', $settings['images_url'], '/', $context['theme_variant_url'], 'new_some.png" alt="" /> ', $txt['new_posts'], '</li>
         <li class="floatleft"><img src="', $settings['images_url'], '/', $context['theme_variant_url'], 'new_none.png" alt="" /> ', $txt['old_posts'], '</li>
         <li class="floatleft"><img src="', $settings['images_url'], '/', $context['theme_variant_url'], 'new_redirect.png" alt="" /> ', $txt['redirect_board'], '</li>
      </ul>
   </div>';

      // Show the mark all as read button?
      if ($settings['show_mark_read'] && !empty($context['categories']))
         echo '<div class="mark_read">', template_button_strip($mark_read_button, 'right'), '</div>';
   }
   else
   {
      echo '
   <div id="posting_icons" class="flow_hidden">
      <ul class="reset">
         <li class="floatleft"><img src="', $settings['images_url'], '/new_none.png" alt="" /> ', $txt['old_posts'], '</li>
         <li class="floatleft"><img src="', $settings['images_url'], '/new_redirect.png" alt="" /> ', $txt['redirect_board'], '</li>
      </ul>
   </div>';
   }

   template_info_center();
}




esperando uma ajuda >.<

me passa o teu bordindex.template.php que eu faço a modificação
...:::sou eu...............o mesmo de sempre:::...

Usuario UFSXHWK, BB5 KING, MX-KEY, Setools Box 3 ativada LGETool.

XPeria X8 android 2.3.7 baseband 015 Kernel 2.6.29 SEMCUser@SEMCHost #1 Vmod GingerDX NVv021

LorenciaMaker

Adicione meu MSN que te passo! mais rapido =D

[email protected]

BÉLVI®

Quote from: LorenciaMaker on June 06, 2011, 02:40:06 PM
Adicione meu MSN que te passo! mais rapido =D

[email protected]

desculpe-me amigo se quiser ajudo aqui pelo forum pelo msn não pois devemos deixar todas as duvidas e soluções para novos usuarios pesquisarem
...:::sou eu...............o mesmo de sempre:::...

Usuario UFSXHWK, BB5 KING, MX-KEY, Setools Box 3 ativada LGETool.

XPeria X8 android 2.3.7 baseband 015 Kernel 2.6.29 SEMCUser@SEMCHost #1 Vmod GingerDX NVv021

LorenciaMaker

Bom ta ai o Board Index.template , ta em anexo!

BÉLVI®

Quote from: LorenciaMaker on June 06, 2011, 03:15:59 PM
Bom ta ai o Board Index.template , ta em anexo!

Qual a versão do seu SMF e qual tema esta a usar ?
...:::sou eu...............o mesmo de sempre:::...

Usuario UFSXHWK, BB5 KING, MX-KEY, Setools Box 3 ativada LGETool.

XPeria X8 android 2.3.7 baseband 015 Kernel 2.6.29 SEMCUser@SEMCHost #1 Vmod GingerDX NVv021

LorenciaMaker

Estou a usar um tema  Próprio , comprei customizado! , nome dele é uma especia de imitação do FunkFresh.

Minha versão é 2.0 RC5 , tem algum problema?

BÉLVI®

#9
Quote from: LorenciaMaker on June 06, 2011, 03:37:01 PM
Estou a usar um tema  Próprio , comprei customizado! , nome dele é uma especia de imitação do FunkFresh.

Minha versão é 2.0 RC5 , tem algum problema?

não, não a nenhum problema update bordindex.template.php tenha sempre um backup feito dos arquivos blz  qualquer coisa estou aqui
...:::sou eu...............o mesmo de sempre:::...

Usuario UFSXHWK, BB5 KING, MX-KEY, Setools Box 3 ativada LGETool.

XPeria X8 android 2.3.7 baseband 015 Kernel 2.6.29 SEMCUser@SEMCHost #1 Vmod GingerDX NVv021

LorenciaMaker

#10
Bom o Anexo esta dando erro :S , nao esta baixando o arquiv , só vem o Rar e nada dentro =X , ver se consegue arrumar ai!

EDIT__________

CONSEGUIR PEGAR , SO QE DA ERRO DE TEMPLATE! Não sei se é o arquivo ou é o forum, deu um erro de template tipo: Pedindo para atualizar a pagina ou acessar o arquivo direto. algo do tipo. não sei oque deu.


HELP-ME!

BÉLVI®

Quote from: LorenciaMaker on June 06, 2011, 04:01:42 PM
Bom o Anexo esta dando erro :S , nao esta baixando o arquiv , só vem o Rar e nada dentro =X , ver se consegue arrumar ai!

EDIT__________

CONSEGUIR PEGAR , SO QE DA ERRO DE TEMPLATE! Não sei se é o arquivo ou é o forum, deu um erro de template tipo: Pedindo para atualizar a pagina ou acessar o arquivo direto. algo do tipo. não sei oque deu.


HELP-ME!

deixa a url do teu forum para eu acessar
...:::sou eu...............o mesmo de sempre:::...

Usuario UFSXHWK, BB5 KING, MX-KEY, Setools Box 3 ativada LGETool.

XPeria X8 android 2.3.7 baseband 015 Kernel 2.6.29 SEMCUser@SEMCHost #1 Vmod GingerDX NVv021

LorenciaMaker


BÉLVI®

...:::sou eu...............o mesmo de sempre:::...

Usuario UFSXHWK, BB5 KING, MX-KEY, Setools Box 3 ativada LGETool.

XPeria X8 android 2.3.7 baseband 015 Kernel 2.6.29 SEMCUser@SEMCHost #1 Vmod GingerDX NVv021

LorenciaMaker

Sim sim , mais como posso alinhar esses sub-quadros? =X , não vai ter como ?

BÉLVI®

tem sim estou testando aqui pois eu vi que vc usa um tema do skinmod.eu estou baixando um aqui para testa em meu host assim que conseguir posto aqui está me dando o erro em PHP Parse error: syntax error, unexpected $estou tentando resolver assim que tiver a resposta eu posto a você, e se alguem com mais ex poder ajudar agradeço pois só uso tema defaut não uso tema modificado por terceiros sem conta que esses temas são free e usa muita coisa diferente
...:::sou eu...............o mesmo de sempre:::...

Usuario UFSXHWK, BB5 KING, MX-KEY, Setools Box 3 ativada LGETool.

XPeria X8 android 2.3.7 baseband 015 Kernel 2.6.29 SEMCUser@SEMCHost #1 Vmod GingerDX NVv021

LorenciaMaker

Bom tomara que consiga resolver o erro =D , aguardo uma resposta concreta =D

BÉLVI®

Quote from: LorenciaMaker on June 06, 2011, 04:39:00 PM
Bom tomara que consiga resolver o erro =D , aguardo uma resposta concreta =D

Tudo bem estou tentando acho que hoje ficara meio dificil de terminar pois está na minha hora de ir ao trabalho no meu profile tem meu forum você pode verificar que eu uso mesmo a modificação que eu mesmo fiz mais eu uso thema defaut
...:::sou eu...............o mesmo de sempre:::...

Usuario UFSXHWK, BB5 KING, MX-KEY, Setools Box 3 ativada LGETool.

XPeria X8 android 2.3.7 baseband 015 Kernel 2.6.29 SEMCUser@SEMCHost #1 Vmod GingerDX NVv021

Darkness_Black

Pode retirar esta linha com este MOD http://custom.simplemachines.org/mods/index.php?mod=2864
E fazer manualmente em html, no quadro onde cria foruns, assim cria a area principal onde mostra no indice do forum e faz os sub-foruns linkados como no meu forum.

Ou ainda usar este mod que pode ser configurado quantas colunas pode mostrar no sub forum

http://custom.simplemachines.org/mods/index.php?mod=2294

Se algum lhe for util, posso traduzir pra ti.

Translator - Brazilian

Não respondo MP de ajuda, Poste sua duvida no forum!!! Se alguém te Ajudou Agradeça!!!

LorenciaMaker

Darkness_Black

O Segundo é útil para mim , ele mesmo que estava tentando instalar. so que aqui ele nao funciona ,quando baixo ele e na hora que boto para instalar , ele diz que esta corrompido , e nao instala. se você souber instalar posso criar uma conta administradora teste em meu forum pra ti e você tenta instalar. por que so sei instalar por ali , manualmente nunca conseguir , e ja vir uns bons tutoriais e não consigo , se voce poder fazer essa gentileza para mim agradeceria imensamente =D


Aguardando resposta.

Advertisement: