WordPress.org

Ready to get started?Download WordPress

Forums

Podcasting 1.0 Plugin (17 posts)

  1. pcsmythe
    Member
    Posted 6 years ago #

    We installed the plugin, but we do not get a Send-to-Editor button in the WYSIWYG editor. We have added the podcast url, the author, tags, and updated the information, but that's it.

  2. pcsmythe
    Member
    Posted 6 years ago #

    We finally have figured out the Send to Editor button, but here's the deal:

    We do the Send to Editor and we get this:

    [podcast]http://petersmythe.org/podcasts/RFPodcast10032007.mp3[/podcast]

    but there is no player on the post at all. What are we doing wrong? Thanks.

  3. cavemonkey50
    Member
    Posted 6 years ago #

    I worked with pcsmythe to resolve a htaccess issue with thire webhost. This topic can now be marked resolved.

  4. lostgorilla
    Member
    Posted 6 years ago #

    Could you shed any light on what the issue was? I am having the exact same issue. I cannot get your plugin or Podpress to work on my site.

  5. cavemonkey50
    Member
    Posted 6 years ago #

    lostgorilla, most likely you uploaded the files contained in the podcasting folder directly to your wp-content/plugins folder. The correct structure should be to upload the whole podcasting directory to wp-content so it looks like this:

    /wp-content/plugins/podcasting/

  6. gcrocker
    Member
    Posted 6 years ago #

    On WordPress-MU, 2.3, when I click 'Send to editor', nothing happens.

    Any ideas?

    -glenn

  7. cavemonkey50
    Member
    Posted 6 years ago #

    Did you verify everything is in the correct location per the reply above you? If you have, I'll some testing with WordPress MU tomorrow and see if I notice anything out of the ordinary.

  8. moshu
    Member
    Posted 6 years ago #

    On WordPress-MU, 2.3,

    Then don't post here. MU has its own forum!

  9. gcrocker
    Member
    Posted 6 years ago #

    Yeah, /wp-content/plugins/podcasting/readme.txt (for example) shows the expected text on the site, so the files are in the right spot.

    I'm not getting any JavaScript errors, just "nothing" when I click "Send to editor".

    Sorry if this was the wrong place to post this. Since it's specific to this plugin, I thought this was the right place even though it seems to be an MU/plugin interaction.

    -glenn

  10. cavemonkey50
    Member
    Posted 6 years ago #

    If you manually copy the file url and add [podcast] [/podcast] around it, does the player show up in a post?

  11. gcrocker
    Member
    Posted 6 years ago #

    Yeah, that works. The 'Send to Editor' button also works if I put the post editor Code mode. So I think you may need to do something like this:

    http://granades.com/2007/02/14/adding-quicktags-to-wordpress/

    to get the += stuff to append correctly in code/visual (and in different browsers).

    -glenn

  12. cavemonkey50
    Member
    Posted 6 years ago #

    Doh! That would be the problem. I never took into account the visual editor as I'm always in code mode. I'm stacked up on school work at the moment, but as soon as I have time, I'll put out a fix for the problem.

  13. gcrocker
    Member
    Posted 6 years ago #

    I also see that /wp-admin/js/upload.js has some of this kind of code, but it's not really as clean for you as the other link.

  14. stevenhaddox
    Member
    Posted 6 years ago #

    I've modified this plugin to add support for both the code view editor or the WYSIWYG text editor using some of the information from the link suggested by gcrocker (thanks btw).

    Here's the code that I've added / modified to make it work (I had to hack the window.opener sections of the JS as well as the id's used within the pages - there's probably a better way but this is a quick fix...sorry). Enjoy:

    Added the following lines:

    add_action('admin_footer', 'insert_podcast_editor_js');
    // Insert JavaScript to insert [podcast]url[/podcast] into editor or code view
    function insert_podcast_editor_js() {
    	?>
    
    	<script language="javascript" type="text/javascript">
    	// Insert myValue (podcast special url string) into an editor window
    	function insertPodcastString(myValue) {
    		if(document.getElementById('mce_editor_0')){
    			alert('inside if mce_editor_0');
    			window.tinyMCE.execCommand("mceInsertContent",true,myValue);
    		} else {
    			if(document.getElementById('content')){
    				alert('inside else, found id by content');
    				document.getElementById('content').value += myValue;
    			}
    			//alert('inside else for window.tinyMCE');
    			//insertAtCursor(window.opener.document.post.content, myValue);
    		}
    	}
    
    	// Insert text into the WP regular editor window
    	function insertAtCursor(myField, myValue) {
    		//IE support
    		if (document.selection && !window.opera) {
    			myField.focus();
    			sel = window.document.selection.createRange();
    			sel.text = myValue;
    		}
    		//MOZILLA/NETSCAPE/OPERA support
    		else if (myField.selectionStart || myField.selectionStart == '0') {
    			var startPos = myField.selectionStart;
    			var endPos = myField.selectionEnd;
    			myField.value = myField.value.substring(0, startPos)
    			+ myValue
    			+ myField.value.substring(endPos, myField.value.length);
    		} else {
    			myField.value += myValue;
    		}
    	}
    	</script>	
    
    	<?php
    }

    Changed this snippet:
    onClick="document.getElementById('content').value += '\n\n [podcast]<?php echo trim($enclosure_value[0]); ?>[/podcast] />
    to:
    onClick="insertPodcastString('[podcast]<?php echo trim($enclosure_value[0]); ?>[/podcast]')" />

    If this code doesn't work properly (I'm guessing it won't with PHP tags and all....) then shoot me an e-mail or I'll repost with a paste link.

  15. stevenhaddox
    Member
    Posted 6 years ago #

    Sorry - I left my alerts and extra debugs that were commented out in the last post. Just remove the alert(...) lines (two of them iirc) and the // comment lines from inside the new function.

  16. cavemonkey50
    Member
    Posted 6 years ago #

    Hello stevenhaddox,

    Thanks for doing that. If you don't mind, can I include your code in the next release of Podcasting? The release won't come out until later next week at the earliest, but would certainly benefit other Podcasting users.

  17. stevenhaddox
    Member
    Posted 6 years ago #

    Absolutely. I don't mind if you include the code - it's here for anyone to benefit from :)

Topic Closed

This topic has been closed to new replies.

About this Topic