Question:
Is it possible to include audio files with entries, ala Audioblog?
Answer:
Of course!
This requires one of several things.
* A telephone that can record audio files and send them in an accepted format.
* Any other device that can do the same and email it.
* Use of the ExpressionEngine Moblog Module.
* Optionally, you could write a flash interface (like audioblog’s) to play the audio files. That is not included in this tutorial!
This is actually a very simple thing to do. I’m going to outline the most basic ways of doing this, there are certainly clever things that could be added, but those are beyond the scope of this tutorial.
This tutorial assumes that you wish to include these audio files with posts from your main weblog. Modify as desired.
Create a custom weblog field
Go to admin -> custom weblog fields.
* Create a new field with the shortname moblog_audio. Set this to type “textarea”, maxlength some nice, large number, formatting: none.
2. Go to Modules -> Moblog -> Preferences
Modify the Moblog Template
Scroll down to “Moblog Template” and add this code at the end:
{field name="moblog_audio" format="none"}
{files match="all"}
{file}
{/files}
Note If you send multiple file types you may wish to use {audio} here. I have not covered that here - this is the safest to get going, at least for testing purposes.
Now, that will post any audio files sent via email attachment into the “moblog_audio” field. The next step is to dislay these with your entries.
Make it show up with your entries
Go to Templates -> weblog -> index. Scroll down to somewhere between {exp:weblog:entries…} ... {/exp:weblog:entries} and add this:
<a href="{moblog_audio}" title="audio file">Listen to me!</a>
Alternatively, you could use a flash player of your own making, to play it in-line.
* Do the same with your comments template.
Include in RSS as a Podcast
Now, you may want to include these in your RSS as Podcasts. For that, have a look at Podcasting.
As mentioned, this is a very basic tutorial. The same steps could be used for posting video if your phone supports it, or you have another method of creating and emailng said video.
An additional thought - some voip services, such as vonage, will email you when you have a new voicemail, and attach the voicemail as a.wav. You could use this to audio blog from anywhere, if you wanted. =)
Category:Moblog Category:Tutorials
