Building an episode class
This page is for administrators and site builders who create an episode class for a show, and for producers who
want to tell them what the show needs. Classes are edited under Setup > Classes by a user with the class
policies (Content classes for websites). Every
datatype named below is in kernel/classes/datatypes/ unless noted.
Contents
- A suggested class
- Choices that matter later
- Uploads into the class
- Wiring it to the rest
- A test before the first episode
A suggested class
Class name Episode, identifier episode, object name pattern <title>, not a container.
| Attribute | Identifier | Datatype | Required | Why |
|---|---|---|---|---|
| Title | title | Text line (ezstring) | yes | the episode title, also in the feed |
| Episode number | episode_number | Integer (ezinteger) | no | for lists and sorting on the site; the feed has no field for it |
| Short description | teaser | Text block (eztext) | no | one or two sentences for lists and the feed description |
| Show notes | show_notes | Rich text (ezxmltext) | no | links, chapters, credits, sponsor disclosure |
| Audio | audio | Media (ezmedia), player type Html5 Audio | yes | the episode file and the feed enclosure |
| Artwork | image | Image (ezimage) | no | shown on the episode page |
| Guests | guests | Object relations (ezobjectrelationlist) | no | links to person items |
| Hosts and credits | credits | Authors (ezauthor) | no | names and e-mail addresses of contributors |
| Release date | release_date | Date and time (ezdatetime) | no | for the Wait until date event |
| Transcript | transcript | Rich text (ezxmltext) | no | the accessible text of the episode |
| Transcript file | transcript_file | File (ezbinaryfile) | no | a downloadable transcript, if you have one |
| Keywords | keywords | Keywords (ezkeyword) | no | topics; or eztags on installations with that extension |
| License | license | Selection (ezselection) | no | the license you publish under (Rights and licensing) |
For a video show, use Media with player type Html5 Video instead of Html5 Audio.
Choices that matter later
- The media field's maximum size is set on the class attribute in MB (
ContentClass_ezmedia_max_filesize_*, up to five digits). Leave it at 0 to rely on PHP's limits alone (Upload limits and large files). - Translatable fields. Each attribute can be translatable. A translatable media field means each language can carry its own audio file; make it not translatable if all languages share one file (Multilingual shows).
- Searchable. Show notes and transcript should be searchable, so the site search finds episodes by what was said. Media and file fields are not searched for their content.
- Identifiers are permanent in practice. Feeds, templates and the upload mapping name them; renaming one later means changing all of these.
Uploads into the class
If episodes should be created by uploading files on the upload page, the administrator maps the type to the class in
an override of settings/upload.ini:
[CreateSettings]
MimeClassMap[audio/mpeg]=episode
[episode_ClassSettings]
FileAttribute=audio
NameAttribute=title
NamePattern=<original_filename_base>The shipped [file_ClassSettings] and [video_ClassSettings] blocks follow the same pattern. Without the mapping,
an uploaded MP3 becomes a File item (Choosing a class for episodes).
Wiring it to the rest
| Part | What to set | Page |
|---|---|---|
| The feed | A source per show with class Episode; map Title to title, Description to teaser, Enclosure to audio | Building a podcast feed |
| Scheduling | The Wait until date event with Release date as its attribute | Scheduling a release |
| Templates | A full view for the class in your design, if the default view is not enough | Template overrides |
| Permissions | Editors may create Episode below the show folders | Roles and policies |
A test before the first episode
- Create a test episode with a short MP3 and publish it.
- Open the episode page signed out: the player shows and plays.
- Open the feed: the item is there with an
enclosurewhosetypeisaudio/mpegand whoselengthis the file size. - Remove the test episode (to the trash, then empty it) before you submit the feed anywhere, so no app ever sees it.
Related pages
- Choosing a class for episodes
- Designing your content model
- Choosing datatypes
- Free documentation: this page is free to copy, translate and improve under the GNU FDL 1.3.
Become an Exponential Partner
Partners share their information, provide funding, contribute back and develop the products with us, and that is how Exponential grows. A partner website and dashboard are planned for mid-2027: please become a partner today to speed up our growth rate and land new features faster.