2012-02-25 71 views
0

我有叫Sj_news25一個Joomla 2.5模板工作 - 在這裏看到演示http://demo.smartaddons.com/templates/joomla17/sj-news/與YT框架的Joomla模塊位置

我想要做的是什麼地方創建的徽標和搜索框之間的模塊的位置,所以我可以適合那裏的語言切換器標誌。我以前在http://docs.joomla.org/How_do_you_add_a_new_module_position%3F上使用過一個教程,並且工作正常,但該模板使用所謂的「Yt框架」,當我查看index.php文件時,我很難過。有沒有人可以冒險猜測?謝謝!

<?php 
/**************************************************************************************** 
* @copyright Copyright (C) 2005 - 2010 Open Source Matters. All rights reserved. 
* @license GNU/GPL, see LICENSE.php 
* Yt Framework 
****************************************************************************************/ 

// no direct access 
defined('_JEXEC') or die('Restricted access'); 
include_once (dirname(__FILE__).DS.'includes'.DS.'yt_template.class.php'); 
include_once (dirname(__FILE__).DS.'includes'.DS.'frame_inc.php'); 

?> 

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $this->language; ?>" <?php echo ($ytrtl == 'rtl')?'dir="rtl"':''; ?> lang="<?php echo $this->language; ?>"> 
<head> 
    <jdoc:include type="head" /> 
</head> 

<body id="<?php echo $yt->template; ?>" class="<?php echo $yt->isHomePage()?'homepage ':''; 
         echo isset($_GET['option'])?$_GET['option'].' ':''; 
         echo isset($_GET['view'])?'view-'.$_GET['view'].' ':''; 
         echo $yt->getParam('sitestyle').' '; 
         echo $ytrtl=='rtl'?'rtl'.' ':''; 
         echo $yt->getParam('menustyle').' '; 
         echo 'fs'.$yt->getParam('fontsize'); ?>"> 

    <div id="yt-wrapper"><div id="yt-wrapper-inner1"><div id="yt-wrapper-inner2"> 
    <?php 
    // add mobile head          
    if($yt->is_mobile){ 
     include_once (dirname(__FILE__).DS.'includes'.DS.'mobile_head.php'); 
    }  
    ?> 
    <a id="top" name="scroll-to-top"></a> 
    <?php 
    foreach($yt_render->arr_TB as $tagBD): if($tagBD["countModules"] > 0){ 
    if(($tagBD["name"] == 'content')){ // Block content - #content ?> 
    <div id="<?php echo $tagBD["id"]; ?>" class="<?php echo $yt_render->layouttype.$tagBD['class_content'];?>"> 
      <?php 
     // 
     if($tagBD['showDivTop']=='1'){ ?> 
      <div class="yt-main yt-div-top-1"><div class="yt-div-top-2"><div class="yt-div-top-3"></div></div></div> 
      <?php } ?> 
     <div class="yt-main"><div class="yt-main-in1"><div class="yt-main-in2 clearfix"> 
      <?php 
     $countL = $countR = $countM = $countCL1 = $countCL2 = 0; 
     foreach($tagBD['positions'] as $position): 
      if(isset($position['column']) && $position['column'] == 'yt-col1'){ 
      $countCL1++; 
      if($countCL1==1){ 
      ?> 
      <div id="yt-col1" style="float:left; width:<?php echo $yt_render->cinfo['w-yt-col1']; ?>;<?php echo $yt_render->cinfo['display-yt-col1']; ?>"> 
      <?php 
       include (dirname(__FILE__).DS.'includes'.DS.'block-content.php'); 
       if($tagBD['count-yt-col1']==1){ 
       ?> 
      </div> 
       <?php 
       } 
      }elseif($countCL1==$tagBD['count-yt-col1'] && $tagBD['count-yt-col1']>1){ 
       include (dirname(__FILE__).DS.'includes'.DS.'block-content.php'); 
      ?> 
      </div> 
      <?php 
      }else{ 
       include (dirname(__FILE__).DS.'includes'.DS.'block-content.php'); 
      } 
      }elseif(isset($position['column']) && $position['column'] == 'yt-col2'){ 
      $countCL2++; 
      if($countCL2==1){ 
      ?> 
      <div id="yt-col2" style="float:right; width:<?php echo $yt_render->cinfo['w-yt-col2']; ?>;<?php echo $yt_render->cinfo['display-yt-col2']; ?>"> 
      <?php 
       include (dirname(__FILE__).DS.'includes'.DS.'block-content.php'); 
       if($tagBD['count-yt-col2']==1){ 
       ?> 
      </div> 
       <?php 
       } 
      }elseif($countCL2==$tagBD['count-yt-col2'] && $tagBD['count-yt-col2']>1){ 
       include (dirname(__FILE__).DS.'includes'.DS.'block-content.php'); 
       ?> 
      </div> 
       <?php 
      }else{ 
       include (dirname(__FILE__).DS.'includes'.DS.'block-content.php'); 
      } 
      }else{ 
      include (dirname(__FILE__).DS.'includes'.DS.'block-content.php'); 
      } 
     endforeach; //End foreach position of block content 
      ?>  
     </div></div></div> 

     <?php 
     // 
     if($tagBD['showDivBottom']=='1'){ ?> 
     <div class="yt-main yt-div-bottom-1"><div class="yt-div-bottom-2"><div class="yt-div-bottom-3"></div></div></div> 
     <?php } ?> 

     </div> 
    <?php 
    }elseif($tagBD["name"] != 'content'){ // Block is not content 
    ?>  
    <div id="<?php echo $tagBD["id"]; ?>"> 
     <div class="yt-main"><div class="yt-main-in1"><div class="yt-main-in2 clearfix"> 
     <?php 
     if(!empty($tagBD["hasGroup"]) && $tagBD["hasGroup"]=="1"){ // Tag Body has group 
     $flag = ''; $openG = 0; $c = 0; 
     foreach($tagBD['positions'] as $posFG): $c = $c+1; 
      if($posFG['group'] != "" && $posFG['group']!= $flag){ 
      $flag = $posFG['group']; 
         if($openG == 0){ $openG =1;?> 
         <div class="group-<?php echo $flag.$tagBD['class_groupnormal'];?> clearfix" style="<?php echo isset($tagBD['width-'.$flag])?'width:'.$tagBD['width-'.$flag].'; ':'' ; ?><?php echo $float1;?>">      
       <?php 
       echo $yt->renPositionGroup($posFG); 
       if($c == count($tagBD['positions'])){echo '</div>';} 
      }else{ 
       $openG = 0; 
      ?> 
       </div> 
          <div class="group-<?php echo $flag; ?>" style="width:<?php echo $tagBD['width-'.$flag]; ?>; <?php echo $float1;?>"> 
      <?php 
       echo $yt->renPositionGroup($posFG); 
      } 
      }elseif($posFG['group']!="" && $posFG['group'] == $flag){ 
         echo $yt->renPositionGroup($posFG); 
      if($c == count($tagBD['positions'])){echo '</div>';} 
      }elseif($posFG['group']==""){ 
      if($openG ==1){ 
       $openG = 0; 
       echo '</div>'; 
      } 
      echo $yt->renPositionGroup($posFG); 
      } 
     endforeach; 
     }else{ //Tag Body normal 
     if(isset($tagBD['positions'])){ 
      if(isset($tagBD['autosize'])){ 
      echo $yt->renPositionNormals($tagBD['positions'], $tagBD["countModules"], $tagBD["limited"], $tagBD['autosize']); 
      }else{ 
      echo $yt->renPositionNormals($tagBD['positions'], $tagBD["countModules"], $tagBD["limited"]); 
      } 
     } 
     } 
     ?> 
     </div></div></div> 
    </div> 
<?php 
    } // end elseif($tagBD["name"] != 'content') 
    } 
    endforeach; 
    ?> 
    </div></div></div> 


    <jdoc:include type="modules" name="debug" /> 
    <?php 
    if(!$yt->is_mobile && $yt->getParam('showCpanel')) { 
    include_once (dirname(__FILE__).DS.'includes'.DS.'cpanel.php'); 
    } 
    ?> 
</body> 
</html> 

<?php /*}*/ ?> 

回答

0

請到文件:your_template中/佈局/佈局homepage.xml(或當前佈局)替換代碼:

@logo 頭1 由: @logo your_position 頭1 您可以在此處瞭解有關Yt Framework的更多信息:http://www.smartaddons.com/joomla/templates/yt-framework

+0

匿名用戶:請參閱此處鏈接http://www.smartaddons.com/forum/195-sj-news/2665-how-to-create-new-position – 2012-03-26 14:09:19