How do I take out an enclosure?
-
I don’t want an enclosure pointing to a video file. How do I remove the enclosure element. When I hit delete, it doesn’t do anything.
-
It’s not the podcasting platforms which are broken; some work, some don’t. I just want control of which file links *I* include in *my* feed.
Is that so hard?
Although if you really want to talk to a developer rather than a lowly user, you can go and speak to Dave Winer of audio.weblogs.com https://blogs.law.harvard.edu/dave/ – audioblogs doesn’t work with more than one enclosure; as he came up with RSS enclosures he might know whether they should have 1 or more for podcasting?
I can guess his reponse tho; I think podcatcher.com or the old iPodder.org has an interesting FAQ about it where it says podcatching clients shouldn’t download more than 1 enclosure…if they do it’s something else…there was a big argument about it last year. But I don’t know if anyone decided whether it should be single or multiple; hence the confusion I expect.
But just because you CAN include multiple enclosures doesn’t mean you WANT to or CHOOSE to.
Anyway if you’re NOT supposed to delete an enclosure; why does it have a bloody big DELETE button next to it? That when pressed, doesn’t work?
Very hitchhikers – you really should have a sign saying ‘please do not press this button again!’ appear when you do…
This seems to be related to an issue I’m having. I had to host a couple of mp3 files elsewhere because we hit a demand spike and my ISP couldn’t keep up. When I change the URL of the mp3 file in the post, the corresponding URL in the “enclosure” field doesn’t change. When I make the change in the enclosure field, the change doesn’t take, that is, it isn’t reflected in the RSS feed.
Essentially, once you include an enclosure in a post, that’s it; no changes can be made. I suppose I could go into the database and make the change, but I don’t really want to muck around there, and in any case it seems a little inefficient. This is a HUGE issue for podcasting, and it’s definitely not a problem to be solved by talking to the podcatching clients.
Thanks in advance for any insight –
Well, if any of you are like me and don’t want the “enclosure” feature *at all*, here’s an amateur solution.
All you have to do is open your
wp-includes/functions.php
file and take a look at line no. 766. There’s apreg_match_all
function which is responsible for “discovering” the audio or video file(s) linked in your post. You have to “break” that function somehow, for instance, add an additional “p” after “http” so it’ll read “httpp”.Now WP won’t find any of your media files linked in your post anymore, nor will it include them in your blog’s feed, plus the delete button for the “enclosure” custom field in the administration panel will automagically start working.
Hope it helps, at least until someone comes up with a more profound solution. ??
Can I add my voice to those who think this feature is a Bad Idea, or at least not well thought through. I highly recommend that this feature be removed (or at least disabled by default) ASAP.
Here is my reasoning. Some RSS clients like NetNewsWire (which BTW is NOT a specific podcasting client) can be configured to download enclosures automatically. This is a feature, and a good one IMHO.
So wordpress users that are unaware of this feature and unintentionally link to someone else’s media file may be triggering all their subscribers to automatically download that file.
Matt, you will have a hard time talking to the client authors trying to convince them to turn off the automatic enclosure downloads in order to prevent accidental bandwidth leaching like this.
I realise that wordpress is trying to help me here, but at a conceptual level I don’t see how linking to an audio or video file should automatically imply that you want to include it as an enclosure. The suggestion in the other thread to only enable this feature when a specific attribute in the link (I think rel=”enclosure” was suggested) sounds like a great idea to me.
In the meantime there needs to be a way to disable this feature (besides the hack mentioned by andper above).
I just want to add my vote for disabling this “feature.” I can only second (or third, or fourth…) the concerns about breaking standards, causing major inconvenience for those who don’t want the feature, unnecessarily increasing bandwidth loads for others, and forcing downloads for several readers.
There seems to be many valid arguments for disabling the feature or altering it, and I have yet to read anything which supports keeping it in as is.
Wouldn’t it make more sense to have a “Include File as Enclosure” field in the advanced editing options?
People could just put the URL to the file they want in that field.
For anyone thinking that a free and open product like WP doesn’t deserve a particular level of support consider this: When you link to and recommend WP, you send traffic to this site. When you do that, you are also increasing the potential number of people clicking through to the various affiliate programs, as well as garnering attention for the developer.
Lack of support or response to this issue is not something that should be written off as something which should be expected because beggars can’t be choosers.
I heard there’s gonna be more hooks/filters for RSS for the next release; so, expect a plugin solution sometime.
Here’s an interesting solution this.
I’m making an MP3 blog, and I’m wanting to link to about three mp3s per day. I’m also going to be doing a podcast, so i’m still going to want to have an enclosure on particular posts.
What I’ve figured out, is that if you implement andper’s hack above (I actually added 2 “p”s (so it reads httppp) just to be safe), you can then *manually* enter an enclosure by adding it as a custom field. Simply add ‘enclosure’ as the key (It may already be in the drop-down menu) and the URI of the podcast file in the value field.
Seems to work great.
thanks to andper for his solution.
I hope someone works this issue out in a professional way though…Ah! This “multiple enclosures, can’t delete ’em” problem also breaks Feedburner feeds quite nicely. Thanks to andper for your hack — and I’ll also lend my voice to the “this should get fixed” chorus. If you’re doing multiple MP3 links in your posts, you should definintely “break” this function.
I just got started with WordPress yesterday and I’m very impressed with it so far. But I’m developing a video blog and I quickly ran up against this problem of multiple enclosures. Rather than breaking the thing altogether, I added a “break;” in the do_enclosure function after line 790 in wp-includes/functions.php so it looks like this:
$wpdb->query( "INSERT INTO '$wpdb->postmeta' ( 'post_id' , 'meta_key' , 'meta_value' )
VALUES ( '$post_ID', 'enclosure' , '$meta_value')" );
break;
}
That forces the function to exit after creating the first enclosure. Unfortunately you still can’t delete that first enclosure because the function is run every time you publish the post, which re-creates the enclosure you just deleted. You also can’t choose which enclosure you want to use. You’re stuck with the first media link in the post. I’m going to work on a plugin to give some flexibility to this process, but it could be a while since I don’t really know what I’m doing.update: In 2.0 add the break; after line number 1044
Another update. I actually wrote a plugin to deal with enclosures. https://www.15framespersecond.com/enclosureflex/
I must agree with the general consensus here. This was a badly implemented feature, and something that should be more easily turned off. This is not something that should automatically happen whether I want it to or not, and I should be able to turn it off in the WordPress options.
- The topic ‘How do I take out an enclosure?’ is closed to new replies.