Forums

[plugin: FeedWordPress] Mp3 player (3 posts)

  1. angus20184
    Member
    Posted 2 years ago #

    I just install FeedWordPress. everything work okay. However, I would like to have a mp3 player for the attachment in "enclosure" custom file. I would be able to pull the custom field in template. However, the field show up as.

    http://podcast.rthk.org.hk/podcast/media/moonreadings/47_0707161558_34628.mp3
    3621616
    audio/mp3

    In order for the mp3 player plugin to work It should only show the link of the mp3 but not the 2nd and 3rd line.

    Please help with out with that. THX!!

  2. sdhunt
    Member
    Posted 2 years ago #

    I don't know if this is what you need but you can access and print just the mp3 url from the enclosure custom field like this:

    <?php
    $enclosureData = get_post_meta($post->ID, 'enclosure', true);
    $duration = false;
    if ($enclosureData) {
    list($EnclosureURL, $EnclosureSize, $EnclosureType, $Serialized) = split("\n", $enclosureData);
    $EnclosureURL = trim($EnclosureURL);
    echo $EnclosureURL;
    } ?>
  3. mervdiesel
    Member
    Posted 1 year ago #

    Hey sdhunt or anyone else who might know the answer to this. I think I'm wanting to do something similar here, and I can't get it to work. I'm aggregating various podcasts on my blog here

    here are a couple of the rss feeds that contain podcasts of interest:

    (this one wont show correctly in posts...that is, it does not link to the source mp3 directly) http://afripod.aodl.org/?feed=podcast

    (this one correctly points to source mp3, and displays correctly, here's an example on my site)http://downloads.bbc.co.uk/podcasts/worldservice/africa/rss.xml

    I'm using "Add Attribution for FeedWordPress" which has been perfect for adding proper attribution so far. Using the [original-url] short-tag I have been able to successfully link directly to the source mp3 using Add Attribution plugin on the bbc podcast. However, on the afripod podcast, the mp3 link will not display at all.

    So what have I tried? I tried your suggestion sdhunt, and it did not work for me. I tried the code in many locations to no avail. Also I tried setting a custom field of $(item/enclosure/@url) but this also did not work. This problem is driving me absolutely nuts because I know it's something so simple and I just can't see what I'm doing wrong!

    Essentially I want the aggregator to print a link of the source mp3 url.

Topic Closed

This topic has been closed to new replies.

About this Topic