Smf Tema İskeleti

Başlatan snrj, 17 May 2014 08:44

« önceki - sonraki »

0 Üye ve 10 Ziyaretçi konuyu incelemekte.

*

  1. 3,090

  2. 584

  3. 982


Index.template.php
Bölümler:

Forum başlığı - SMF Logo
      <div id="top_section">
         <h1 class="forumtitle">
            <a href="', $scripturl, '">', empty($context['header_logo_url_html_safe']) ? $context['forum_name'] : '<img src="' . $context['header_logo_url_html_safe'] . '" alt="' . $context['forum_name'] . '" />', '</a>
         </h1>';

   // the upshrink image, right-floated
   echo '
         <img id="upshrink" src="', $settings['images_url'], '/upshrink.png" alt="*" title="', $txt['upshrink_description'], '" style="display: none;" />';
   echo '
         ', empty($settings['site_slogan']) ? '<img id="smflogo" src="' . $settings['images_url'] . '/smflogo.png" alt="Simple Machines Forum" title="Simple Machines Forum" />' : '<div id="siteslogan" class="floatright">' . $settings['site_slogan'] . '<>', '
      <>

Arama ve haberler.

         <div class="news normaltext">
            <form id="search_form" action="', $scripturl, '?action=search2" method="post" accept-charset="', $context['character_set'], '">
               <input type="text" name="search" value="" class="input_text" />&nbsp;
               <input type="submit" name="submit" value="', $txt['search'], '" class="button_submit" />
               <input type="hidden" name="advanced" value="0" />';

   // Search within current topic?
   if (!empty($context['current_topic']))
      echo '
               <input type="hidden" name="topic" value="', $context['current_topic'], '" />';
   // If we're on a certain board, limit it to this board.
   elseif (!empty($context['current_board']))
      echo '
               <input type="hidden" name="brd[', $context['current_board'], ']" value="', $context['current_board'], '" />';

   echo '</form>';

   // Show a random news item? (or you could pick one from news_lines...)
   if (!empty($settings['enable_news']))
      echo '
            <h2>', $txt['news'], ': </h2>
            <p>', $context['random_news_line'], '</p>';

   echo '
         <>


Kullanıcı Alan.

         <div class="user">';

   // If the user is logged in, display stuff like their name, new messages, etc.
   if ($context['user']['is_logged'])
   {
      if (!empty($context['user']['avatar']))
         echo '
            <p class="avatar">', $context['user']['avatar']['image'], '</p>';
      echo '
            <ul class="reset">
               <li class="greeting">', $txt['hello_member_ndt'], ' <span>', $context['user']['name'], '</span></li>
               <li><a href="', $scripturl, '?action=unread">', $txt['unread_since_visit'], '</a></li>
               <li><a href="', $scripturl, '?action=unreadreplies">', $txt['show_unread_replies'], '</a></li>';

      // Is the forum in maintenance mode?
      if ($context['in_maintenance'] && $context['user']['is_admin'])
         echo '
               <li class="notice">', $txt['maintain_mode_on'], '</li>';

      // Are there any members waiting for approval?
      if (!empty($context['unapproved_members']))
         echo '
               <li>', $context['unapproved_members'] == 1 ? $txt['approve_thereis'] : $txt['approve_thereare'], ' <a href="', $scripturl, '?action=admin;area=viewmembers;sa=browse;type=approve">', $context['unapproved_members'] == 1 ? $txt['approve_member'] : $context['unapproved_members'] . ' ' . $txt['approve_members'], '</a> ', $txt['approve_members_waiting'], '</li>';

      if (!empty($context['open_mod_reports']) && $context['show_open_reports'])
         echo '
               <li><a href="', $scripturl, '?action=moderate;area=reports">', sprintf($txt['mod_reports_waiting'], $context['open_mod_reports']), '</a></li>';

      echo '
               <li>', $context['current_time'], '</li>
            </ul>';
   }
   // Otherwise they're a guest - this time ask them to either register or login - lazy bums...
   elseif (!empty($context['show_login_bar']))
   {
      echo '
            <script type="text/javascript" src="', $settings['default_theme_url'], '/scripts/sha1.js"></script>
            <form id="guest_form" action="', $scripturl, '?action=login2" method="post" accept-charset="', $context['character_set'], '" ', empty($context['disable_login_hashing']) ? ' onsubmit="hashLoginPassword(this, \'' . $context['session_id'] . '\');"' : '', '>
               <div class="info">', $txt['login_or_register'], '<>
               <input type="text" name="user" size="10" class="input_text" />
               <input type="password" name="passwrd" size="10" class="input_password" />
               <select name="cookielength">
                  <option value="60">', $txt['one_hour'], '</option>
                  <option value="1440">', $txt['one_day'], '</option>
                  <option value="10080">', $txt['one_week'], '</option>
                  <option value="43200">', $txt['one_month'], '</option>
                  <option value="-1" selected="selected">', $txt['forever'], '</option>
               </select>
               <input type="submit" value="', $txt['login'], '" class="button_submit" /><br />
               <div class="info">', $txt['quick_login_dec'], '<>';

      if (!empty($modSettings['enableOpenID']))
         echo '
               <br /><input type="text" name="openid_identifier" id="openid_url" size="25" class="input_text openid_login" />';

      echo '
               <input type="hidden" name="hash_passwrd" value="" />
            </form>';
   }

   echo '
         <>


Genel Menü

// Show the menu up top. Something like [home] [help] [profile] [logout]...
function template_menu()
{
   global $context, $settings, $options, $scripturl, $txt;

   echo '
      <div id="main_menu">
         <ul class="dropmenu" id="menu_nav">';

   foreach ($context['menu_buttons'] as $act => $button)
   {
      echo '
            <li id="button_', $act, '">
               <a class="', $button['active_button'] ? 'active ' : '', 'firstlevel" href="', $button['href'], '"', isset($button['target']) ? ' target="' . $button['target'] . '"' : '', '>
                  <span class="', isset($button['is_last']) ? 'last ' : '', 'firstlevel">', $button['title'], '</span>
               </a>';
      if (!empty($button['sub_buttons']))
      {
         echo '
               <ul>';

         foreach ($button['sub_buttons'] as $childbutton)
         {
            echo '
                  <li>
                     <a href="', $childbutton['href'], '"', isset($childbutton['target']) ? ' target="' . $childbutton['target'] . '"' : '', '>
                        <span', isset($childbutton['is_last']) ? ' class="last"' : '', '>', $childbutton['title'], !empty($childbutton['sub_buttons']) ? '...' : '', '</span>
                     </a>';
            // 3rd level menus
            if (!empty($childbutton['sub_buttons']))
            {
               echo '
                     <ul>';

               foreach ($childbutton['sub_buttons'] as $grandchildbutton)
                  echo '
                        <li>
                           <a href="', $grandchildbutton['href'], '"', isset($grandchildbutton['target']) ? ' target="' . $grandchildbutton['target'] . '"' : '', '>
                              <span', isset($grandchildbutton['is_last']) ? ' class="last"' : '', '>', $grandchildbutton['title'], '</span>
                           </a>
                        </li>';

               echo '
                     </ul>';
            }

            echo '
                  </li>';
         }
            echo '
               </ul>';
      }
      echo '
            </li>';
   }

   echo '
         </ul>
      <>';
}


Menu Basliklari
   // Show the menu here, according to the menu sub template.
   template_menu();

Ağaç Linkler (linktree)

// Show a linktree. This is that thing that shows "My Community | General Category | General Discussion"..
function theme_linktree($force_show = false)
{
   global $context, $settings, $options, $shown_linktree;

   // If linktree is empty, just return - also allow an override.
   if (empty($context['linktree']) || (!empty($context['dont_default_linktree']) && !$force_show))
      return;

   echo '
   <div class="navigate_section">
      <ul>';

   // Each tree item has a URL and name. Some may have extra_before and extra_after.
   foreach ($context['linktree'] as $link_num => $tree)
   {
      echo '
         <li', ($link_num == count($context['linktree']) - 1) ? ' class="last"' : '', '>';

      // Show something before the link?
      if (isset($tree['extra_before']))
         echo $tree['extra_before'];

      // Show the link, including a URL if it should have one.
      echo $settings['linktree_link'] && isset($tree['url']) ? '
            <a href="' . $tree['url'] . '"><span>' . $tree['name'] . '</span></a>' : '<span>' . $tree['name'] . '</span>';

      // Show something after the link...?
      if (isset($tree['extra_after']))
         echo $tree['extra_after'];

      // Don't show a separator for the last one.
      if ($link_num != count($context['linktree']) - 1)
         echo ' »';

      echo '
         </li>';
   }
   echo '
      </ul>
   <>';

   $shown_linktree = true;
}


inktree kodu
   // Show the navigation tree.
   theme_linktree();


Altbilgi (footer)

   // Show the "Powered by" and "Valid" logos, as well as the copyright. Remember, the copyright must be somewhere!
   echo '
   <div id="footer_section"><div class="frame">
      <ul class="reset">
         <li class="copyright">', theme_copyright(), '</li>
         <li><a id="button_xhtml" href="http://validator.w3.org/check/referer" target="_blank" class="new_win" title="', $txt['valid_xhtml'], '"><span>', $txt['xhtml'], '</span></a></li>
         ', !empty($modSettings['xmlnews_enable']) && (!empty($modSettings['allow_guestAccess']) || $context['user']['is_logged']) ? '<li><a id="button_rss" href="' . $scripturl . '?action=.xml;type=rss" class="new_win"><span>' . $txt['rss'] . '</span></a></li>' : '', '
         <li class="last"><a id="button_wap2" href="', $scripturl , '?wap2" class="new_win"><span>', $txt['wap2'], '</span></a></li>
      </ul>';

   // Show the load time?
   if ($context['show_load_time'])
      echo '
      <p>', $txt['page_created'], $context['load_time'], $txt['seconds_with'], $context['load_queries'], $txt['queries'], '</p>';

   echo '
   <><>

Kaynak geçitli


MENU ×