25-08-2012, 09:50 PM
Bài 8: thêm button vào khung soạn thảo:

Bây giờ các bạn vào ACP -> Configuration -> My code tạo 1 mycode mới với nội dung như sau:
Title *: Zing
Short Description: Zing Mp3
Regular Expression *

Lưu lại. Đến đây mới tạo xong Mycode thôi nó chưa hiện ra đâu nhá.
Bây giờ các bạn vào host tới đường dẫn như sau public_html/giaoducviet.net/forum/jscripts
Tìm file editor.js mở tim
Thêm vào phía dưới đoạn sau
Tiếp nữa là tải icon zing up vào public_html/giaoducviet.net/forum/jscripts/editor_themes/ default
và public_html/giaoducviet.net/forum/jscripts/editor_themes/Office_2007
Vậy là xong. Chúc các bạn thành công

Bây giờ các bạn vào ACP -> Configuration -> My code tạo 1 mycode mới với nội dung như sau:
Title *: Zing
Short Description: Zing Mp3
Regular Expression *
Code:
\[zing\](.*?)\[/zing\]
Replacement *
Code:
<object width="430"
height="80"><param name="movie"
value="$1"></param><embed
src="http://static.mp3.zing.vn/skins/gentle/flash/mp3Player.swf?xmlURL=http://mp3.zing.vn/play/?pid=$1||4&songID=0&autoplay=false&wmode=transparent&1"
type="application/x-shockwave-flash" width="430"
height="80"></embed></object>
Enabled? * Yes

Lưu lại. Đến đây mới tạo xong Mycode thôi nó chưa hiện ra đâu nhá.
Bây giờ các bạn vào host tới đường dẫn như sau public_html/giaoducviet.net/forum/jscripts
Tìm file editor.js mở tim
Code:
{type: 'button', name: 'color',
insert: 'color', dropdown: true, color_select: true, image: 'color.gif',
draw_option: this.drawColorOption, options: this.colors},
Thêm vào phía dưới đoạn sau
Code:
{type: 'button', name: 'Zing', insert:
'Zing', image: 'zing.gif', title:
'http://mp3.zing.vn/bai-hat/Thu-Cuoi-Yanbi-ft-Mr-T/ZWZECED8.html chỉ
lấy đoạn ZWZECED8'},
Tiếp nữa là tải icon zing up vào public_html/giaoducviet.net/forum/jscripts/editor_themes/ default
và public_html/giaoducviet.net/forum/jscripts/editor_themes/Office_2007
Vậy là xong. Chúc các bạn thành công
Hãy nhấn Like - Share Nếu Bài Viết Có Ích