New articles Năng lực quản lý: nhân tố thứ năm     ♥ Lựa chọn mục tiêu cuộc đời     ♥ 10 bí quyết cân bằng công việc và gia đình     ♥ Cô đơn trên mạng     ♥ Chứng khoán: Giấc mơ và ác mộng     ♥ Tám     ♥ Những tính năng của blog VnVista     ♥ Các mạng xã hội thống trị Google     ♥ Điều gì tạo nên một giám đốc công nghệ thông tin giỏi?     ♥ Cố gắng xóa bỏ những ấn tượng xấu     ♥ Cần một cách làm ăn mới     ♥ Tiếp thị hướng đến doanh nhân     ♥ Đưa cửa hàng thật lên chợ ảo     ♥ Bí quyết quản lý các nhân viên trẻ     ♥ Một số câu hỏi phỏng vấn “đặc biệt” của Microsoft     ♥ 4 bài học thành công trong kinh doanh     ♥ Tạo dựng hình ảnh một cô gái trẻ chuyên nghiệp     ♥ Góc “khác” của thế giới online đêm     ♥ Phong cách người Mỹ     ♥ Chỉ nghĩ đến tiền cũng làm người ta ích kỷ     
New blog entries So sánh Màn Hình LED P3 và P2.5 Trong Nhà      ♥ Tư vấn lắp đặt màn hình LED tại tỉnh Thanh Hóa      ♥ Khái niệm về bản kiểm điểm      ♥ 小牧市 お宮参り 写真      ♥ Trải nghiệm âm thanh đỉnh cao cùng HIKVISION      ♥ 探偵 大分      ♥ Tìm hiểu xét nghiệm gene hemophilia là gì? Thời gi      ♥ Thủ tục giải trình với cơ quan thuế chi tiết      ♥ ノースフェイス 通販      ♥ Stepmother Gifts - 60+ Gift Ideas for 2024      ♥ Trẻ sơ sinh thiếu G6PD có nguy hiểm không? Việc bố      ♥ Kê khai thuế GTGT trên tờ khai 01/GTGT      ♥ 探偵 大分      ♥ Tư vấn lắp đặt màn hình LED tại tỉnh Tuyên Quang      ♥ Tư vấn lắp đặt màn hình LED tại huyện Hoài Đức      ♥ 探偵 大分      ♥ Tủ đồ nghề chia khay 7 ngăn      ♥ Rút BHXH 1 lần mất nhiều hơn được      ♥ Quy hoạch Hà Nội      ♥ SHEET Kiếp ve sầu      
 
Reply to this topicStart new topicStart Poll

Liệt Kê · [ Bình Thường ] · Tách Biệt+

Tạo nút post Media & Flash trong ipb 2.1.x


Tacaza
post Oct 29 2005, 12:01 PM
Gửi vào: #1


Group Icon

The chALLeNgER
**********
Thành viên: 1
Nhập: 3-July 05
Bài viết: 3,022
Tiền mặt: 1,210
Thanked: 1571
Cấp bậc: 43
------
Giới tính: Male
Sinh nhật: 3 Tháng 4 - 1983
Đến từ: Hà Nội
------
Xem blog
Bạn bè: 253 (Xem)
Thêm vào nhóm bạn bè
Gửi thiệp điện tử
Trang thông tin





Mình không dùng ipb 2.1.x, nhưng vì có bạn hỏi về cách tạo nút media & flash trong 2.1.x nên đã cài thử trên localhost để thử tìm hiểu. Và đây là cách tạo nút media & flash (ai thích thêm nút post real nữa thì cứ dựa theo code này mà thêm thôi)

- Download file ảnh về, cho 2 file flash.gif & media.gif vào thư mục style_images\xxx\folder_rte_images


- Vào ACP --> Look & Feel --> Skin Manager --> Edit Template HTMl --> editor_std

Tìm:
CODE
// Easy prompts


Thêm bên trên:

CODE
// Media & Flash

var text_enter_media = "Enter URL to the media file";
var text_enter_flash = "Enter URL to the flash file";
var text_enter_size  = "Enter the size for the flash file";
var text_enter_state = "Auto play? ( yes = '' 1 ''   ||   no = '' 0 '' )";



- ACP --> Look & Feel --> Skin Manager --> Edit Template HTMl --> editor_std
Tìm:

CODE
<td><div><img class="rteimage" src="{ipb.vars['img_url']}/folder_rte_images/hyperlink.gif" width="25" height="24"

alt="{ipb.lang['js_tt_link']}" title="{ipb.lang['js_tt_link']}" onclick="tag_url()"></div></td>
 <td><div><img class="rteimage" src="{ipb.vars['img_url']}/folder_rte_images/email.gif" width="25" height="24"

alt="{ipb.lang['js_tt_email']}" title="{ipb.lang['js_tt_email']}" onclick="tag_email()"></div></td>
 <td><div><img class="rteimage" src="{ipb.vars['img_url']}/folder_rte_images/image.gif" width="25" height="24"

alt="{ipb.lang['js_tt_image']}" title="{ipb.lang['js_tt_image']}" onclick="tag_image()"></div></td>
 <!--SEP-->
 <td><img class="rteVertSep" src="{ipb.vars['img_url']}/folder_rte_images/blackdot.gif" width="1" height="20"

border="0" alt=""></td>
 <!--/SEP-->



Thêm dưới:

CODE
<td><div><img class="rteimage"

src="{ipb.vars['img_url']}/folder_rte_images/media.gif" alt="{ipb.lang['js_tt_media']}" title="{ipb.lang['js_tt_media']}"

onclick="tag_media()"></div></td>
   <td><div><img class="rteimage" src="{ipb.vars['img_url']}/folder_rte_images/flash.gif"  

alt="{ipb.lang['js_tt_flash']}" title="{ipb.lang['js_tt_flash']}" onclick="tag_flash()"></div></td>
  <!--SEP-->
 <td><img class="rteVertSep" src="{ipb.vars['img_url']}/folder_rte_images/blackdot.gif" width="1" height="20"
border="0" alt=""></td>
 <!--/SEP-->



- Mở file cache\lang_cache\xxx\lang_editors.php. Tìm:

CODE

$lang = array (


Thêm vào sau:

CODE
'js_tt_media' => "Insert Media",
'js_tt_flash'  => "Insert Flash",



- Mở file jscripts/editor_std.js
Tìm:

CODE
/*-------------------------------------------------------------------------*/
// Toggle button highlighting (used when clicked on)
/*-------------------------------------------------------------------------*/


Thêm vào trước đó:

CODE
/*-------------------------------------------------------------------------*/
// Media & Flash
/*-------------------------------------------------------------------------*/


function tag_media()
{
var FoundErrors = '';
var enterINFO   = prompt(text_enter_media, "http://");
var enterSTATE  = prompt(text_enter_state, "1");

if ( ! enterINFO ) {
 FoundErrors += " " + error_no_url;
}

if ( ! enterSTATE ) {
 FoundErrors += " " + error_no_url;
}

if ( FoundErrors ) {
 alert("Error! " + error_no_url);
 return;
}

wrap_tags( "[media="+enterSTATE+"]"+enterINFO+"[/media]", "" );
}

function tag_flash()
{
var FoundErrors = '';
var enterINFO   = prompt(text_enter_flash, "http://");
var enterSIZE  = prompt(text_enter_size, "500");

if (!  enterINFO ) {
 FoundErrors += " " + error_no_url;
}

if ( ! enterSIZE ) {
 FoundErrors += " " + error_no_url;
}

if ( FoundErrors ) {
 alert("Error! " + error_no_url);
 return;
}

wrap_tags( "[flash="+enterSIZE+"]"+enterINFO+"[/flash]", "" );
}



- Vô ACP -> Management --> Add New BBCode

Custom BBCode Title: Media
Custom BBCode Description: Post Media
Custom BBCode Example:
CODE
[media=1]This is an example![/media]

Custom BBCode Tag: Media
Use Option in tag?: Chọn Yes
Custom BBCode Replacement: điền đoạn sau:

CODE
<OBJECT id=Player height=45 width=500
  classid=clsid:6BF52A52-394A-11d3-B153-00C04F79FAA6>
  <PARAM NAME="URL" VALUE='{content}'><PARAM NAME="rate" VALUE="1">
  <PARAM NAME="balance" VALUE="0">
  <PARAM NAME="currentPosition" VALUE="1">
  <PARAM NAME="defaultFrame" VALUE="">
  <PARAM NAME="playCount" VALUE="1"><PARAM NAME="autoStart"

VALUE="{option}">
  <PARAM NAME="loop" VALUE="-1"><PARAM NAME="currentMarker"

VALUE="0">
  <PARAM NAME="invokeURLs" VALUE="-1"><PARAM NAME="baseURL"

VALUE="">
  <PARAM NAME="volume" VALUE="100"><PARAM NAME="mute" VALUE="0">
  <PARAM NAME="uiMode" VALUE="full">
  <PARAM NAME="stretchToFit" VALUE="0">
  <PARAM NAME="windowlessVideo" VALUE="0">
  <PARAM NAME="enabled" VALUE="-1">
  <PARAM NAME="enableContextMenu" VALUE="0">
  <PARAM NAME="fullScreen" VALUE="0"><PARAM NAME="ShowDisplay"

VALUE="0">
  <PARAM NAME="ShowStatusBar" VALUE="0"><PARAM NAME="SAMIStyle"

VALUE="">
  <PARAM NAME="SAMILang" VALUE=""><PARAM NAME="SAMIFilename"

VALUE="">
  <PARAM NAME="captioningID" VALUE=""><PARAM NAME="enableErrorDialogs"

VALUE="0">
  <PARAM NAME="_cx" VALUE="7938"><PARAM NAME="_cy" VALUE="6482">
 <embed type='application/x-mplayer2' autostart="{option}" src='{content}' height="400"

width="450"></embed></OBJECT>



Add BBCode


Thêm tiếp BBCode:
Custom BBCode Title: Flash
Custom BBCode Description: Post Flash
Custom BBCode Example:
CODE
[flash=500]This is an example![/flash]

Custom BBCode Tag: Flash
Use Option in tag?: Chọn Yes
Custom BBCode Replacement: điền đoạn sau:

CODE
<embed type='application/x-shockwave-flash' src='{content}' width='{option}' height='{option}'></embed>


Xong! Đọan thẻ media trên cũng chống click chuột phải. Ai copy sang diễn đàn khác để lại hộ cái tên mình nhé lol 1.gif
(Khách không được phép xem hoặc tải dữ liệu đính kèm!)


--------------------
Nhóm bạn bè:


dung_buong_tay

tamhonngoc_536

uchinhuong

MTTH

xuxusp2

Xem tất cả


--------------------

Sao không là mặt trời, gieo hạt nắng vô tư?


 
Nếu bạn thấy bài viết này vi phạm nội quy forum, hãy click nút này:
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

lsvan
post Dec 7 2005, 12:10 PM
Gửi vào: #2
No avartar

Group Icon

Nhân viên
**
Thành viên: 617
Nhập: 6-December 05
Bài viết: 26
Tiền mặt: 32
Thanked: 30
Cấp bậc: 3
------
Giới tính: Male
------
Bạn bè: 0
Thêm vào nhóm bạn bè
Gửi thiệp điện tử
Trang thông tin





hình như đọan bbcode trên ko post được nhạc hình thì phải,tacaza cho lsvan xin đoạn bb code post nhạc hình luôn nha


--------------------
Nhóm bạn bè:

Thành viên này chưa có người bạn nào trong mạng VnVista, nếu bạn muốn trở thành người bạn đầu tiên của thành viên này, hãy click vào đây


Cảnh cáo: (0%)----- 
Nếu bạn thấy bài viết này vi phạm nội quy forum, hãy click nút này:
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

Tacaza
post Dec 7 2005, 12:33 PM
Gửi vào: #3


Group Icon

The chALLeNgER
**********
Thành viên: 1
Nhập: 3-July 05
Bài viết: 3,022
Tiền mặt: 1,210
Thanked: 1571
Cấp bậc: 43
------
Giới tính: Male
Sinh nhật: 3 Tháng 4 - 1983
Đến từ: Hà Nội
------
Xem blog
Bạn bè: 253 (Xem)
Thêm vào nhóm bạn bè
Gửi thiệp điện tử
Trang thông tin





Ok, nếu muốn post nhạc hình thì bạn thay đoạn bbcode cho media trên bằng đoạn này:

CODE
<OBJECT id=Player height=370 width=400
           classid=clsid:6BF52A52-394A-11d3-B153-00C04F79FAA6><PARAM NAME="URL" VALUE='{content}'><PARAM NAME="rate" VALUE="1"><PARAM NAME="balance" VALUE="0"><PARAM NAME="currentPosition" VALUE="1"><PARAM NAME="defaultFrame" VALUE=""><PARAM NAME="playCount" VALUE="1"><PARAM NAME="autoStart" VALUE="{option}"><PARAM NAME="loop" VALUE="-1"><PARAM NAME="currentMarker" VALUE="0"><PARAM NAME="invokeURLs" VALUE="-1"><PARAM NAME="baseURL" VALUE=""><PARAM NAME="volume" VALUE="50"><PARAM NAME="mute" VALUE="0"><PARAM NAME="uiMode" VALUE="full"><PARAM NAME="stretchToFit" VALUE="0"><PARAM NAME="windowlessVideo" VALUE="0"><PARAM NAME="enabled" VALUE="-1"><PARAM NAME="enableContextMenu" VALUE="0"><PARAM NAME="fullScreen" VALUE="0"><PARAM NAME="ShowDisplay" VALUE="0"><PARAM NAME="ShowStatusBar" VALUE="0"><PARAM NAME="SAMIStyle" VALUE=""><PARAM NAME="SAMILang" VALUE=""><PARAM NAME="SAMIFilename" VALUE=""><PARAM NAME="captioningID" VALUE=""><PARAM NAME="enableErrorDialogs" VALUE="0"><PARAM NAME="_cx" VALUE="7938"><PARAM NAME="_cy" VALUE="6482">
<embed type='application/x-mplayer2' src='{content}' height="400" width="450" autostart="{option}"></embed>
</OBJECT>


--------------------
Nhóm bạn bè:


dung_buong_tay

tamhonngoc_536

uchinhuong

MTTH

xuxusp2

Xem tất cả


--------------------

Sao không là mặt trời, gieo hạt nắng vô tư?


 
Nếu bạn thấy bài viết này vi phạm nội quy forum, hãy click nút này:
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

Thank you ^_^
post Jun 14 2006, 06:48 PM
Gửi vào: #4


Group Icon

..::| Xin cảm un |::..
*********
Thành viên: 263
Nhập: 21-October 05
Bài viết: 1,313
Tiền mặt: 1
Thanked: 0
Cấp bậc: 31
------
Giới tính: Female
Đến từ: VnVista
------
Bạn bè: 0
Thêm vào nhóm bạn bè
Gửi thiệp điện tử
Trang thông tin





3 thành viên đã cám ơn người lập chủ đề:
lsvan, www.timviet.info, Husky


--------------------
Nhóm bạn bè:

Thành viên này chưa có người bạn nào trong mạng VnVista, nếu bạn muốn trở thành người bạn đầu tiên của thành viên này, hãy click vào đây


--------------------
user posted image


Cảnh cáo: (0%)----- 
Nếu bạn thấy bài viết này vi phạm nội quy forum, hãy click nút này:
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

hienhq
post May 24 2006, 08:58 AM
Gửi vào: #5


Group Icon

Thực tập viên
*
Thành viên: 1,111
Nhập: 20-February 06
Bài viết: 10
Tiền mặt: 98
Thanked: 0
Cấp bậc: 2
------
Giới tính: Male
Đến từ: Phố núi
------
Xem blog
Bạn bè: 0
Thêm vào nhóm bạn bè
Gửi thiệp điện tử
Trang thông tin





hic, chưa được tac ui, nó báo error on page, và nó không nhận bbcode nì, sao dzị tac?

'js_tt_media' => "Insert Media",
'js_tt_flash' => "Insert Flash",

vấn đề nằm ở đây, mình dùng lang việt hoá, với lang của mình thì add vào đâu tac? help me?

QUOTE
<?php

$lang['button_init']  = "Initializing...";
$lang['jsfile_error']  = "Error!";
$lang['jsfile_error_c']  = "Error:";
$lang['jsfile_mywebpage']  = "My Webpage";
$lang['jsfile_alert1']  = "Some revisions of Mozilla/Firefox do not support programatic ";
$lang['jsfile_alert2']  = "access to cut/copy/paste functions, for security reasons.  ";
$lang['jsfile_alert3']  = "Your browser is one of them.  Please use the standard key combinations:";
$lang['jsfile_alert4']  = "CTRL-X for cut, CTRL-C for copy, CTRL-V for paste.";
$lang['jsfile_highlight']  = "You must highlight some text before making it a link";
$lang['jsfile_erroriespell']  = "ieSpell not detected.  Click Ok to go to download page.";
$lang['jsfile_errorliespell']  = "Error Loading ieSpell: Exception ";
$lang['js_forced_change']  = "You have set \'Rich Text Editor\' as your editor but your browser isn\'t compatible with it. The standard editor has been used instead.";
$lang['js_tt_closeall']  = "Close All Tags";
$lang['js_tt_bold']  = "Bold";
$lang['js_tt_italic']  = "Italic";
$lang['js_tt_underline']  = "Underline";
$lang['js_tt_strike']  = "Strikethrough";
$lang['js_tt_font_col']  = "Text Color";
$lang['js_tt_back_col']  = "Background Color";
$lang['js_tt_link']  = "Insert Link";
$lang['js_tt_image']  = "Insert Image";
$lang['js_tt_email']  = "Insert Email";
$lang['js_tt_quote']  = "Wrap in a Quote";
$lang['js_tt_left']  = "Align Left";
$lang['js_tt_center']  = "Align Center";
$lang['js_tt_right']  = "Align Right";
$lang['js_tt_list']  = "Insert List";
$lang['js_tt_indent']  = "Indent";
$lang['js_tt_outdent']  = "Outdent";
$lang['js_tt_noformat']  = "Remove Formatting";
$lang['js_tt_undo']  = "Undo";
$lang['js_tt_redo']  = "Redo";
$lang['js_tt_copy']  = "Copy";
$lang['js_tt_paste']  = "Paste";
$lang['js_tt_cut']  = "Cut";
$lang['js_tt_code']  = "Code";
$lang['box_font']  = "Font";
$lang['box_size']  = "Size";
$lang['js_bbeasy_on']  = "Guided Mode Enabled";
$lang['js_bbeasy_off']  = "Guided Mode Off";
$lang['js_bbeasy_toggle']  = "Click to toggle guided mode";
$lang['remove_attach']  = "Are you sure you wish to remove this attachment?";
$lang['js_close_all_tags']  = "Close all Tags";
$lang['js_tag_list']  = "Enter a list item. Click \'cancel\' or leave blank to end the list";
$lang['jscode_text_enter_url']  = "Enter the complete URL for the hyperlink";
$lang['jscode_text_enter_email']  = "Enter the email address";
$lang['jscode_text_code']  = "Usage:
CODE
Your Code Here..
";
$lang['jscode_error_no_title']  = "You must enter a title";
$lang['jscode_text_quote']  = "Usage:
QUOTE
Your Quote Here..
";
$lang['jscode_error_no_url'] = "You must enter a URL";
$lang['jscode_text_enter_image'] = "Enter the complete URL for the image";
$lang['jscode_error_no_width'] = "You must enter a width";
$lang['jscode_text_enter_url_name'] = "Enter the title of the webpage";
$lang['jscode_error_no_email'] = "You must enter an email address";
$lang['js_used'] = "So far, you have used";
$lang['js_max_length'] = "The maximum allowed length is";
$lang['js_post'] = "Post";
$lang['js_no_message'] = "You must enter a message to post!";
$lang['js_current'] = "Current Characters";
$lang['js_characters'] = "characters";
$lang['msg_no_title'] = "You must enter a message title";
$lang['js_check_length'] = "Check Post Length";
$lang['hb_open_tags'] = "Open Tags";
$lang['js_text_to_format'] = "Enter the text to be formatted";

?>



Bài viết đã được chỉnh sửa bởi hienhq: May 24 2006, 09:12 AM


--------------------
Nhóm bạn bè:

Thành viên này chưa có người bạn nào trong mạng VnVista, nếu bạn muốn trở thành người bạn đầu tiên của thành viên này, hãy click vào đây


--------------------


Cảnh cáo: (0%)----- 
Nếu bạn thấy bài viết này vi phạm nội quy forum, hãy click nút này:
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

hienhq
post May 24 2006, 07:28 PM
Gửi vào: #6


Group Icon

Thực tập viên
*
Thành viên: 1,111
Nhập: 20-February 06
Bài viết: 10
Tiền mặt: 98
Thanked: 0
Cấp bậc: 2
------
Giới tính: Male
Đến từ: Phố núi
------
Xem blog
Bạn bè: 0
Thêm vào nhóm bạn bè
Gửi thiệp điện tử
Trang thông tin





hic, help me mọi người và tacaza ui 20.gif


--------------------
Nhóm bạn bè:

Thành viên này chưa có người bạn nào trong mạng VnVista, nếu bạn muốn trở thành người bạn đầu tiên của thành viên này, hãy click vào đây


--------------------


Cảnh cáo: (0%)----- 
Nếu bạn thấy bài viết này vi phạm nội quy forum, hãy click nút này:
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

hienhq
post May 25 2006, 03:58 PM
Gửi vào: #7


Group Icon

Thực tập viên
*
Thành viên: 1,111
Nhập: 20-February 06
Bài viết: 10
Tiền mặt: 98
Thanked: 0
Cấp bậc: 2
------
Giới tính: Male
Đến từ: Phố núi
------
Xem blog
Bạn bè: 0
Thêm vào nhóm bạn bè
Gửi thiệp điện tử
Trang thông tin





phù, cuối cùng làm cũng được, flash thì okie rùi, còn media thì vẫn chưa chạy mọi người ạ! 4.gif


--------------------
Nhóm bạn bè:

Thành viên này chưa có người bạn nào trong mạng VnVista, nếu bạn muốn trở thành người bạn đầu tiên của thành viên này, hãy click vào đây


--------------------


Cảnh cáo: (0%)----- 
Nếu bạn thấy bài viết này vi phạm nội quy forum, hãy click nút này:
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

Thank you! Reply to this topicTopic OptionsStart new topic
 

Bản Rút Gọn Bây giờ là: 27th April 2024 - 03:58 AM
Home | Mạng xã hội | Blog | Thiệp điện tử | Tìm kiếm | Thành viên | Sổ lịch