列印模式主題
按這裡檢視本主題的原始格式
購物車研究站 > 重點文章區 > 關於中央首頁的標籤


發表者: oldpa 2012-09-10, 10:23 AM
讓中央首頁自行判斷第一個開啟標籤的內容

做了一些修正
之前下載安裝的朋友請更新檔案

可以重新下載後覆蓋
或只更換templates/twe/javascript/general.js.php

或是將裡面內容用以下程式碼取代
CODE

<?php
/* -----------------------------------------------------------------------------------------
  $Id: general.js.php,v 1.1 2003/09/24 11:31:00 oldpa Exp $

  TWE-Commerce - community made shopping   http://www.oldpa.com.tw
  Copyright (c) 2003 TWE-Commerce
  -----------------------------------------------------------------------------------------   (c) 2003  xt-commerce  www.xt-commerce.com
  Released under the GNU General Public License
---------------------------------------------------------------------------------------*/


  // this javascriptfile get includes at every template page in shop, you can add your template specific
  // js scripts here
if (strstr($PHP_SELF, FILENAME_DEFAULT) && (DEFAULT_TYPE == 'tabbed')) {
?>
<link rel="stylesheet" type="text/css" href="ext/jquery/ui/start/jquery-ui-1.8.16.custom.css" media="screen" />
<script type="text/javascript" language="javascript" src="ext/jquery/jquery-1.7.min.js"></script>
<script type="text/javascript" language="javascript" src="ext/jquery/jquery-ui-1.8.16.custom.min.js"></script>
<script type="text/javascript">
$(document).ready(function (){
$(function() {
 $("#tabbed_index").tabs();
 var index = $('#tabbed_index .ui-tabs-selected a').attr('href');
   if(index == "#center_news"){
  $("#center_news").load("center_modules.php",{action:"getCenterNews"});
 }
 if(index == "#new_products"){
         $("#new_products").load("center_modules.php",{action:"getNewProducts"});
 }
 if(index == "#products_featured"){
           $("#products_featured").load("center_modules.php",{action:"getProductsFeatured"});
 }
 if(index == "#products_best"){
  $("#products_best").load("center_modules.php",{action:"getProductsBest"});
 }
 if(index == "#specials_center"){
          $("#specials_center").load("center_modules.php",{action:"getProductsSpecials"});
 }
 if(index == "#shop_content"){
          $("#shop_content").load("center_modules.php",{action:"getShopContent"});
 }
 if(index == "#upcoming_products"){
 $("#upcoming_products").load("center_modules.php",{action:"getUpcomingProducts"});
 }
    $('.new_products').click(function (){
           $("#new_products").load("center_modules.php",{action:"getNewProducts"});
       });
    $('.products_featured').click(function (){
           $("#products_featured").load("center_modules.php",{action:"getProductsFeatured"});
       });
 $('.products_best').click(function (){
          $("#products_best").load("center_modules.php",{action:"getProductsBest"});
       });
 $('.specials_center').click(function (){
          $("#specials_center").load("center_modules.php",{action:"getProductsSpecials"});
       });
 
 $('.center_news').click(function (){
          $("#center_news").load("center_modules.php",{action:"getCenterNews"});
       });
 
 $('.shop_content').click(function (){
          $("#shop_content").load("center_modules.php",{action:"getShopContent"});
       });
 $('.upcoming_products').click(function (){
          $("#upcoming_products").load("center_modules.php",{action:"getUpcomingProducts"});
       });
 });
});
</script>
<?php
}
?>

Powered by Invision Power Board (http://www.invisionboard.com)
© Invision Power Services (http://www.invisionpower.com)