Enclosure Flex WordPress Plugin

I’ve only been using WordPress for a week, and don’t really know PHP or MYSQL but I was developing this video blog for my friend Sean and I couldn’t understand why the default enclosure creation was so restrictive and why I didn’t have the option to delete them if I wanted. So I sat down and wrote this plugin. It makes things a little more flexible. There’s a lot more work to do, but this should help those of you who are looking for more enclosure options.

I also reccomend Garrick Van Buren’s WP-iPodCatter plugin which will add iTunes specific tags to your feed.

Before you start using this keep in mind this is very early in development and I’ve never written a plugin before so this could have unintended consequences. So far it works fine for me.

This plugin was developed using WordPress 2.0 and has not been tested on 1.5

Kyle Gilman

Download the Enclosure Flex plugin (version 0.5)

How to use KG-Enclosure Flex

  1. Upload kg-enclosureflex.php to the wp-content/plugins on your server
  2. Activate the plugin from the plugins page.
  3. The “edit post” page now has an enclosures drop down list below the post cotent window. When you start writing the post, the list won’t have anything in it. Once you’ve written the post, hit “save and continue editing”
  4. Now the list will be populated with every link in the post, including non-media ones. I could screen them out, but the idea of this plugin is flexibility. Eventually I plan to give you the option to choose your preferred mime types in the options page.
  5. Choose the link you want to enclose. By default nothing will be enclosed unless you choose a link. That’s another thing I’m going to work on for the options page.
  6. Hit save and the link you chose will be enclosed, including the length and mime type information.
  7. If you want to add another enclosure just choose another link and save the post. Multiple selections in one step will be added in the future, but it’s my understanding that nobody is using them and they can break a lot of podcast readers so that’s not high on my list.
  8. To delete an enclosure you’ve already added, make sure “No Enclosures” is selected in the list and then delete the custom field. It won’t be re-created automatically like WordPress usually does.

KG-EnclosureFlex is released under the GNU General Public License.

Version History

0.5 (Released January 03 2006)
-First release. Very simple, but works.

43 Comments Add your own

  • 1. oculos  |  January 22nd, 2006 at 3:05 am

    Hey, thanks a lot!!!!! that made my podcast possible!! Too bad it didn’t help me to make a decent podcast, but, what the heck… ;)

    Now, seriously, congrats, it worked like a charm. Thanks a lot!

  • 2. Web/Lint » Blog Arc&hellip  |  January 23rd, 2006 at 2:56 am

    […] Truth @ 15 Frames Per Second » Enclosure Flex WordPress Plugin. […]

  • 3. Get Jacked! » Enclo&hellip  |  January 23rd, 2006 at 5:17 pm

    […] Enclosureflex […]

  • 4. Adrian  |  January 25th, 2006 at 3:04 am

    Champion fix. After trawling through all of the support to get the enclosure to show in the RSS feed it is now working and as such solved my iTunes podcast subsciption issues!!

    Well done (SOOOO Easy!).

  • 5. Colin D. Devroe  |  January 25th, 2006 at 7:38 pm

    I’m trying this out, but it isn’t working with m4a files, any ideas?

  • 6. Colin D. Devroe  |  January 25th, 2006 at 7:52 pm

    BTW, if this plugin is only for WordPress 2.0, you might want to state that.

  • 7. Kyle  |  January 25th, 2006 at 7:56 pm

    Could you be more specific about what’s not working? It should be able to enclose anything, even plain text files, although those enclosures won’t be displayed by any feed readers. With m4a I suspect MIME type trouble.

  • 8. Kyle  |  January 25th, 2006 at 9:53 pm

    Good point about the version numbers. It was developed for 2.0. Anyone using 1.5 with this plugin? I haven’t tried it.

    Does the plugin work with mp3 files? If it does, then it’s almost definitely a MIME problem.

  • 9. Bryan  |  January 26th, 2006 at 5:36 pm

    I just registered with WordPress and have been experiencing problems with mp3 enclosures as well. Odd thing is that I had one successful post using Mars Edit + and absolute URL. The mp3 appeared on iPodder, etc. and downloaded without problem. Since then I’ve had no luck using Mars Edit and cannot get an mp3 to appear by uploading directly from WordPress.

    Is KG-Enclosure Flex only for those who have web hosting?

  • 10. Kyle  |  January 26th, 2006 at 7:04 pm

    Bryan, if you’re using wordpress.com they don’t let you install plugins yourself. http://faq.wordpress.com/2005/10/27/can-i-upload-my-own-plugins/

  • 11. oblaum  |  February 2nd, 2006 at 11:41 am

    hello dear podcaster,

    well, uh, i use the WP-iPodCatter plugin and this plugin.
    i want to create an video podcast with .m4v (so apple’s own format)
    it only works if i pasted the enclosure tagline by hand, right now.

    it’s really hard to find a videopodcast tutorial, any ideas?

    cheers!
    oblaum

  • 12. Kyle  |  February 2nd, 2006 at 8:53 pm

    I’ve been seeing this problem a lot and I’ve been working on a solution over the past few days. I hope to have it done by the end of the weekend. Most hosts don’t have m4v or m4a MIME types set up properly so you have to edit your htaccess file to fix the problem. The next version of the plugin can do that automatically for various podcast formats, including m4v.

  • 13. Seek3r  |  February 7th, 2006 at 6:02 am

    Looks like of like we are both working to solve the same problem.
    Ive been working on a plugin called PodPress which is at http://www.mightyseek.com/podpress/. I was just talking with one of my users about adding an easier way to have multiple formats, such as m4v video podcasts. The flash player wouldnt work, but it would be fine to have the diff formats and instead of having them in the Post in the [podcast:filename.mp3] type tag, I can add input fields for each format. Then I will add to the feed support for users to choose the format they want. So http://www.site.com/?feed=rss2&format=mp3 or http://www.site.com/?feed=rss2&format=m4v
    So thats what im in the middle of working, and ended up noticing this plugin… so now I will review the code and incorporate whatever useful is in this

  • 14. Funtime Ben  |  February 21st, 2006 at 10:57 pm

    Love the plug-in, it has saved my podcast enclosures from themselves! Awesome!

  • 15. John Kopanas  |  February 26th, 2006 at 10:24 pm

    The plugin works kind-of… what do you do when the file of the enclosure is on a nother server?

  • 16. John Kopanas  |  February 27th, 2006 at 4:07 am

    Sorry, the plugin is working. It is the server I use to host the files. That for all your help!

  • 17. JW Richard  |  March 8th, 2006 at 3:51 am

    This plugin is a godsend. Thanks.

  • 18. eyn  |  March 11th, 2006 at 7:44 pm

    Thank you so much for making this plugin! I’ve tried all other kinds of podcast plugin like PodPress and iPodCatter but they are just bloated and useless IMO. What I need is simply to enclose the media files I want (automatically) and make them available as podcast feeds using feedburner (for more functionality).

    I would really like to see the preferred MIME type option for this plugin. I also tweaked your plugin to fetch relative path as well, you might want to consider this option.

    The only thing I don’t really enjoy right now is that auto enclosure of mp3 is disabled because of this plugin. You should probably remove the restriction of having “No enclosure” as default to “WordPress default” i.e. auto enclosure of mp3 only.

    Multiple enclosure is a must! (at least for my blog) You might want to add a tweaked version of rss php file in your plugin to support multiple enclosure in single posting. I do some research on the web and found a tweak that does that. I further edited the code myself to make the feed size smaller by removing actual article text and using only excerpt and removed some unnecessary if else statement. You can have a look at my tweaked code here. My actual podcast feed using this tweaked RSS look like this.

    Overall, this plugin rocks even it’s your first. Keep up the good work and I hope you can actively develop this plugin!

  • 19. cloudchaos  |  March 14th, 2006 at 7:14 am

    Yeah beside m4a it doesn’t work with m4v or mp4

  • 20. Jurastudentin  |  March 24th, 2006 at 10:30 pm

    Thank you for that plugin. The enclosure-field was really annoying. It would be nice if the plugin removed the field right away when I click on No Enclosures and just save without having to delete the field itself though.

  • 21. rickshangle.com » S&hellip  |  April 2nd, 2006 at 10:09 am

    […] Why not combine the two in one post via a shakedown of Kyle Gilman’s EnclosureFlex plugin for WordPress. […]

  • 22. Alan  |  June 4th, 2006 at 3:24 am

    Wow, you’re good. You just answered all my questions, and saved me a lot of time. THANKS A TON!

  • 23. Sir Mildred Pierce  |  June 9th, 2006 at 5:15 am

    whew! Works like a charm! Thanks so much!!!!

  • 24. Radio Clash Mash Up Podca&hellip  |  July 28th, 2006 at 11:13 am

    […] I gave up on a fix or functionality to fix the multiple enclosures after nearly a year and installed this plugin. […]

  • 25. yaw  |  August 1st, 2006 at 8:19 am

    once i loaded the plugin, and go to save and continue editing and the link i have in my post appears in the enclosure pull down menu, once i select it however, it doesnt give me anymore options, to add length or type. im using wordpress 1.5 is it compatible?

  • 26. 20 Ideas: Podcasting your&hellip  |  October 7th, 2006 at 4:50 pm

    […] For some ideas on what types of things you can deliver via RSS feeds other than audio and video, have a look here. The PodPress plugin I mentioned above has support for MP3, MP4, M4A, MOV, FLV, AVI, MPEG, ASF, WMV and PDF files, but I want to be able to deliver more than this! I want to be able to deliver Powerpoint presentations, spreadsheets, documents and pretty much any file I might have on my Macbook to my audience. I’ve tried using the Enclosure Flex plugin for WordPress in order to enclose files other than audio, video and PDF, but so far to no avail. I shall keep you all posted about my continued attempts and I would be very interested to find out about anyone who’s managed to deliver such files successfully! […]

  • 27. Blogging Marnik » l&hellip  |  January 6th, 2007 at 1:25 am

    […] Truth @ 15 Frames Per Second » Enclosure Flex WordPress Plugin (tags: wordpress plugin enclosure video) […]

  • 28. Viddler Development Blog &hellip  |  January 30th, 2007 at 11:35 pm

    […] Enclosure Flex WordPress plugin by Kyle Gilman [download] […]

  • 29. jedielf  |  February 14th, 2007 at 12:21 pm

    Aah! Thanks for this! I was getting fed up with those enclosure fields that kept appearing :)

  • 30. FALK stands for FUCK ART &hellip  |  February 14th, 2007 at 1:21 pm

    […] Dank des Hinweises vom Nachbarn, fiel mir heute auf, dass WordPress mal eben generell verlinkte MP3-Files als “enclosure” in den RSS-Feed packt. Ist ja von Haus aus vielleicht nicht ganz übel, birgt aber meines Erachtens und grad hier in Deutschland einige Gefahren. Mal ab vom technischen Aspekt, dass es für die gestern erstellten 2 Beiträge zur Sendung kontraproduktiv ist, dass dann statt der Sendung der erste Song im iTunes und Feed auftaucht. Dies hab ich nun dank des Enclosure Flex WordPress Plugin abschalten können und bin wieder Herr über meine Einbettungen von Soundfiles in den Feed. […]

  • 31. WP Plugins DB » Blo&hellip  |  May 20th, 2007 at 9:49 am

    […] Visit […]

  • 32. domestic diosa » su&hellip  |  September 23rd, 2007 at 10:16 pm

    […] We went out and treated ourselves to some donuts this morning, from Shipley’s. mmm donuts. I LOVE Sundays. They’re always so chill and relaxing. I’m really excited that September is almost over with and Fall is now here. I have so many cute sweaters that I got on clearance in the Spring and I’m totally ready to start wearing them! I finally got around to modifying a theme to my liking last night. I think I did like 6 of them yesterday and none of them were suitable. It was really aggravating! I like this one though, it’s really simple and totally reminds me of tumblr, which is what I wanted. LOL A couple of things that I added to the comments section, in case you were interested, the author comment highlighting. Super easy to implement withOUT a plugin! You can find the tutorial here. And the number in the comments themselves. I’m not big on the gravatar, only because I don’t know how to set it up! LOL bwahahaa. So… I went with the comment numbers instead. meh, it’s different. The tutorial on that can be found here. Again, super easy to do. Another thing, it was really irritating me that the mp3’s I’d put up for you guys to listen to were being enclosed in the rss feed. That bugs the shit out of me because then anyone subscribed to the feed can download the file without actually having to visit the site. NOT COOL. I feel that if you want the goodies, and take the goodies, a small thank you would be nice, no? don’t you think? SO. I found this plugin which takes the enclosure off the feeds. PERFECT. So yeah, that’s about it for the wordpress stuff today. Now I’m off to rearrange the master bedroom furniture, it’s time for a change in that room. Hope you’re having a fantabulous weekend bloggie friends O’ mine. =) […]

  • 33. be.  |  October 22nd, 2007 at 2:19 pm

    does this plugin work on teh new version 2.3 of wordpress aswell?

  • 34. 084 Podcast Answer Man &#&hellip  |  September 28th, 2010 at 3:34 pm

    […] KG-EnclosureFlex: Gives you the flexibility to choose which files you want to enclose in your RSS feed, and allows you to suppress all enclosures if you want. […]

  • 35. Alan  |  November 19th, 2010 at 2:04 pm

    This isn’t doing anything. I select “No Enclosure” and it still includes everything.

  • 36. admin  |  November 19th, 2010 at 2:16 pm

    Yeah, I have no idea if this works at all anymore. I haven’t used it in years. Try a plugin that wasn’t written for an ancient version of WordPress.

  • 37. How to Disable wordpress &hellip  |  April 8th, 2011 at 5:35 am

    […] I don’t like this and search the way disable. After some keyword on search engine I found Enclosure Flex WordPress Plugin You can download plugin here After active this plugin WordPress can’t create auto enclosure. […]

  • 38. Sammy  |  January 26th, 2012 at 9:11 am

    Hi does this plugin compatible with WordPress ver. 3.3 ?

  • 39. admin  |  January 26th, 2012 at 11:40 am

    It might accidentally do something in WordPress 3.3 but I don’t know. I haven’t thought about enclosures in years.

  • 40. Yo Noid  |  October 11th, 2012 at 1:14 am

    Worked like a charm with WP 3.4.2.

  • 41. Odysseas Rapantas  |  January 10th, 2013 at 9:38 am

    After losing a whole day at work searching what went wrong about my rss feed of podcasts, I found out your plugin and it actually works. In wordpress 3.5

  • 42. admin  |  January 10th, 2013 at 9:43 am

    That’s great! I’m glad this thing is still hanging on to life six years later. Maybe I should fix it up so it fits in to the “new” admin interface and add it to the plugin database.

  • 43. Tim  |  February 10th, 2013 at 10:49 am

    I’ve been using it for 6 years :-D In fact about to reinstall it as I stupidly took it off and now WP is enclosing my Mixcloud HTML5 embeds…ooops!

    And yes I think it works upto 3.4 or 3.5. Not sure about the latest one…we’ll see!

Leave a Comment

Required

Required, hidden

Some HTML allowed:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Trackback this post  |  Subscribe to the comments via RSS Feed