Chuyển đến nội dung chính

Wp2android - How to insert Facebook Comment on Vbb forum (Vbulletin)


The article is in Series WordPress installation FAQ
answer the question 3 week July/2015 of readers on how to Upload files in WordPress admin.

Q: sorry to bother you, don't fall in Prince's success has a WordPress website, but I want to add the script media in wordpress admin and create file upload.js anymore, you can just please themselves? Sincere thanks!

To answer the question:

hey, you read,
1. To add media in the wordpress admin script you insert this paragraph into the admin file:
Crayon Syntax Highlighter v 2.7.1







-
add_action (' admin_enqueue_scripts ', ' tp_admin_enqueue_styles ');
add_action (' admin_enqueue_scripts ', ' tp_admin_enqueue_scripts ');

function tp_admin_enqueue_styles () {

wp_enqueue_style (' thickbox '); [ &]}

function tp_admin_enqueue_scripts () {
wp_enqueue_media ()//this is very important, don't have it is hand bouquet
http://Codex.WordPress.org/function_reference/wp_enqueue_script (' tp-upload-script ', ' http://duong_dan_den_folder/upload.js ', array (' jquery '), ' 1.0 ', true); [ &]}






12345678910111213-add_action (' admin_enqueue_scripts ', ' tp_admin_enqueue_styles '); & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; add_action (' admin_enqueue_scripts ', ' tp_admin_enqueue_scripts '); & nbsp; function tp_admin_enqueue_styles () {& nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; wp_enqueue _ style (' thickbox ');} & nbsp; function tp_admin_enqueue_scripts () {wp_enqueue_media ()//this is very important, don't have it is the taywp_enqueue_script bundle (' tp-upload-script ', ' http://duong_dan_den_folder/upload.js ', array (' jquery '), ' 1.0 ', true);}




[Format Time: 0.0031 seconds]

2. Create upload.js file inside yourself there will be js snippets like this:
name of the upload button id is: #tp_upload. This ID may be of button, input, & lt; a & gt; whichever you want.
Crayon Syntax Highlighter v 2.7.1







-
(function ($) {
"use strict"; [ &] var custom_uploader;
$ (' #tp_upload '). click (function (e) {

var img_input = $ (' #id_cua_the_input_muon_lay_link_image '); [ &] e. preventDefault ();
//If the uploader object has already been created, reopen the dialog
if (custom_uploader) {
custom_uploader. open [(); &] return;
}
//Extend the wp media object
custom_uploader = wp. media. frames. file_frame = wp. media ({
title: ' Choose Image ',
button: {
text: ' Choose Image '
},
multiple: true
});
//When a file is selected, grab the URL and set it as the text field's value
custom_uploader. on (' select ', function () {

var selection = custom_uploader. state () get (' selection '); [ &] selection.map (function (attachment) {
attachment = attachment. toJSON (); [ &] var url = attachment.url;
img_input.val (url)//this is to get the url you've just put up the tag input
});

});
//Open the uploader dialog
custom_uploader. open ();


return false;

});
}) (jQuery);




12345678910111213141516171819202122232425262728293031323334353637383940

-(function ($) {& nbsp; & nbsp; & nbsp; & nbsp; " use strict "& nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp;; var custom_uploader; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; $ (' #tp_upload '). click (function (e) {& nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; var img_input = $ (' #id_cua_the_input_muon_lay_link_image '); & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; e. preventDefault (); & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp;//If the uploader object has already been created, reopen the dialog & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; if (custom_uploader) {& nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; custom_uploader. open (); & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; return; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp;} & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp;//Extend the wp media & nbsp; object. & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; custom_uploader = wp. media. frames. file_frame = wp. media & nbsp & nbsp; ({& nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; title; : ' Choose Image & nbsp & nbsp;, '; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; button: {& nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; text: ' Choose & nbsp & nbsp; Image'; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp}; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp;: true multiple & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp;}); & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp;//When a file is selected, grab the URL and set it as the text & nbsp; & nbsp value field's; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; custom_uploader. on (' select ', function () {& nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; var selection = custom_uploader. state () get (' selection '); & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; selection.map (function (attachment) {& nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; attachment = attachment. & nbsp; toJSON; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; var url = & nbsp; & nbsp; attachment.url; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; img_input.val (url)//this is to get the url you just put in the input tag & nbsp ups; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp;}); & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp;}); & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp;//Open the uploader dialog & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; custom_uploader. open (); & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; return false; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; & nbsp; });}) (jQuery);




[Format Time: 0.0084 seconds]

You refer to. Cordially!

You can review the instructions to install WordPress in your case study to learn how to configure and set up correctly. If you have read the other comments about how to Upload files in WordPress admin please leave comments below to help you read knows how to handle this situation. Thank you for visiting the Royal Blog reading Passage.
In addition, you can refer to a number of posts or about errors in WordPress Admin:

Asked how to Upload files in WordPress admin?
Asked how this page in WordPress Admin Panel does not display properly?
Ask errors when logging into Admin after upgrading WordPress?
Asked when logging into Admin WordPress error 404?
Question sorry can not login to the WordPress Admin?

& nbsp;

photo: Asked how to Upload files in WordPress admin?

Tag: cach upload file in the wordpress admin, WordPress Admin account creation instructions, limiting the local attack in WordPress, custom WordPress Admin Guide, how to backup wordpress website, install wordpress error, error diffusion, common errors, bugs or encounter, how to handle errors, resolve the error, fix the error, situation, Vietnamese wordpress FAQ, wordpress, loi, loi Beach thuong gap, loi or gap, cach xu ly loi, Chris l loi, loi, phuc loi khac huong tinh, error install wordpress, loi cai dat wp, localhost, hosting, server, vps, may chu, viet, hostinger Payam, wordpress wordpress Multisite, wordpress plugin, wp instal operated, themes, free, download, share, documentation, faq, wordpress, and autumn dap hoi thuat wordpress , thu thuat thu thuat web, seo

Vietnamese WordPress» WordPress Hoc» using WordPress» WordPress FAQ





wordpress-mobile-app-plugin

Nhận xét

Bài đăng phổ biến từ blog này

Hệ thống phân loại phim của MPAA – Wikipedia tiếng Việt

Hiệp hội Điện ảnh Hoa Kỳ - Motion Picture Association of America (MPAA) đưa ra Hệ thống phân loại phim của MPAA và áp dụng trên toàn lãnh thổ Hoa Kỳ để phân loại phim trước khi lưu hành rộng rãi nhằm đảm bảo tựa đề, nội dung và tính chất của phim đúng với đối tượng xem. Đây là hệ thống được sử dụng rộng rãi nhất trên toàn thế giới để phân loại phim cho các đối tượng xem trẻ em, thanh thiếu niên và người lớn. Tại Hoa Kỳ, Hệ thống phân loại phim của MPAA là hệ thống được công nhận rộng rãi nhất do tính hợp lý và khoa học của nó. Hệ thống này không phải là hệ thống của Chính phủ Hoa Kỳ nên không có hiệu lực hành chính theo kiểu bắt buộc mà là hệ thống khuyến cáo có lý gợi ý cho công chúng sử dụng sao cho hợp lý vì lợi ích của chính họ và gia đình họ. Hệ thống này chỉ sử dụng trong công nghiệp điện ảnh vì MPAA đã có đăng ký và bảo vệ bản quyền cho hệ thống này [1] . Các khuyến cáo sẽ lưu ý là trong phim có hay không các nội dung đáng chú ý trước khi xem như "ngôn ngữ dung tục",

Nakajima A6M2-N – Wikipedia tiếng Việt

Máy bay tiêm kích đánh chặn/tiêm kích-ném bom Nakajima A6M2-N là một kiểu thủy phi cơ một chỗ ngồi dựa trên thiết kế chiếc Mitsubishi A6M Zero Kiểu 11. Tên chính thức của Hải quân Đế quốc Nhật Bản là Thủy phi cơ Tiêm kích Hải quân Loại 2 Kiểu 11 , trong khi Phe Đồng Minh đặt cho nó tên mã là Rufe . Chiếc thủy phi cơ này được phát triển từ kiểu máy bay tiêm kích danh tiếng Mitsubishi A6M "Zero", nhằm mục đích hỗ trợ cho các chiến dịch đổ bộ và phòng thủ các căn cứ biệt lập. Nó được dựa trên khung của phiên bản A6M-2 Kiểu 11 , với đuôi được cải tiến và bổ sung các phao nổi. Chiếc máy bay này là sản phẩm tinh thần của Shinobu Mitsutake, kỹ sư trưởng hãng Nakajima, và Atsushi Tajima, một trong những nhà thiết kế của công ty. Có tổng cộng 327 chiếc được chế tạo, kể cả chiếc nguyên mẫu ban đầu. Thật không may cho các phi công, phao nổi chính và các phao phụ hai bên cánh trang bị cho chiếc A6M2-N đã làm suy giảm tính năng bay của nó đến khoảng 20%, đủ để cho Rufe thường không theo