ติดต่อลงโฆษณา [email protected]

แสดงกระทู้

ส่วนนี้จะช่วยให้คุณสามารถดูกระทู้ทั้งหมดสมาชิกนี้ โปรดทราบว่าคุณสามารถเห็นเฉพาะกระทู้ในพื้นที่ที่คุณเข้าถึงในขณะนี้


ข้อความ - dekhong2

หน้า: [1]
1
โค้ด index.template.php ตามนี้ครับ (ผมได้แนบไฟล์มาให้ด้วยนะครับ)




   // Show the start of the tab section.

   echo '
   <ul>';


   // Show the [main] button.
   echo ($current_action=='MainSite' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '">&nbsp;</td>' : '' , '
            <td valign="top" class="maintab_' , $current_action == 'MainSite' ? 'active_back' : 'back' , '">
               <a href="../">', $txt['MainSite'] ,'[/url]
            </td>' , $current_action == 'MainSite' ? '<td class="maintab_active_' . $last . '">&nbsp;</td>' : '';


   // Show the [home] button.
   echo   '<li><a href="', $scripturl, '">' , $txt[103] , '[/url]</li>';
      
   // Show the [help] button.
   echo   '<li><a href="', $scripturl, '?action=help">' , $txt[119] , '[/url]</li>';

   // How about the [search] button?
   if ($context['allow_search'])
      echo '<li><a href="', $scripturl, '?action=search">' , $txt[182] , '[/url]</li>';

   // Is the user allowed to administrate at all? ([admin])
   if ($context['allow_admin'])
      echo   '<li><a href="', $scripturl, '?action=admin">' , $txt[2] , '[/url]</li>';

   // Edit Profile... [profile]
   if ($context['allow_edit_profile'])
      echo '<li><a href="', $scripturl, '?action=profile">' , $txt[79] , '[/url]</li>';

   // Go to PM center... [pm]
   if ($context['user']['is_logged'] && $context['allow_pm'])
      echo '<li><a href="', $scripturl, '?action=pm">' , $txt['pm_short'] , ' ', $context['user']['unread_messages'] > 0 ? '[<strong>'. $context['user']['unread_messages'] . '</strong>]' : '' , '[/url]</li>';

   // The [calendar]!
   if ($context['allow_calendar'])
      echo '<li><a href="', $scripturl, '?action=calendar">' , $txt['calendar24'] , '[/url]</li>';

   // the [member] list button
   if ($context['allow_memberlist'])
      echo '<li><a href="', $scripturl, '?action=mlist">' , $txt[331] , '[/url]</li>';


   // If the user is a guest, show [login] button.
   if ($context['user']['is_guest'])
      echo '<li><a href="', $scripturl, '?action=login">' , $txt[34] , '[/url]</li>';


   // If the user is a guest, also show [register] button.
   if ($context['user']['is_guest'])
      echo '<li><a href="', $scripturl, '?action=register">' , $txt[97] , '[/url]</li>';


   // Otherwise, they might want to [logout]...
   if ($context['user']['is_logged'])
      echo '<li><a href="', $scripturl, '?action=logout;sesc=', $context['session_id'], '">' , $txt[108] , '[/url]</li>';

   echo '</ul>';


}

// Generate a strip of buttons.
function template_button_strip($button_strip, $direction = 'top', $force_reset = false, $custom_td = '')
{
   global $settings, $buttons, $context, $txt, $scripturl;

   // Create the buttons...
   foreach ($button_strip as $key => $value)
   {
      if (isset($value['test']) && empty($context[$value['test']]))
      {
         unset($button_strip[$key]);
         continue;
      }
      elseif (!isset($buttons[$key]) || $force_reset)
         $buttons[$key] = '<a href="' . $value['url'] . '" ' .( isset($value['custom']) ? $value['custom'] : '') . '>' . $txt[$value['text']] . '[/url]';

      $button_strip[$key] = $buttons[$key];
   }

   if (empty($button_strip))
      return '<td>&nbsp;</td>';

   echo '
      <td class="', $direction == 'top' ? 'main' : 'mirror', 'tab_' , $context['right_to_left'] ? 'last' : 'first' , '">&nbsp;</td>
      <td class="', $direction == 'top' ? 'main' : 'mirror', 'tab_back">', implode(' &nbsp;|&nbsp; ', $button_strip) , '</td>
      <td class="', $direction == 'top' ? 'main' : 'mirror', 'tab_' , $context['right_to_left'] ? 'first' : 'last' , '">&nbsp;</td>';
}
?>

2
ผมเพิ่มเมนูตามที่ค้นหาเจอแล้วครับ แต่ประสบปัญหาครับ
เมนูส่วนเดิมตกลงมาข้างล่างหมดเลยครับ ขอวิธีแก้ไขด้วยครับ

ตัวอย่างตามภาพครับ

3
ผมจะเพิ่มเมนูตามรูปภาพนี้ยังไงครับ



ขอบคุณท่านผู้รู้ล่วงหน้าครับ




หน้า: [1]