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 SHEET Nếu đời không có anh      ♥ Phụ Gia Nhựa Làm Giảm Co Ngót Sau Gia Công Ép Phun      ♥ Địa chỉ mua giày bảo hộ nam chính hãng      ♥ SHEET Giây phút êm đềm      ♥ Máy Triệt Lông Công Nghệ Cao K18A      ♥ Cách chọn giày bảo hộ tại Đà Nẵng      ♥ hình ảnh Yae Miko Game Genshin Impact      ♥ Cách bảo quản và vệ sinh giày bảo hộ lao động      ♥ SHEET Yêu 1 người sao buồn đến thế      ♥ Bí quyết bảo quản giày bảo hộ lao động      ♥ Máy Triệt Lông Lạnh Diode Laser K17      ♥ Công Nghệ Đùn Ống Nhựa Với Hạt Nhựa Nguyên Sinh      ♥ SHEET Xin cho 1 tiếng kinh cầu      ♥ máy nâng cơ xóa nhăn      ♥ Top 5 dầu gội thảo dược Việt nam 2025      ♥ Nhà phân phối giày bảo hộ tại Đà Nẵng uy tín      ♥ Máy Laser 1450nm Noable Triệt Dầu - Trị Mụn      ♥ Những ích lợi từ dầu gội thảo dược trị gàu      ♥ Công ty bảo hộ lao động tại Nghệ An uy tín      ♥ SHEET Vì em quá yêu anh      

[ 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,003
Tiền mặt: 1,210
Thanked: 1572
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
 
Reply to this topicStart new topicStart Poll
Trả Lời



Thank you! Reply to this topicTopic OptionsStart new topic
 

Bản Rút Gọn Bây giờ là: 18th July 2025 - 02:23 PM
Home | Mạng xã hội | Blog | Thiệp điện tử | Tìm kiếm | Thành viên | Sổ lịch