[SOLVED]Upload-media buttons in question_form.php don't work
(4 posts) (2 voices)-
Hi Binny, first of all thank u for survey!
There is a (I suppose) bug I found nothing in the forum about.
When I click the add media buttons (image/audio ecc.) the thick box doesn't work and the upload div opens at the bottom of the page.
I don't understand enough about wp js include but I have to include tinymce editor.
Please, Binny or anyone, can help me?
(I use Surveys v.1.01.2, tested on Firefox and Opera)Posted 2 years ago # -
nobody with the same problem? maybe a problem of my browsers?
however, I try to change the original ones in 'question_form.php' (about lines 90-100):
wp_enqueue_script( 'jquery' );
wp_enqueue_script( 'prototype' );
wp_print_scripts('post');
wp_print_scripts('editor');
if(function_exists('add_thickbox')) add_thickbox(); //Make sure it works with WP 2.5
wp_enqueue_script('media-upload');
if (function_exists('wp_tiny_mce')) wp_tiny_mce();
wp_print_scripts();
with these lines found at [url:1w7wqt0k]http://blog.zen-dreams.com/en/2008/11/06/how-to-include-tinymce-in-your-wp-plugin/[/url:1w7wqt0k]:
wp_admin_css('thickbox');
wp_print_scripts('post');
wp_print_scripts('editor');
add_thickbox();
wp_print_scripts('media-upload');
wp_print_scripts('jquery');
wp_print_scripts('jquery-ui-core');
wp_print_scripts('jquery-ui-tabs');
in this way it works for me.
I hope it can help somebodyPosted 2 years ago # -
Thanks for the code. I'll add it in all my plugins that use the editor.
PS: Sorry about the delay in replying - I was very busy.Posted 2 years ago # -
ok I put solved in title
ps: don't worry for delay and excuse me, I didn't want to do you in a hurry
Posted 2 years ago #
Reply
You must log in to post.