[Zetaboard] BBCode in Topic Titles - Cho phép sử dụng BBcode tại Topic Titles

[Mr.P]

New member
Tác giả: Cory
========
Đặt code tại Below The Boards
Mã:
<script type="text/javascript">
(function ($) {
$('a.c_last-title[title*="[/"]').each(function () {
var title = $(this).attr('title');
$(this).text(title);
});

$('td.c_cat-title a, a.c_last-title, #nav li span, #topic_viewer thead th, table.posting thead th, div.search_results h3 a, table.search_results_post th a, #board_feed td a[href*="/topic"], div.portal_box h2 a, #active_list td a, table.profile td a').each(function () {
$(this).html($(this).html().replace(/\[color=(.+?)\](.+?)\[\/color]/gi, '<span style="color: $1">$2</span>').replace(/\[s\](.+?)\[\/s]/gi, '<del>$1</del>').replace(/\[b\](.+?)\[\/b]/gi, '<strong>$1</strong>').replace(/\[i\](.+?)\[\/i]/gi, '<em>$1</em>').replace(/\[u\](.+?)\[\/u]/gi, '<span style="text-decoration: underline">$1</span>'));
});

$('title:contains([/), #portal h4:contains([/)').each(function () {
$(this).html($(this).html().replace(/\[(.+?)\]/gi, ''));
});
})(jQuery);
</script>
 
Back
Top