Demo
mod_recent_topics
Code:
<!-- BEGIN classical_row --><br />
<div class="module main lasver">
<div class="tag mekiep">
<div data="0" class="last active" style=" border-top: 1px solid #ddd; ">Bài viết mới <br /> <span class="lasv">New Thread</span></div>
<div data="1" class="last">TEST 1 <br /><span class="lasv">test 1</span></div>
<div data="2" class="last">TEST 2 <br/><span class="lasv">test 2</span></div>
<div data="3" class="last">TEST 3 <br /><span class="lasv">test 3</span></div>
</div>
<div id="loadddddd" style="display:none"></div>
<div class="main-content fuck" style="border-left: #fff;z-index:5;position: relative;float: left;width: 510px;">
<ol id="lastest" class="activea forum0">
<!-- BEGIN recent_topic_row -->
<li>
<span style="overflow: hidden; text-overflow: ellipsis; white-space: nowrap; position: absolute; width:400px!important"><a href="{classical_row.recent_topic_row.U_TITLE}" title="{classical_row.recent_topic_row.S_POSTTIME}">{classical_row.recent_topic_row.L_TITLE}</a></span>
<!-- BEGIN switch_poster -->
<a class="rlink" href="{classical_row.recent_topic_row.switch_poster.U_POSTER}">{classical_row.recent_topic_row.switch_poster.S_POSTER}</a>
<!-- END switch_poster -->
<!-- BEGIN switch_poster_guest -->
<span class="rlink">{classical_row.recent_topic_row.switch_poster_guest.S_POSTER}</span>
<!-- END switch_poster_guest -->
</li>
<!-- END recent_topic_row -->
</ol>
<ol id="lastest" class="forum1"></ol>
<ol id="lastest" class="forum2"></ol>
<ol id="lastest" class="forum3"></ol>
</div>
</div>
<!-- END classical_row -->
<script>
$(function() {
$(".tag div").click(function() {
$(".active").removeClass("active");
$(this).addClass("active");
var a = $(this).attr("data");
0 != a ? ($("#loading").show(),$("#loadddddd").load("/f" + a + "-forum .table tr", function() {
var b = "";
for(i = 1;i < $("#loadddddd tr").length;i++) {
b = b + '<li><span style="overflow: hidden; text-overflow: ellipsis; white-space: nowrap;position: absolute; width:460px!important">' + $(this).find('tr:eq('+i+') .topic-title').html() +'</span> <span style="float: right;margin-right: -7px;">' + $(this).find('tr:eq('+i+') td.tcr strong').html() + '</span></li>'
}
$(".activea").removeClass("activea");
$(".forum" + a).addClass("activea").html(b);
$("#loading").fadeOut();
})) : ($(".activea").removeClass("activea"), $(".forum" + a).addClass("activea"))
})
});
</script>
Widget
Chỉ để mỗi recent_topics thôi nhéTags: #topx #latest-topic