Code
[Bài viết không bị Ẩn]mod_recent_topics
- Code:
<!-- BEGIN scrolling_row -->
<td width="40%">
<table width="100%">
<tr>
<td>
<div style="background-color:#ccc;padding:5px 5px;width:100%">{L_RECENT_TOPICS}</div>
<div style="height:auto" id="recent">
<!-- BEGIN recent_topic_row -->
<li><a style="float:left;padding-left:10px;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;width:60%;" href="{scrolling_row.recent_topic_row.U_TITLE}" title="{scrolling_row.recent_topic_row.L_TITLE}">{scrolling_row.recent_topic_row.L_TOPIC_TITLE}</a>
<!-- BEGIN switch_poster -->
<a style="float:right;" href="{scrolling_row.recent_topic_row.switch_poster.U_POSTER}">{scrolling_row.recent_topic_row.switch_poster.S_POSTER}</a><br />
<!-- END switch_poster -->
</li>
<!-- BEGIN switch_poster_guest -->
<!--{scrolling_row.recent_topic_row.switch_poster_guest.S_POSTER}<br /><br />-->
<!-- END switch_poster_guest -->
<!-- END recent_topic_row -->
</div>
</td>
</tr>
</table>
</td>
<!-- END scrolling_row -->
<style>
#recent li
{
list-style:none;
}
</style>
- Code:
<script type="text/javascript">
function chuyenmuclast(n,idchuyenmuc)
{
$(function () {
$.ajax({url: "/feed/?f="+n,
success: function (ta)
{
for(var i=2;i<10;i++)
$('<div class="last">
<li>
<a style="float:left;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;width:60%;" href="'+$(ta).find("link:eq("+i+")").text()+'" title="'+$(ta).find("title:eq("+i+")").text()+'"> '+$(ta).find("title:eq("+i+")").text()+'</a><a style="float:right"> '+$(ta).find("creator:eq("+(i-2)+")").text()+'</a>
</div>
</li>
<br/>
').appendTo(idchuyenmuc);
}
})
})
}
</script>
<div class="main">
<div id="main-content">
<div class="main-head">
<div class="page-title">
<center>Thống kê bài viết</center>
</div>
</div>
<div class="main-content">
<table width="100%">
<tr>
<!-- BEGIN giefmod_index1 -->
{giefmod_index1.MODVAR}
<!-- END giefmod_index1 -->
<td width="30%">
<table width="100%">
<tr>
<td>
<div style="background-color:#ccc;padding:5px 0px;"><center>Code</center></div>
<div id="code"><script>chuyenmuclast("1","#code");</script>
</div>
</td>
</tr>
</table>
</td>
<td width="30%">
<table width="100%">
<tr>
<td>
<div style="background-color:#ccc;padding:5px 0px;"><center>Thac Mac</center></div>
<div id="thacmac"><script>chuyenmuclast("2","#thacmac");</script></div>
</td>
</tr>
</table>
</td>
</tr>
</table>
</div>
</div>
</div>
<style>
.last li
{
list-style:none;
padding-left:10px;
display:block;
}
</style>
Click vào bánh xe màu vàng trong recent_topic
Nguồn : Codeforumotion