Hi!
Here's an english translation:
The easist solution to embed MP3-files in your frontend is to only use the serendipity
podcast plugin as an addon. The
podcast plugin will then only serve podcasts within RSS feeds, but displaying MP3 flash players will be solved using standard serendipity features.
Here's a small
HowTo:
1. Create a "
podcast" entryproperty field
To show a
podcast at a specific place within your blog entry using a Flash-Player can best be solved using the
plugin "Extended properties for Entries", which offers the functionality of "Custom Fields".
To install that
plugin click on "Configure plugins", go to the section of event plugins and click on the link "Click here to install an event
plugin". Click on the install button next to the mentioned Extended-properties
plugin.
After the
plugin is installed you will be redirected to its configuration screen. There you'll see the listing of Custom Fields. Simply enter "
podcast" into that large textarea. If there are already other feeds, you can simply add ",
podcast" at the end to add a
podcast property field.
Then save the new configuration of the
plugin.
3. Displaying the "
podcast" entryproperty field
To be able to actually see your
podcast in the blog entry, you will need to edit the entries.tpl template file of your current active template.
Use an Editor and FTP client to open up this file - if it does not exist in your template directory, copy it from /templates/default/ into your current one.
In that file we now look for a place like this:
Code: Select all
<div class="serendipity_entry_body">
{$entry.body}
</div>
We now want to show our
podcast always after the entry body. Which is why we change the block above to something like this:
Code: Select all
<div class="serendipity_entry_body">
{$entry.body}
{if $entry.properties.ep_podcast}
<object codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="35" height="18" id="mp3player"><param name=movie value="http://moodle.org/filter/mediaplugin/mp3player.swf?src=http://{$smarty.server.HTTP_HOST}{$entry.properties.ep_podcast|@escape}"><param name=quality value=high><param name=bgcolor value="#ffffff"><embed src="http://moodle.org/filter/mediaplugin/mp3player.swf?src=http://{$smarty.server.HTTP_HOST}{$entry.properties.ep_podcast|@escape}" quality=high bgcolor="#ffffff" width="35" height="18" name="mp3player" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"></embed></object>
{/if}
</div>
That might look complicated. But it isn't. The Flash-Player of moodle.org will be embedded and using the data input of your own
podcast URL. Using the attributes 'width' and 'height' inside the code block you can adjust how large the player will be displayed.
Of course you can exchange that URL with any other Flash Player you like, simply alter the HTML code for that. Ask Google for Free Flash MP3 Players like FLV.
The basic important thing is the variable {$entry.properties.ep_podcast}. This variable holds the URL to your
Podcast MP3 file, and needs to be inserted into the HTML code.
3.
Podcast!
Now all preparations have been made. To publish a
podcast do this:
- "Create entry"
- Enter the title and body of your blog entry
- Scroll to the end of the page where you see the list of Custom Fields. A "
podcast" field will be shown there with a "Media" button next to it. Click on that button and then either upload your MP3 file or choose it from your media database. The URL of that
podcast MP3 file will then be saved within the
podcast field of your entry.
- Save the entry
- View your entry
Now the only thing that the
podcast plugin does is to put a link into your RSS file so that itunes and other software downloads the mp3 file automagically.
Best regards,
Garvin