Diễn đàn Tuổi trẻ Việt Nam | 2TVN Forum :: Khám phá tri thức :: Máy tính & Internet :: Thiết kế website
Ghi chú: Thay vì sử dụng thống kê bài viết của baivong mới có tooltip đầy đủ thông tin. Bài này mình chỉ các bạn cài đặt tooltip đầy đủ thông tin vào trong bất cứ thống kê bài viết nào bạn muốn . Mình chỉ hướng dẫn 2 loại tooltip thông dụng hiện nay là tooltip mặc định của fm và dhtml tooltip.
Hướng dẫn: Đọc kĩ và backup mod_recent_topics
Display Templates Portal mod_recent_topics (Không đụng bất cứ cái gì ở giữa <!-- BEGIN scrolling_row --> và <!-- END scrolling_row -->)
Hướng dẫn: Đọc kĩ và backup mod_recent_topics
Display Templates Portal mod_recent_topics (Không đụng bất cứ cái gì ở giữa <!-- BEGIN scrolling_row --> và <!-- END scrolling_row -->)
- Cho tất cả nội dung giữa <!-- BEGIN recent_topic_row --> và <!-- END recent_topic_row --> bằng
- Code:
<div class="newltopic">[nội dung ở giữa 2 cái trên]</div>
- Tìm (Cái này dựa trên tiêu đề mặc định, ai mà cài tooltip vào tiêu đề thì nó sẽ khác)
- Code:
<a href="{classical_row.recent_topic_row.U_TITLE}">{classical_row.recent_topic_row.L_TITLE}</a>
- Code:
<div onmouseover="show_tooltip(this.getElementsByTagName('div')[0].innerHTML);" onmouseout="hidetip();"><span class="ltitletopic" style="font-size:11px;font-weight:bold"><a href="{classical_row.recent_topic_row.U_TITLE}">{classical_row.recent_topic_row.L_TITLE}
</a></span><div class="tooltipFMvi" style="display:none"><img src="http://i48.servimg.com/u/f48/16/58/89/73/loadin10.gif" /> Loading</div></div>
- Tìm tiếp
- Code:
{classical_row.recent_topic_row.switch_poster.S_POSTER}
- Code:
<span class="lpostertopic">{classical_row.recent_topic_row.switch_poster.S_POSTER}</span>
- Tìm tiếp
- Code:
{classical_row.recent_topic_row.S_POSTTIME}
- Code:
<span class="ltimetopic" style="display:none">{classical_row.recent_topic_row.S_POSTTIME}</span>
- Bỏ code này ở dưới cuối
- Code:
<script type="text/javascript">
$(function() {$(".newltopic").each(function(a) {$(this);$(this).attr("id", "newlast" + a);a = $(this).attr("id");$(this).find(".ltitletopic").next().attr("alt", a);$(this).find(".ltitletopic").attr("alt", a);$(this).find(".lpostertopic").attr("alt", a);$(this).find(".ltimetopic").attr("alt", a);var b = $(this).find(".ltitletopic[alt='" + a + "']").text(),tieude = $(this).find(".ltitletopic[alt='" + a + "']").text(),d = $(this).find(".ltimetopic[alt='" + a + "']").text(),thoigian = $(this).find(".ltimetopic[alt='" + a + "']").text(),e = b.replace(/ /gi, "+"),f = $(this).find(".ltitletopic[alt='" + a + "']").next();f.load("/search?mode=searchbox&search_keywords=" + e + '&show_results=topics tr.layemno:contains("' + b + '"):contains("' + d + '")', function() {var d = $(this).find("#tacgiamt a[href^='/u']").text(),e = $(this).find(".row3:first").text(),f = $(this).find(".row2:first").text(),g = $(this).find(".row2:last").text(),j = $(".lpostertopic[alt='" + a + "']").text();$(this).html('<b><span class="tipfont">Title:</span> ' + tieude + '</b><hr><span class="tipfont">Author:</span> ' + d + '<br><span class="tipfont">Last poster:</span> ' + j + '<br><span class="tipfont">Last post time:</span> ' + thoigian + '<hr><span class="tipfont">Category:</span> ' + e + '<br><span class="tipfont">Views:</span> ' + g + '<br><span class="tipfont">Replies:</span> ' + f + "<br>");})})});
</script>
Tooltip mặc định của fm là tooltip có sẵn trong những last topics của thuan007 ( đã hướng dẫn trong bài viết), dhtml tooltip là tooltip chinhphuc đang sử đụ
Fanpage
|
|