WordPress.org

Forums

Black Studio TinyMCE Widget
[resolved] Images Wont load (5 posts)

  1. tonymillermcr
    Member
    Posted 2 years ago #

    Call me stupid, but using the camera icon as normal I cant load images either from "computer" or "media library". I use the "insert into post" and nothing happens???

    http://wordpress.org/extend/plugins/black-studio-tinymce-widget/

  2. tonymillermcr
    Member
    Posted 2 years ago #

    Sorry Marco
    If I'd have read most of the posts I would have realised its another plugin conflicting (Weptile Image Slider)
    Got it resolved with another slider I can use with your plugin.

    Great Plugin

  3. Marco Chiesi
    Member
    Plugin Author

    Posted 2 years ago #

    I'm glad that you have resolved. In the future I'll try to take a look at that conflict with Weptile Image Slider, and find a solution to let our plugin work together with it.
    Thank you.

  4. Marco Chiesi
    Member
    Plugin Author

    Posted 2 years ago #

    I made further investigation on this issue. The responsible is the Weptile Image Slider, which alters a native WP javascript function (send_to_editor), without restoring it.

    If anyone is interested in let Black Studio TinyMCE Widget play together with Weptile Image Slider, here's an hack.

    Change the js/weptile-image-slider-widget-admin.js file coming with Weptile Image Slider as follows:

    Locate this block of code:

    jQuery('[id$="slider-images-upload-button"]').live('click',function () {
    		submit_button_id = jQuery(this).attr('id');
    		img_url_text_container_id = jQuery(this).prev().attr('id');
    		tb_show('', 'media-upload.php?TB_iframe=true&');
    
    		var iframe = jQuery('#TB_iframeContent');
    		iframe.css('display','none');
    		iframe.load(function(){
    			var iframeDoc = iframe[0].contentWindow.document;
    			var iframeJQuery = iframe[0].contentWindow.jQuery;
    			iframeJQuery('#tab-type_url').remove();
    			iframe.css('display','');
    			apply_insert_button_filter(iframeJQuery);
    		});
    
    		return false;
    	});
    
    	window.send_to_editor = function (html) {
    		var imgurl = jQuery('img', html).attr('src');
    		jQuery('#'+img_url_text_container_id).val(imgurl).prop('disabled',false);
    		clearTimeout(timeout);
    		tb_remove();
    		jQuery('#' + submit_button_id).parent().parent().find('input[name=savewidget]').click();
    	};

    and change it to:

    jQuery('[id$="slider-images-upload-button"]').live('click',function () {
    		window.weptile_backup_send_to_editor = window.send_to_editor;
    		window.send_to_editor = window.weptile_send_to_editor;
    		submit_button_id = jQuery(this).attr('id');
    		img_url_text_container_id = jQuery(this).prev().attr('id');
    		tb_show('', 'media-upload.php?TB_iframe=true&');
    
    		var iframe = jQuery('#TB_iframeContent');
    		iframe.css('display','none');
    		iframe.load(function(){
    			var iframeDoc = iframe[0].contentWindow.document;
    			var iframeJQuery = iframe[0].contentWindow.jQuery;
    			iframeJQuery('#tab-type_url').remove();
    			iframe.css('display','');
    			apply_insert_button_filter(iframeJQuery);
    		});
    		return false;
    	});
    
    	window.weptile_send_to_editor = function (html) {
    		var imgurl = jQuery('img', html).attr('src');
    		jQuery('#'+img_url_text_container_id).val(imgurl).prop('disabled',false);
    		clearTimeout(timeout);
    		tb_remove();
    		jQuery('#' + submit_button_id).parent().parent().find('input[name=savewidget]').click();
    		window.send_to_editor = window.weptile_backup_send_to_editor;
    	};
  5. weptile
    Member
    Posted 2 years ago #

    Marco thank you again for spotting this. We'll fix this in our next plugin update. FYI.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Black Studio TinyMCE Widget
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic

Tags