bbcode thông báo notification hide
Cũng ko biết diễn tả sao cũng như bbcode hide ngày trước thôi. nhưng làm trên sceditor
Nút hide mặc định ko có thông báo notification khiến member ko biết được là bài đó bị ẩn / thay việc thêm thủ công thì mình cho vào nút bbcode thì khi nào click nút hide là dc thêm dòng (You need to reply to see the hidden content)
Acp >> modules >>HTML & JAVASCRIPT >> Add a Javascript Code > Click all
jquery bbcode notification hide text
Code:
$(function(){
$(function(){
$('<a class="sceditor-button sceditor-button-fahide-hotrofm" unselectable="on"><div unselectable="on">Hide</div></a>').insertAfter('.sceditor-button-fahide').click(function(){
$('#text_editor_textarea').sceditor("instance").insertText("(You need to reply to see the hidden content)[hide]","[/hide]");
});
});
$("body").prepend("<style>.sceditor-button-fahide-hotrofm div {background-position: 0 -692px;}.sceditor-button-fahide {display: none !important;}</style>");
});
Các bạn có thể thay lại thông báo notification dạng text thành dạng ảnh như này
jquery bbcode notification hide image
Code:
$(function(){
$(function(){
$('<a class="sceditor-button sceditor-button-fahide-hotrofm" unselectable="on"><div unselectable="on">Hide</div></a>').insertAfter('.sceditor-button-fahide').click(function(){
$('#text_editor_textarea').sceditor("instance").insertText("[img]https://i37.servimg.com/u/f37/19/53/09/53/unlock10.gif[/img][hide]","[/hide]");
});
});
$("body").prepend("<style>.sceditor-button-fahide-hotrofm div {background-position: 0 -692px;}.sceditor-button-fahide {display: none !important;}</style>");
});
Tags: #code #forumotion #bbcode