download podcast
Support Area › Forums › Authentic › download podcast
Tagged: Download podcast
- This topic has 3 replies, 2 voices, and was last updated 12 years, 11 months ago by Bill Robbins.
-
AuthorPosts
-
October 16, 2011 at 10:10 #3883Ole Benjamin KrussandParticipant
Hi!
I have some problem with downloading the podcast on my webpage. When I click on “download” the browser downloads a file, but it is very small and it will not play. When I look at the name of the file, it seems like the right name.
I have changed the language inside the archive-podcast.php file for download, listen and notes. Can it be something i have done here?
October 17, 2011 at 14:12 #3884Bill RobbinsModeratorThis has me most perplexed. I took a look through the code on your archive page and everything looks fine. Translating the links shouldn’t have any bearing on forcing the download to still work.
The download works by forcing some headers to be applied to the file that lets the browser know that this file is to be saved instead of opened. The code looks like this:
header(“Cache-Control: public”);
header(“Content-Description: File Transfer”);
header(“Content-Disposition: attachment; filename=$file”);
header(“Content-Type: application/zip”);
header(“Content-Transfer-Encoding: binary”);I tried to do a bit of research to see if the site being in Norwegian would have an impact on this, but I wasn’t able to track anything down. Not speaking Norwegian made the search a bit tough too.
It’s either a language problem, or it could be a server limitation. You could do a quick server test by installing the WordPress Download Monitor plugin and creating a test download. There is a setting on each download that lets you force the file to be downloaded. My download script does essentially the same thing, so if the Download Monitor’s force download doesn’t work as well, it’s most likely a server limitation.
Let me know what you turn up there and I’ll be glad to see what I can do then.
December 3, 2011 at 13:41 #4222Ole Benjamin KrussandParticipantHi!
I tried the Download Monitor plugin and it worked with this, so it can’t be the server. But earlier you helped me getting the podcast to work. You made a file with this content:
Then I could make it a page.
Could it be this causing the problem? I named the page “prekner” = speaches
Thanks for help. (I use the Download Monitor plugin for some other stuff now 🙂 Nice plugin!)
December 3, 2011 at 15:11 #4225Bill RobbinsModeratorMost likely download monitor is handling the translation better than the theme is. But we can use that to our advantage. I use Download Monitor on this site to track theme downloads and have it buit into my template. You could do the same thing for your message downloads.
What I did was create a download format for the theme file, PSD and XML data files inside Download Monitor. You can find that section under the configuration tab.
For the theme ZIP file downloads, I created a format that looks like this:
<a href=”{url}”>Download</a>
it has the format ID of 1. Now inside my theme itself, I placed this code in my loop where I wanted the download link to appear:
<?php echo do_shortcode(‘[download id=”‘.get_post_meta($post->ID, ‘podcastdownload’, true).'” format=”1″]’) ?>
With that, all I have to do is enter the download ID number into a custom field called theme and Download Monitor will create a link to the correct file and track it’s popularity for me.
You would need to turn on custom fields for the podcast section. To do that, you’ll need to edit a file called custom-types.php and look for the section that begins with register_post_type(‘podcast’, line. Then find this spot:
‘supports’ => array(‘title’, ‘editor’, ‘thumbnail’, ‘excerpt’)
and change it to be like this:
‘supports’ => array(‘title’, ‘editor’, ‘thumbnail’, ‘excerpt’, ‘custom-fields’)
Then you can use a custom field with the name of “podcastdownload” and the value as the URL to your podcast file.
I hope that helps out some.
Enjoy your Sunday,
Bill -
AuthorPosts
- The topic ‘download podcast’ is closed to new replies.