Mẹo này giúp bạn thay dòng hiển thị số lần vote đơn điệu bằng cách việt hóa và đóng khung đơn giản |
- Demo : Mặc định :
Message not voted
Message reputation : 100% (1 vote)
Message reputation : 50% (2 votes)
Kết quả sau khi thay : - Bước 1 : vào Templates ~> Viewtopic_body : chèn đoạn sau vào trên cùng ...
- Code:
<style type="text/css">.c3vote {border:1px solid #C2D5E3;padding:5px 8px;margin:0 3px}</style>
<script type="text/javascript">
function votetrans(a) {
return a['replace'](/Message not voted/, '<span class=c3vote>Bài viết chưa được vote</span>')['replace'](/Message reputation : (.+) \((.+) vote(s?)\)/, '<span class=c3vote>Bài viết được vote $2 lần</span> <span class=c3vote>Chất lượng: $1</span>')
}
</script>
- Bước 2 : chèn đoạn hiển thị số lần vote này vào vị trí mà bạn muốn hiển thị
- Code:
<!-- BEGIN switch_vote_active --><script type="text/javascript">document.write(votetrans("{postrow.displayed.switch_vote_active.L_VOTE_TITLE}"));</script><!-- END switch_vote_active -->
Các bạn tùy ý sửa text thay thế trong <script>. và đoạn CSS đóng khung (class c3vote) ở <style>
Enjoy
TUT by Việt K