• Thống kê diễn đàn


[Share] Topic_list_box ver2 của codeforumotion

View previous topic View next topic Go down

 [Share] Topic_list_box ver2 của codeforumotion Empty [Share] Topic_list_box ver2 của codeforumotion

Post by Bui Minh Phong™ 23/2/2013, 7:59 pm

Demo:
 [Share] Topic_list_box ver2 của codeforumotion Listbo10
 [Share] Topic_list_box ver2 của codeforumotion Listbo11

Tính năng mới:

- Chia 2 cột. Một bên là box chính, một bên có thể đặt quảng cáo, tiện ích ,.....

- Thêm hiệu ứng loading khi đang load ảnh.

 [Share] Topic_list_box ver2 của codeforumotion Hieuun10

- Tự động thêm NO IMG nếu không có ảnh được load.

 [Share] Topic_list_box ver2 của codeforumotion Noimg10

Writen By Tuấn Anh

Code:
Bước 1: Chọn code phù hợp với phiên bản của forum mình:
phpbb2:
Code:

<!-- BEGIN topics_list_box --><!-- BEGIN row --><!-- BEGIN header_table --><!-- BEGIN multi_selection -->
<script type="text/javascript">
function check_uncheck_main_{topics_list_box.row.header_table.BOX_ID}() {
  var all_checked = true;
  for (i = 0; (i < document.{topics_list_box.FORMNAME}.elements.length) && all_checked; i++) {
      if (document.{topics_list_box.FORMNAME}.elements[i].name == '{topics_list_box.FIELDNAME}[]{topics_list_box.row.header_table.BOX_ID}') {
        all_checked = document.{topics_list_box.FORMNAME}.elements[i].checked;
      }
  }
  document.{topics_list_box.FORMNAME}.all_mark_{topics_list_box.row.header_table.BOX_ID}.checked = all_checked;
}
function check_uncheck_all_{topics_list_box.row.header_table.BOX_ID}() {
  for (i = 0; i < document.{topics_list_box.FORMNAME}.length; i++) {
      if (document.{topics_list_box.FORMNAME}.elements[i].name == '{topics_list_box.FIELDNAME}[]{topics_list_box.row.header_table.BOX_ID}') {
        document.{topics_list_box.FORMNAME}.elements[i].checked = document.{topics_list_box.FORMNAME}.all_mark_{topics_list_box.row.header_table.BOX_ID}.checked;
      }
  }
}
</script>
<!-- END multi_selection -->

  <table width="100%" border="0" cellpadding="0" cellspacing="0" border="0" align="center">
    <tr width="100%">
      <td style="width:35%;float:right">
        <table style="float: left; width:100%">
          <tr style="float: left; width:100%">
      <!--Quảng cáo  -->
          </tr>
        </table>
      </td>


      <!-- BEGIN multi_selection -->
  <!-- END multi_selection -->

  <!-- BEGIN pagination -->

<p class="paging" style="margin-left:30px">{PAGINATION}</p>
  <br />
      <br />
 
  <!-- END pagination -->
  <!-- END header_table -->
      <!-- BEGIN header_row -->
<!-- END header_row -->
 
      <script type="text/javascript">$(function(){$(".xname").hide();});</script>
<!-- BEGIN topic -->

        <td style="width:60%; float:left">
  <table cellpadding="3" cellspacing="3"  style="float: left; width: 95%;border: 1px solid #B0B0B0;margin-left:15px;" >
  <tr>
    <td>
      <div class="tuananh4">
        <div class="blog_message1" href="{topics_list_box.row.U_VIEW_TOPIC}" ><img src="http://i71.servimg.com/u/f71/17/59/85/75/loadin10.gif"/></div></div><div class="bai_new4"><r>
          <h2 class="topic-title">
            <a class="topictitle" href="{topics_list_box.row.U_VIEW_TOPIC}" onmouseover="showtip('<font color=#40ff00><b>Thời gian gửi:</b></font> <font color=#FF6600><b>{topics_list_box.row.LAST_POST_TIME}</b></font><br /><font color=#40ff00><b>Trạng Thái:</b></font> <font color=#ff8c00>{topics_list_box.row.L_TOPIC_FOLDER_ALT}</font> <br /><font color=#40ff00><b>Lượt xem:</b></font> <font color=red>{topics_list_box.row.VIEWS}</font><br /><font color=#40ff00><b>Trả lời:</b></font> <font color=#FF66CC>{topics_list_box.row.REPLIES}</font><br>');" onmouseout="hidetip();" >  {topics_list_box.row.TOPIC_TITLE}<br /><br /></a><span class="xname" style="float: right;"><strong>{topics_list_box.row.TOPIC_AUTHOR}  </strong><br/></span>
            </h2>
        <!-- BEGIN switch_description -->
        <span class="genmed">
            <br />
            {topics_list_box.row.topic.switch_description.TOPIC_DESCRIPTION}
        </span>
        <!-- END switch_description -->
        <span class="gensmall">{topics_list_box.row.TOPIC_ANNOUNCES_DATES}{topics_list_box.row.TOPIC_CALENDAR_DATES}</span>
                  <span class="gensmall"><!-- BEGIN nav_tree -->{topics_list_box.row.TOPIC_NAV_TREE} <!-- END nav_tree --></span>
            <span class="postdetails"><font color="black">  By: </font>{topics_list_box.row.TOPIC_AUTHOR}</span>
                <a class="more-link" style="float:right" href="{topics_list_box.row.U_VIEW_TOPIC}">Xem Tiếp</a>
              <span class="postdetails xname"><font color="black"> </font><font color="red">{topics_list_box.row.REPLIES}</font></span>
              <span class="postdetails xname"><font color="black"> </font><font color="red">{topics_list_box.row.VIEWS}</font></span>
 
              <span class="postdetails xname"><font color="black"> </font><font color="red">{topics_list_box.row.LAST_POST_AUTHOR} ( <font color="#8c8787">{topics_list_box.row.LAST_POST_TIME}</font>)</font></span>
         
            </r>
            </div>
         
      </td>
      </tr>
    </table>
      </td>
      <style>
 a.more-link,
a.more-link:link,
a.more-link:visited  {
width:80px;
height:24px;
line-height:22px;
font-size:8pt;
text-align:center;
font-weight:normal;
color:#666;
display:block;
background:#eee;
border:1px solid #ddd;
}
a.more-link:hover,
a.more-link:active  {
color:#fff;
text-decoration:none;
background:#2A4375;
border:1px solid #1E3155;
}
      </style>

            <!-- BEGIN multi_selection -->
 
      <p align="center" valign="middle"><span class="postdetails xname"><input onclick="javascript:check_uncheck_main_{topics_list_box.row.BOX_ID}();" type="checkbox" name="{topics_list_box.FIELDNAME}[]{topics_list_box.row.BOX_ID}" value="{topics_list_box.row.FID}" {topics_list_box.row.L_SELECT} /></span></p>
  <!-- END multi_selection -->
 
  <!-- END topic --><!-- BEGIN no_topics -->
 
      <p class="xname" colspan="{topics_list_box.row.COLSPAN}" align="center" valign="middle" height="30"><span class="gen">{topics_list_box.row.L_NO_TOPICS}</span></p>
 
  <!-- END no_topics --><!-- BEGIN bottom -->
      <br />
      <p class="paging xname" style="margin-left:30px;margin-top:30px">{PAGINATION}</p>
   
              </tr>
 
  </table>
<!-- END bottom --><!-- BEGIN footer_table -->
<!-- END footer_table --><!-- BEGIN spacer --><br class="gensmall" /><!-- END spacer --><!-- END row --><!-- END topics_list_box -->
 <style>.blog_message1 {overflow: hidden;margin: 3px 3px 3px 3px;width: 100px;height: 50px;padding: 3px;border: 1px solid #CFCDCE;font-size: 0px;font-family: none;}.blog_message1 img {width: 100px;height: 50px;}.pun tbody.statused td.tcl {padding-left: 0;}.codebox {display: none;}.postmain blockquote,blockquote{display: none;}.blog_message1 {float: left;}.blog_tintuc li:nth-of-type(1) .blog_message1 {margin: 0px;width: 320px;height: 212px;border: 1px solid #626263;}.blog_tintuc li:nth-of-type(1) .blog_message1 img {padding: 0px;width: 320px;height: 212px;}.blog_tintuc li {background-color: white;}  .blog_tintuc li:nth-of-type(3) .blog_message1, .blog_tintuc li:nth-of-type(2) .blog_message1  {width: 190px;height: 90px;float: left;margin: 0px;border: 1px solid #B0B0B0;}.blog_tintuc li:nth-of-type(3) .blog_message1 img , .blog_tintuc li:nth-of-type(2) .blog_message1 img  {width: 190px;height: 90px;padding: 0px;}</style>
<script><script> /*Writen by Tuấn Anh in codeforumotion.forumvi.com*/
      $(document).on('ready',function(){$('.blog_message1').each(function(){var url=$(this).attr('href');$(this).load(url+' div.postbody img:eq(0)')})});</script>

punbb:
Code:
<!-- BEGIN topics_list_box --><!-- BEGIN row --><!-- BEGIN header_table --><!-- BEGIN multi_selection -->
<script type="text/javascript">
function check_uncheck_main_{topics_list_box.row.header_table.BOX_ID}() {
  var all_checked = true;
  for (i = 0; (i < document.{topics_list_box.FORMNAME}.elements.length) && all_checked; i++) {
      if (document.{topics_list_box.FORMNAME}.elements[i].name == '{topics_list_box.FIELDNAME}[]{topics_list_box.row.header_table.BOX_ID}') {
        all_checked = document.{topics_list_box.FORMNAME}.elements[i].checked;
      }
  }
  document.{topics_list_box.FORMNAME}.all_mark_{topics_list_box.row.header_table.BOX_ID}.checked = all_checked;
}
function check_uncheck_all_{topics_list_box.row.header_table.BOX_ID}() {
  for (i = 0; i < document.{topics_list_box.FORMNAME}.length; i++) {
      if (document.{topics_list_box.FORMNAME}.elements[i].name == '{topics_list_box.FIELDNAME}[]{topics_list_box.row.header_table.BOX_ID}') {
        document.{topics_list_box.FORMNAME}.elements[i].checked = document.{topics_list_box.FORMNAME}.all_mark_{topics_list_box.row.header_table.BOX_ID}.checked;
      }
  }
}
</script>
<!-- END multi_selection -->

  <table width="100%" border="0" cellpadding="0" cellspacing="0" border="0" align="center">
    <tr width="100%">
      <td style="width:35%;float:right">
        <table style="float: left; width:100%">
          <tr style="float: left; width:100%">
      <!--Quảng cáo  -->
          </tr>
        </table>
      </td>


      <!-- BEGIN multi_selection -->
  <!-- END multi_selection -->

  <!-- BEGIN pagination -->

<p class="paging" style="margin-left:30px">{PAGINATION}</p>
  <br />
      <br />
 
  <!-- END pagination -->
  <!-- END header_table -->
      <!-- BEGIN header_row -->
<!-- END header_row -->
 
      <script type="text/javascript">$(function(){$(".xname").hide();});</script>
<!-- BEGIN topic -->

        <td style="width:60%; float:left">
  <table cellpadding="3" cellspacing="3"  style="float: left; width: 95%;border: 1px solid #B0B0B0;margin-left:15px;" >
  <tr>
    <td>
      <div class="tuananh4">
        <div class="blog_message1" href="{topics_list_box.row.U_VIEW_TOPIC}" ><img src="http://i71.servimg.com/u/f71/17/59/85/75/loadin10.gif"/></div></div><div class="bai_new4"><r>
          <h2 class="topic-title">
            <a class="topictitle" href="{topics_list_box.row.U_VIEW_TOPIC}" onmouseover="showtip('<font color=#40ff00><b>Thời gian gửi:</b></font> <font color=#FF6600><b>{topics_list_box.row.LAST_POST_TIME}</b></font><br /><font color=#40ff00><b>Trạng Thái:</b></font> <font color=#ff8c00>{topics_list_box.row.L_TOPIC_FOLDER_ALT}</font> <br /><font color=#40ff00><b>Lượt xem:</b></font> <font color=red>{topics_list_box.row.VIEWS}</font><br /><font color=#40ff00><b>Trả lời:</b></font> <font color=#FF66CC>{topics_list_box.row.REPLIES}</font><br>');" onmouseout="hidetip();" >  {topics_list_box.row.TOPIC_TITLE}<br /><br /></a><span class="xname" style="float: right;"><strong>{topics_list_box.row.TOPIC_AUTHOR}  </strong><br/></span>
            </h2>
        <!-- BEGIN switch_description -->
        <span class="genmed">
            <br />
            {topics_list_box.row.topic.switch_description.TOPIC_DESCRIPTION}
        </span>
        <!-- END switch_description -->
        <span class="gensmall">{topics_list_box.row.TOPIC_ANNOUNCES_DATES}{topics_list_box.row.TOPIC_CALENDAR_DATES}</span>
                  <span class="gensmall"><!-- BEGIN nav_tree -->{topics_list_box.row.TOPIC_NAV_TREE} <!-- END nav_tree --></span>
            <span class="postdetails"><font color="black">  By: </font>{topics_list_box.row.TOPIC_AUTHOR}</span>
                <a class="more-link" style="float:right" href="{topics_list_box.row.U_VIEW_TOPIC}">Xem Tiếp</a>
              <span class="postdetails xname"><font color="black"> </font><font color="red">{topics_list_box.row.REPLIES}</font></span>
              <span class="postdetails xname"><font color="black"> </font><font color="red">{topics_list_box.row.VIEWS}</font></span>
 
              <span class="postdetails xname"><font color="black"> </font><font color="red">{topics_list_box.row.LAST_POST_AUTHOR} ( <font color="#8c8787">{topics_list_box.row.LAST_POST_TIME}</font>)</font></span>
         
            </r>
            </div>
         
      </td>
      </tr>
    </table>
      </td>
      <style>
 a.more-link,
a.more-link:link,
a.more-link:visited  {
width:80px;
height:24px;
line-height:22px;
font-size:8pt;
text-align:center;
font-weight:normal;
color:#666;
display:block;
background:#eee;
border:1px solid #ddd;
}
a.more-link:hover,
a.more-link:active  {
color:#fff;
text-decoration:none;
background:#2A4375;
border:1px solid #1E3155;
}
      </style>

            <!-- BEGIN multi_selection -->
 
      <p align="center" valign="middle"><span class="postdetails xname"><input onclick="javascript:check_uncheck_main_{topics_list_box.row.BOX_ID}();" type="checkbox" name="{topics_list_box.FIELDNAME}[]{topics_list_box.row.BOX_ID}" value="{topics_list_box.row.FID}" {topics_list_box.row.L_SELECT} /></span></p>
  <!-- END multi_selection -->
 
  <!-- END topic --><!-- BEGIN no_topics -->
 
      <p class="xname" colspan="{topics_list_box.row.COLSPAN}" align="center" valign="middle" height="30"><span class="gen">{topics_list_box.row.L_NO_TOPICS}</span></p>
 
  <!-- END no_topics --><!-- BEGIN bottom -->
      <br />
      <p class="paging xname" style="margin-left:30px;margin-top:30px">{PAGINATION}</p>
   
              </tr>
 
  </table>
<!-- END bottom --><!-- BEGIN footer_table -->
<!-- END footer_table --><!-- BEGIN spacer --><br class="gensmall" /><!-- END spacer --><!-- END row --><!-- END topics_list_box -->
 <style>.blog_message1 {overflow: hidden;margin: 3px 3px 3px 3px;width: 100px;height: 50px;padding: 3px;border: 1px solid #CFCDCE;font-size: 0px;font-family: none;}.blog_message1 img {width: 100px;height: 50px;}.pun tbody.statused td.tcl {padding-left: 0;}.codebox {display: none;}.postmain blockquote,blockquote{display: none;}.blog_message1 {float: left;}.blog_tintuc li:nth-of-type(1) .blog_message1 {margin: 0px;width: 320px;height: 212px;border: 1px solid #626263;}.blog_tintuc li:nth-of-type(1) .blog_message1 img {padding: 0px;width: 320px;height: 212px;}.blog_tintuc li {background-color: white;}  .blog_tintuc li:nth-of-type(3) .blog_message1, .blog_tintuc li:nth-of-type(2) .blog_message1  {width: 190px;height: 90px;float: left;margin: 0px;border: 1px solid #B0B0B0;}.blog_tintuc li:nth-of-type(3) .blog_message1 img , .blog_tintuc li:nth-of-type(2) .blog_message1 img  {width: 190px;height: 90px;padding: 0px;}</style>
<script>
 $(document).on('ready',function(){$('.blog_message1').each(function(){var url=$(this).attr('href');$(this).load(url+' .post-entry .entry-content img:eq(0)')})});</script>
tìm:
Code:
<!--Quảng cáo  -->
- Bạn có thể đặt liên kết diễn đàn, thông báo ,.... vào đó

- Bước 2: Vào Viewtopic_body: tìm:
Code:
 {postrow.displayed.MESSAGE}
thay thành
Code:
{postrow.displayed.MESSAGE}
    <div class="no_img"><img src="http://i71.servimg.com/u/f71/17/59/85/75/no_ima11.gif"/></div>
cho code này vào nơi tùy thích trong viewtopic_body
Code:
<style>
  .no_img
  {
      display:none
  }
      </style>
nguồn: Codeforumotion
Bui Minh Phong™
Bui Minh Phong™
Quản Trị Cấp Cao
Quản Trị Cấp Cao

Posts : 3260
Points : 371112
Thanked : 1927
Birthday : 1994-12-18
Status Hãy Lặng Yên Để Cảm Nhận Tình Yêu Xung Quanh Bạn :x
Giới tính : Male Rất dễ thương

Back to top Go down

 [Share] Topic_list_box ver2 của codeforumotion Empty Re: [Share] Topic_list_box ver2 của codeforumotion

Post by SenT 24/2/2013, 6:32 am

xem
SenT
SenT
New Mem
New Mem

Posts : 8
Points : 205066
Thanked : 0
Birthday : 1996-03-17
Status sg
Giới tính : Male Thick Boom ak

Back to top Go down

 [Share] Topic_list_box ver2 của codeforumotion Empty Re: [Share] Topic_list_box ver2 của codeforumotion

Post by fascicularia 21/7/2013, 6:30 pm

xem
fascicularia
fascicularia
New Mem
New Mem

Posts : 21
Points : 197693
Thanked : 1
Birthday : 1968-03-26
Status very well
Giới tính : Male giang hồ

Back to top Go down

 [Share] Topic_list_box ver2 của codeforumotion Empty Re: [Share] Topic_list_box ver2 của codeforumotion

Post by Sponsored content


Sponsored content


Back to top Go down

View previous topic View next topic Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum