C5ZONE
CHÀO MỪNG BẠN ĐÃ GHÉ THĂM DIỄN ĐÀN C5Zone


Bạn nên đăng nhập hoặc đăng ký thì mới xem được những nội dung chính của DIỄN ĐÀN. Việc đăng nhập hoặc đăng ký làm thành viên không tốn phí gì đâu. bạn yên tâm.
Bạn cũng có thể cứ làm khách vẫn xem được một phần nội dung của Diễn đàn, nhưng bị nhiều hạn chế hạn chế ở các chuyên mục như: không xem được ảnh, không nhìn thấy link ...

< /form>< /div>< /div>
C5ZONE
CHÀO MỪNG BẠN ĐÃ GHÉ THĂM DIỄN ĐÀN C5Zone


Bạn nên đăng nhập hoặc đăng ký thì mới xem được những nội dung chính của DIỄN ĐÀN. Việc đăng nhập hoặc đăng ký làm thành viên không tốn phí gì đâu. bạn yên tâm.
Bạn cũng có thể cứ làm khách vẫn xem được một phần nội dung của Diễn đàn, nhưng bị nhiều hạn chế hạn chế ở các chuyên mục như: không xem được ảnh, không nhìn thấy link ...

< /form>< /div>< /div>
C5ZONE
Would you like to react to this message? Create an account in a few clicks or log in to continue.

C5ZONELog in

We Share


descriptionLatest nhiều tab của diễn đàn tình thương EmptyLatest nhiều tab của diễn đàn tình thương

more_horiz
Tình hình là nhiều bạn lúng túng khi muốn bổ sung thêm tab, mình rất muốn giúp nhưng mình lại không dùng giống như các bạn. Muốn giúp các bạn mình phải làm lại như các bạn mới giúp được, như vậy mất công lắm mà mình lại không thích cái đó.

Vậy nên mình đưa code của mình để ai thích thì dùng. Nó đơn giản lắm, muốn bao nhiêu tab cũng dễ, chỉ cần thêm

Code:

<a>Tên tab mới</a>


Code:

<!-- Nội dung tab mơi-->
<div class="Page">
NỘI DUNG TAB MỚI
</div>

Vậy là xong. Nó không liên quan gì tới những thứ khác như mod_new, top_postter, file js hay bất cứ thứ gì.

Rất đơn giản nhưng muốn làm được thì mọi thứ phải về mặc định. Nó không chịu "râu ông nọ cắm cằm bà kia"
Của mình đây:
1/ Mod_Recent_topic:
Nhìn vào đây thì bất cứ bạn nào dù mới "vào nghề" cũng thêm được tab mới:

Code:

<html>
<head>
<meta http-equiv="Content-Type"content="text/html; charset=UTF-8">
<Title>Tinh thuong</Title>
</head>
<body>

</td></tr>
</table></td>
<td valign="top" style="border: 0x solid #9DB3C5; padding: 0px">

<table width="100%"  border="0"  cellspacing="0" cellpadding="0">
<Tr>
<td width="26%" height="24" align="center" bgcolor="#70B1EB">
<font face = "Tahoma" size = "2" color = "#FFFFFF">
<b>TOP BÀI VIẾT MỚI</b></font>
</td> </tr> </table>

<style type="text/css">
/* Style cho menu tabs */
div.TabView div.Tabs
{height: 29px; /* chiều cao của tab menu */
overflow: hidden;
}div.TabView div.Tabs: hover,{height: 29px; /* chiều cao của tab menu */overflow: hidden;}
div.TabView div.Tabs a ,
div.TabView div.Tabs a:hover {float: left;display: block;background-color:#EFEFEF;text-align: center;height: 29px;padding: 6px;vertical-align: middle;border:1px solid #cad9ea;border-top: 0px;border-left: 0px;border-bottom: 0px; /* đường viền quanh tabs menu */text-decoration: none;font-family: Tahoma;font-size: 11px;color: #0000A0;}.hotrott{background-color: #ffffff;border: 0px solid #ded7d7;}.nen{background-color: #ffffff;border: 1px solid #ded7d7;}
div.TabView div.Tabs a.Active{background-color: #E6ffff; /* màu nền tab menu active */color: #000000;border:1px solid #cad9ea;border-top: 0px;border-left: 0px;border-bottom: 0px; padding: 6px;height: 29px;font-size: 11px;font-weight: bold;}

/* Style cho phần text nội dung của mỗi tab */
div.TabView {clear: both;border: 0px solid #ffffff;overflow: hidden; /* giá trị là auto nếu muốn hiện scroll bar */}
div.TabView div.Pages div.Page{height: 100%;padding: 0px;border: 0px solid #cad9ea;overflow: hidden; /* giá trị là auto nếu muốn hiện scroll bar */}</style>

<script type="text/javascript" src="http://www.trekhuyettat.org/h157-page"></script>
<div id="TabView" class="TabView" style="padding: 0px;"><!--
 tabs --><div width="100%" class="Tabs">

<a class="Active" href="javascript:tabview_switch('TabView', 1);">Tổng hợp</a>
<a>Tin tức </a>
<a>Tab 3</a>
<a>Tab 4</a>
<a>Tab 5</a>

<ul class="tabs" id="vietvbb_topstats_t">  <li style="border-right: 0px; display: none;" id="vietvbb_topstats_t_loading"></li> </ul>
</div>
<!-- nội dung tabs --><div style="height:400px; width:100%" class="Pages">

<!-- Bài viết mới -->
<div class="Page">
<div style="overflow: auto; max-height: 400px;">
<div style="margin:auto;text-align:left;width:100%">
<center>
<!-- BEGIN classical_row -->
<table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
<tr><td>

<table width="100%" border="0">
<tr>
<td align="left" height="25" width="70%" >
<span class="genmed">
<font face = "Times New Roman" size = "3" color = "#0000A0">
<b>Bài viết:</b></span></td>

<td align="right" width="30%">
<span class="genmed">
<font face = "Times New Roman" size = "3" color = "#0000A0">
<b>Người gửi :</b></span>

</td></tr></table>
</td>

<tr>
<td style="padding: 0px; background: rgb(255, 255, 255) none repeat scroll 0% 0%; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous;" width="100%">

<table border="0" cellpadding="0" cellspacing="0" width="100%" >
<tbody>
<tr valign="top">

<td style="border-top: 0px none; padding: 0px; background: transparent url('http://i49.servimg.com/u/f49/16/79/08/82/stt80110.gif') no-repeat scroll center top; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous;" width="20"><img src="http://2img.net/i/fa/empty.gif" width="20" border="0"></td>

<td style="border-top: 0px none; padding: 0px; line-height: 20px; background-repeat: repeat;" align="left" background="http://gi134.photobucket.com/groups/q90/RMHJUQUYRF/duongk10.gif" width="70%" bgcolor="#FFFFFF">

<!-- BEGIN recent_topic_row -->
<a href="{classical_row.recent_topic_row.U_TITLE}"> <font face="Times New Roman" size="2">{classical_row.recent_topic_row.L_TITLE}</font></a><br>
<!-- END recent_topic_row -->
</td>

<td style="border-top: 0px none; padding: 0px; line-height: 20px; background-repeat: repeat;" align="right" background="http://gi134.photobucket.com/groups/q90/RMHJUQUYRF/duongk10.gif" width="30%" bgcolor="#FFFFFF">

                        <!-- BEGIN recent_topic_row --> 
<div class="smallfont" style="overflow: hidden; height: 20px; width: 100%;">
      <!-- BEGIN switch_poster -->
<a href="{classical_row.recent_topic_row.switch_poster.U_POSTER}">
<font face="Times New Roman" sixe="2" color="#0000FF">{classical_row.recent_topic_row.switch_poster.S_POSTER}</font></a></div>
      <!-- END switch_poster -->
      <!-- END recent_topic_row -->
</tr></tbody></table>

</td></tr></table>
<!-- END classical_row -->
</center>
</div></div></div>

<!-- Tin tức -->
<div class="Page">
<div style="overflow: auto; max-height: 400px;">
<div style="margin:auto;text-align:left;width:100%">
<font face=" Times New Roman" size="3" color="#FF00FF">
<script src="http://feeds.feedburner.com/c5zcntt?format=sigpro" type="text/javascript" ></script><noscript><p>C5Zone: <a href="http://feeds.feedburner.com/c5zcntt"></a><br/>Powered by FeedBurner</p> </noscript></font>
<ul><li type="square"><a href="/post?f=4&mode=newtopic">
<font face = "Times New Roman" size = "4" color = "#FF0000"><B>  Gửi bài mới >> </B></font></li></ul>
</div></div></div>


</div>
<script type="text/javascript">tabview_initialize('TabView');</script><ScrollTop -->

</body>
</html>

2/ Dán code này lên trên cùng của Index_body mặc định

Code:

                    <div id="page-body">
  <div id="{ID_CONTENT_CONTAINER}"{CLASS_CONTENT_CONTAINER}>
                      <table  class="thongke" cellpadding="0" cellspacing="0" border="0" width="100%" align="center" >
<tbody>
                            <tr>
                              <td valign="top" width="100%">
                                  <div class="test">
<table class="thongke" cellpadding="0" cellspacing="0" style="border: 1px #c0c0c0 solid;" width="100%">
<tr>
<td width="100%">

<table class="thongke" cellpadding="0" cellspacing="0" style="border: 1px #c0c0c0 solid;" width="100%" align="center">
<thead>
      <tr valign="top">
<td width="22%"></td><td width="78%" colspan="2"></td>
</tr>
<tr>
<td>
<table  class="thongke" cellpadding="0" cellspacing="0" border="0"  width="100%" align="center" >
<tr><td valign="top" style="border: 1px solid #9DB3C5;">
<!-- BEGIN giefmod_index1 -->
{giefmod_index1.MODVAR} <!-- END giefmod_index1 --></tr></thead></table>
</td></tr></table>

</div>
</td>
    </tr>
    <tr>
                            <td valign="top" width="100%">
<!-- BEGIN html_validation -->
                          </td>
                        </tr>
                    </tbody>
                  </table>
              </div>
            </div>
        </td>
      </tr>
  </table>
</body>
</html>
<!-- END html_validation -->       

3/ Xóa đoạn cuối này trong header mặc định:

Code:

<div id="page-body">
              <div id="{ID_CONTENT_CONTAINER}"{CLASS_CONTENT_CONTAINER}>
                <table cellpadding="0" cellspacing="0" width="100%" class="three-col">
                    <tbody>
                      <tr>
                          <td valign="top" width="{C1SIZE}">
                            <div id="{ID_LEFT}">
                                <!-- BEGIN giefmod_index1 -->
                                {giefmod_index1.MODVAR}
                                  <!-- BEGIN saut -->
                                  <div style="height:{SPACE_ROW}px"></div>
                                  <!-- END saut -->
                                <!-- END giefmod_index1 -->
                            </div>
                          </td>
                          <td valign="top" width="100%">
<!-- BEGIN html_validation -->
                          </td>
                      </tr>
                    </tbody>
                </table>
              </div>
          </div>
        </td>
    </tr>
  </table>
</body>
</html>
<!-- END html_validation -->

4/ Bố trí widgets như hình là xong:
Latest nhiều tab của diễn đàn tình thương 93634589
Còn top poster không liên quan gì đến, thích nó thế nào thì ta cứ việc chỉnh riêng nó.
Mặc định nó thế này:

Code:

<table class="forumline" width="100%" border="0" cellspacing="1" cellpadding="0">
  <tr>
      <td class="catLeft" height="25"><span class="genmed module-title">{L_TOP_POSTERS}</span></td>
  </tr>
  <tr>
      <td>
        <table summary="{L_TOP_POSTERS}" width="100%">
            <!-- BEGIN POSTER -->
            <tr>
              <td class="{POSTER.ROW_CLASS} genmed" width="1%">{POSTER.NAME}</td>
              <td class="{POSTER.ROW_CLASS}" nowrap="nowrap" title="{POSTER.NB_POSTS}">{POSTER.BARRE}</td>
            </tr>
            <!-- END POSTER -->
        </table>
      </td>
  </tr>
</table>

Thích thêm gì nữa thì cứ thêm cho nó một table vào bên trên hay bên dưới là xong. Thậm chí thêm bên trên một table, dưới một table cũng được nữa .

descriptionLatest nhiều tab của diễn đàn tình thương EmptyRe: Latest nhiều tab của diễn đàn tình thương

more_horiz
thay http://c5zone.forumvi.com/h13-a
tránh bị die

Code:

// Copyright (C) 2005 Ilya S. Lyubinskiy. All rights reserved.
// Technical support: http://www.php-development.ru/

// ----- Auxiliary -------------------------------------------------------------
function tabview_aux(TabViewId, id)
{
  var TabView = document.getElementById(TabViewId);
  // ----- Tabs -----
  var Tabs = TabView.firstChild;
  while (Tabs.className != "Tabs" ) Tabs = Tabs.nextSibling;
  var Tab = Tabs.firstChild;
  var i  = 0;
  do
  {
    if (Tab.tagName == "A")
    {
      i++;
      Tab.href      = "javascript:tabview_switch('"+TabViewId+"', "+i+");";
      Tab.className = (i == id) ? "Active" : "";
      Tab.blur();
    }
  }
  while (Tab = Tab.nextSibling);
  // ----- Pages -----
  var Pages = TabView.firstChild;
  while (Pages.className != 'Pages') Pages = Pages.nextSibling;
  var Page = Pages.firstChild;
  var i    = 0;
  do
  {
    if (Page.className == 'Page')
    {
      i++;
      if (Pages.offsetHeight) Page.style.height = (Pages.offsetHeight-2)+"px";
      http://Page.style.overflow = "auto";
      Page.style.display  = (i == id) ? 'block' : 'none';
    }
  }
  while (Page = Page.nextSibling);
}
// ----- Functions ------

function SetCookieForTabView(cookieName,cookieValue,nDays) {
 var today = new Date();
 var expire = new Date();
 if (nDays==null || nDays==0) nDays=1;
 expire.setTime(today.getTime() + 3600000*24*nDays);
 document
privacy_tip Permissions in this forum:
You cannot reply to topics in this forum