hjgode
Forum Replies Created
Viewing 3 replies - 1 through 3 (of 3 total)
-
Forum: Plugins
In reply to: [Download Monitor] Upload not working, (Insert Into post) not workingHi
I found the fix myself:
Original code:
jQuery('#insertdownload').click(function(){ var win = window.dialogArguments || opener || parent || top; var closed = jQuery('#format option:selected').data('closed'); var content = ''; if (closed) { var title = jQuery(this).data('title'); content = title == '' ? "<?php _e( 'Replace me with your own content', 'wp-download_monitor' ) ?>" : title; } closed = closed ? '<span id="caret_pos_holder">' + content + '</span>[/download]' : ''; if (jQuery('#format').val()>0) win.send_to_editor('<?php echo $html; ?> format="' + jQuery('#format').val() + '"]' + closed); else win.send_to_editor('<?php echo $html; ?>]' + closed); if (closed != '') { var ed = win.tinyMCE.activeEditor; var caret = ed.dom.select('span#caret_pos_holder')[0]; ed.dom.setAttrib(caret, 'id', '') ed.selection.select(caret); // ed.dom.remove(caret); }); }
new code:
jQuery('#insertdownload').click(function(){ var win = window.dialogArguments || opener || parent || top; var closed = jQuery('#format option:selected').data('closed'); var content = ''; if (closed) { var title = jQuery(this).data('title'); content = title == '' ? "<?php _e( 'Replace me with your own content', 'wp-download_monitor' ) ?>" : title; } closed = closed ? '<span id="caret_pos_holder">' + content + '</span>[/download]' : ''; if (jQuery('#format').val()>0) win.send_to_editor('<?php echo $html; ?> format="' + jQuery('#format').val() + '"]' + closed); else win.send_to_editor('<?php echo $html; ?>]' + closed); if (closed != '') { var ed = win.tinyMCE.activeEditor; //set caret to end of insert var caret = ed.dom.select('span#caret_pos_holder')[0]; ed.dom.setAttrib(caret, 'id', ''); ed.selection.select(caret); // ed.dom.remove(caret); } });
The last two line have been exchanged.
I run into the similar problem (Insert into post not working) and found that Download Monitor is no longer updated.
Did you ever find a fix for the problem?
Possibly someone will take over the code and fix the bug.
Forum: Plugins
In reply to: [Download Monitor] Missing argument 2 for wpdb::prepare()Thanks a lot, @wp_newbe the chang works for me. But it woul be nice to include file name and line number the next time.
I am still seeing problems:
New downloads are not inserted into post when (Insert) is pressed in Download-Monitor. I had to look thru the download list and then select Insert there to get the download inserted into my post.regards
Josef
Viewing 3 replies - 1 through 3 (of 3 total)