TinyPortal

Development => International => Turkish => Topic started by: yetkili on April 04, 2006, 11:24:47 AM

Title: TP nin SMF de default tema dosyalarında değiştirdikleri..
Post by: yetkili on April 04, 2006, 11:24:47 AM
Bu konu ile ilgili dosyaları buraya atalım.İyi kaynak olur kanaatindeyim..teşekkürler.
Title: Re: TP nin SMF de default tema dosyalarında değiştirdikleri..
Post by: yetkili on April 04, 2006, 03:14:32 PM
1.1RC2 default  "index.template.php" nin modsuz hali iÇin deÄŸiÅŸiklik


bul{
        global $context, $settings, $options, $scripturl, $txt, $modSettings;


arkasına ekle// TinyPortal
        if(isset($context['TPortal']['fixed_width'])){
           require_once('SSI.php');
           loadtemplate('TPortalBlocks');
           $context['tportal_on']=true;
        }



bul  // Output any remaining HTML headers. (from mods, maybe?)
        echo $context['html_headers'], '

arkasına ekle <script language="JavaScript" type="text/javascript">
                var current_leftbar = ', empty($options['collapse_leftbar']) ? 'false' : 'true', ';

                function shrinkHeaderLeftbar(mode)
                {';

        // Guests don't have theme options!!
        if ($context['user']['is_guest'])
                echo '
                        document.cookie = "upshrink=" + (mode ? 1 : 0);';
        else
                echo '
                        document.getElementById("upshrinkTempLeftbar").src = "', $scripturl, '?action=jsoption;var=collapse_leftbar;val=" + (mode ? 1 : 0) + ";sesc=', $context['session_id'], ';" + (new Date().getTime());';

        echo '
                        document.getElementById("upshrinkLeftbar").src = smf_images_url + (mode ? "/upshrink2.gif" : "/upshrink.gif");

                        document.getElementById("leftbarHeader").style.display = mode ? "none" : "";

                        current_leftbar = mode;
                }
         // --></script>
        <script language="JavaScript" type="text/javascript"><!--
                var current_rightbar = ', empty($options['collapse_rightbar']) ? 'false' : 'true', ';

                function shrinkHeaderRightbar(mode)
                {';

        // Guests don't have theme options!!
        if ($context['user']['is_guest'])
                echo '
                        document.cookie = "upshrink=" + (mode ? 1 : 0);';
        else
                echo '
                        document.getElementById("upshrinkTempRightbar").src = "', $scripturl, '?action=jsoption;var=collapse_rightbar;val=" + (mode ? 1 : 0) + ";sesc=', $context['session_id'], ';" + (new Date().getTime());';

        echo '
                        document.getElementById("upshrinkRightbar").src = smf_images_url + (mode ? "/upshrink2.gif" : "/upshrink.gif");

                        document.getElementById("rightbarHeader").style.display = mode ? "none" : "";

                        current_rightbar = mode;
                }
       // --></script>




bul<body>';

arkasına ekle// TinyPortal start
     if($context['TPortal']['fixed_width']!=0)
             echo '<table align="center" width="'.$context['TPortal']['fixed_width'].'" cellpadding="0" cellspacing="0" border="0"><tr><td>';

// TinyPortal end


bul// display user name
echo '
<table width="100%" cellpadding="0" cellspacing="0" border="0" >
<tr>';


öncesine ekle// TinyPortal
     if($context['TPortal']['showtop']==1)
     {
// TinyPortal end




bul</div>';


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


öncesine ekle ';
// TinyPortal
       }
//  end
echo '


bul // The main content should go here.
echo '
<div id="bodyarea" style="padding: 1ex 0px 2ex 0px;">';
}


deÄŸiÅŸtir// The main content should go here.  A table is used because IE 6 just can't handle a div.
echo '
<table width="100%" cellpadding="0" cellspacing="0" border="0"><tr>';

// TinyPortal integrated bars
          if($context['TPortal']['leftbar'])
          {
              echo '<td width="' ,$context['TPortal']['leftbar_width'], '" style="padding: ' , isset($context['TPortal']['padding']) ? $context['TPortal']['padding'] : '4' , 'px; padding-top: 4px;padding-right: 1ex;" valign="top">
                 <div id="leftbarHeader"', empty($options['collapse_leftbar']) ? '' : ' style="display: none;"', ' style="padding-top: 5px; width: ' ,$context['TPortal']['leftbar_width'], 'px;">';
                 TPortal_sidebar('left');
              echo '</div></td>';

          }

        echo '<td width="100%" align="left" valign="top" style="padding-top: 10px; padding-bottom: 10px;">';
        if($context['TPortal']['centerbar'])
                     echo '<div>' , TPortal_sidebar('center') , '</div>';
}




bulfunction template_main_below()
{
global $context, $settings, $options, $scripturl, $txt;

echo '
</div>';



deÄŸiÅŸtirfunction template_main_below()
{
global $context, $settings, $options, $scripturl, $txt;

   echo '</td>';

         // TinyPortal integrated bars
          if($context['TPortal']['rightbar']){
              echo '<td style="padding: ' , isset($context['TPortal']['padding']) ? $context['TPortal']['padding'] : '4' , 'px; padding-top: 4px; padding-left: 1ex;" valign="top" align="right">
                 <div id="rightbarHeader"', empty($options['collapse_rightbar']) ? '' : ' style="display: none;"', ' style="width: ' ,$context['TPortal']['rightbar_width'], 'px; text-align: left; padding-top: 5px;">';
              TPortal_rightbar();
              echo '</div></td>';
          }

        echo '</tr></table>';
   
        if (function_exists('smfshout'))
  smfshout();




bul<td valign="middle" align="center" style="white-space: nowrap;">
                                        ', theme_copyright(), '
                                </td>


deÄŸiÅŸtir  <td valign="middle" align="center" style="white-space: nowrap;" class="smalltext">
                                        ', theme_copyright(), ' <br />', tportal_version() , '
                                </td>


bul</body></html>';
}

// Show a linktree. This is that thing that shows "My Community | General Category | General Discussion"..
function theme_linktree()


öncesine ekle
';
// TinyPortal
         echo '</div>';
     if($context['TPortal']['fixed_width']!=0)
             echo '</td></tr></table>';
// end




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


arkasına ekleif($settings['TPortal_front_type']!='boardindex')
// Show the [forum] button.
echo ($current_action=='forum' || $context['browser']['is_ie4']) ? '<td class="maintab_active_first">&nbsp;</td>' : '' , '
<td valign="top" class="maintab_' , $current_action=='forum' ? 'active_back' : 'back' , '">
<a href="', $scripturl, '?action=forum">FORUM</a>
</td>' , $current_action=='forum' ? '<td class="maintab_active_last">&nbsp;</td>' : '';




bul // The end of tab section.
echo '
<td class="maintab_' , $last , '">&nbsp;</td>


arkasından ekle ';
// TinyPortal
if($context['TPortal']['leftbar'])
             echo '<td style="padding-left: 1ex;"><a href="javascript:void(0);" onclick="shrinkHeaderLeftbar(!current_leftbar); return false;"><img id="upshrinkLeftbar" src="', $settings['images_url'], '/', empty($options['collapse_leftbar']) ? 'upshrink.gif' : 'upshrink2.gif', '" alt="*" title="', $txt['upshrink_description'], '" style="margin: 2px 0;" border="0" /></a><img id="upshrinkTempLeftbar" src="', $settings['images_url'], '/blank.gif" alt="" style="margin-right: 0ex;" /></td>';
         if($context['TPortal']['rightbar'])
             echo '<td style="padding-left: 1ex;"><a href="javascript:void(0);" onclick="shrinkHeaderRightbar(!current_rightbar); return false;"><img id="upshrinkRightbar" src="', $settings['images_url'], '/', empty($options['collapse_rightbar']) ? 'upshrink.gif' : 'upshrink2.gif', '" alt="*" title="', $txt['upshrink_description'], '" style="margin: 2px 0;" border="0" /></a><img id="upshrinkTempRightbar" src="', $settings['images_url'], '/blank.gif" alt="" style="margin-right: 0ex;" /></td>';
// TinyPortal end
echo '




TP nin ingilizce forumundaki aÇıklama biraz farklı ve bazı kodlar bulunmuyor.1.1RC2 iÇinde bu değişiklikleri yapıyor..denyenler yazarsa sevinirim.
Title: Re: TP nin SMF de default tema dosyalarında değiştirdikleri..
Post by: cumhurkorkut on April 04, 2006, 07:54:53 PM
Bu Çok iyi olmuş. Çok sorulan bir soru. Sağol. Zaten sadece bu dosyayı düzenlemede sorun Çıkıyor. Tekrar teşekkürler.