WordPress.org

Ready to get started?Download WordPress

Forums

Blubrry PowerPress Podcasting plugin
Get Media URL Only (4 posts)

  1. sgreve
    Member
    Posted 1 year ago #

    Hello,

    Is there a way to display just the media URL from a post and turn it into a link? Specifically I'm looking for this kind of output:

    <a href="[Powerpress Media URL]">Download Blah Blah Blah</a>

    I'd like to have a list of simple download links on my blog without the player, but I don't know how to go about doing this. Anybody have any ideas?

    http://wordpress.org/extend/plugins/powerpress/

  2. Angelo Mandato
    Member
    Plugin Author

    Posted 1 year ago #

    The download, play in window and embed links need extra meta data to be displayed. So if you use the shortcode specifying a media URL, that meta information for that media URL will not be known and thus PowerPress does not display the link options.

    If all you want to do is offer a download link, the easiest and preferred way to do this is to add it to your content. Simply go into your blog post content, go to the location in the content where you want to put the download link, give it a label, highlight the link, then use the URL icon in the "what you see is what you get" editor tools bar across the top and add the link to the media that way.

  3. jbenton
    Member
    Posted 1 year ago #

    It may not be preferred, but I'd very much like to be able to access the URL of my media file in a WordPress template, and to present it outside the player. Is there a variable I can call?

  4. Angelo Mandato
    Member
    Plugin Author

    Posted 1 year ago #

    If you're in the loop, you can use PHP code to get the podcast data in an associative array. Function is called powerpress_get_enclosure_data. I would code something like this...

    if( function_exists('powerpress_get_enclosure_data') )
    {
        $EpisodeData = powerpress_get_enclosure_data($post->ID);
        if( $EpisodeData )
        {
           $url = $EpisodeData['url'];
           // what you need to do here...
    
        }
    }

    This is what you are looking for correct?

    The $EpisodeData has the following fields:

    id - post id
    feed - feed slug (podcast default, but if podcast channels is on then this is different)
    url - url to media file
    duration - time in seconds of media
    size - size in bites of media file
    type - content type (e.g. mp3 = audio/mpeg)
    width - video player width
    height - video player height
    (there is more if you enable other options in PowerPress, but you get the idea)

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.