Sermons Overview

by Luke Simpson, Chris Ullyott | Last edited: 4/19/2013

Features:

  • Sermons can be associated with audio items, notes (*.pdf or *.doc formats), videos, and images.
  • Sermons can be published as featured, allowing developers to feature user-specified sermons in their designs.
  • Ability to associate sermons with categories and series
  • Feeds: An iTunes-compatible podcast feed is automatically generated to the media folder site whenever a sermon is edited or published to the media folder of the site under the filename: "sermons.xml"

Download and Listen Count

On the sermon list page in the backend, the number of downloads plus listens is listed. This number is compiled nightly so new activity does not show up immediately. This number does not include video download / listens and it does not include activity from feeds. We wrap web links in a URL which 1) tracks the download and 2) automatically imitates the download dialog. If this URL isn't used and the file is accessed directly, the download will not be counted.

Implementation Overview

There are two ways to get sermon lists/details up on a site:  the display monklet method or the traditional list/detail getContent method. This document will demonstraight both methods.

Display Monklets

This method is the prefered method as it is faster to impliment and more robust. The one monklet can handle any groupby or find tag automatically based on urls as well as built in pagination.

It can be broken down into three steps...

  1. Add a new nav item pointing at 'Sermons'
  2. Choose your template and monklet from the 'Settings' tab of the sermons list page
  3. Set your sidebar monklets

To see this method working on a live site check out: http://www.imagodeicommunity.com/sunday/teaching-and-sermon-archive/

1. Add a new nav item

Add a nav item with any name and select 'Sermons' from near the bottom of the drop down in the 'page name' column. This page will show a list of the latest sermons. If your nav items is a top level item labled 'messages' and you have a sermon called 'love your neighbor' your sermon will be found at '/messages/love-your-neighbor/. You will be able to group the sermon list with any available grouping method at urls such as /messages/series/ or /messages/month/. If you had a series title 'Life of David' you could output a list of sermons in the series at /messages/series/live-of-david/. Certian API tags are aware of the set location and adjust themselves accordingly.

2. Choose your template and monklet

Under Content > Sermons > Settings you can select your template, monklet and assign any sidebars for that template. The default sermons monklet will always be available but it is recommended that a copy is used for each site. The global monklet will be updated from time to time and produce unintended results on any sites relying on it.

Templates will need to first be registered in the Templates module. Any template file is acceptable provided it uses a standard getContent PHP function. If the template has Sections, those can be assigned at this time.

You can also enter a description for the sermons page which can be displayed on the sermon page with before_show_list="__headerdescription__" (or after_show_list) and show_detail="__headerdescription__"

3. Set your sidebar monklets

If a sermon list uses the 'groupby' tag and does not use 'group_show' or 'show' tags an unordered list is generated. Each list item will be a title linking to the relevant content. In the example below a list item might be 'October 2013' linking to /messages/month/10-2013/.

Example:{
tag="sermon"
display="list"
groupby="month"
}
Other groupby options include series, category or preacher.

You can also use howmany="x" to limit the list to x items.

There is one order option as well, order="count" will order the results by the number of sermons associated with them. For a list of preachers, the preacher with the most number of sermons will be listed first, the one with second most will be second, etc. By default, the lists are ordered by recent additions, the category/preacher/series with the most recent sermon is listed first.

You can also generate a select box which upon selection would take the user to a list of sermons grouped by either category, series, month or preachers.

Example:

{
tag="sermon"
display="selector"
select="__series__ __month__ __category__ __preacher__"
}

 

getContents

Lists

By default the sermons list is found at example.com/sermons/ and uses the template ekk_sermonlist.php. The following getContent will display a basic list.

Example:

<? getContent(
   "sermon",
   "display:list",
   "order:recent",
   "show:<div class="sermonbox __alt__">",
   "show:<h5>__titlelink__</h5>",
   "show:<p><strong>Series: <a href="/sermons/sermon-series/__seriesslug__">__series__</a></strong></p>",
   "show:<p>__preacher__ &nbsp; &nbsp; __date format='m/d/y'__</p>",
   "show:<p class="comments"><a href="__url__">__commentNumber__</a></p>",
   "show:<ul>",
   "show:<li class="sl_listen">__audioplayer linktext='Listen'__</li>",
   "show:<li class="sl_download"><a href="__audio__" title="Download '__title__' Audio (MP3)">Download</a></li>",
   "show:</ul>",
   "show:</div>"
   );
?>

See the sermon API article for a complete list of tags available for sermons lists.

Detail

By default sermon detail pages are found at example.com/sermon/sermons-slug/ and uses the template ekk_sermonpage.php.

Example:

<? getContent(
   "sermon",
   "display:detail",
   "find:".$_GET['sermonslug'],
   "show:<h3>__title__</h3>",
   "show:<ul id="byline">",
   "show:<li id="bl_preacher">__preacher__</li>",
   "show:<li id="bl_date">__date format='M j, Y'__</li>",
   "show:<li id="bl_series">Series: __series__</li>",
   "show:</ul>",
   "show:<ul id="mediabox">",
   "show:<li id="mb_video"><a href="javascript:;" onClick="__videopopup__">Watch Video</a></li>",
   "show:<li id="mb_jukebox">__audioplayer linktext='Launch Jukebox'__</li>",
   "show:<li id="mb_download"><a href="__audio__" title="Download '__title__' Audio (MP3)">Download</a></li>",
   "show:<li id="mb_notes"><a href="__notes__" title="Download '__title__' Notes">Notes</a></li>"
   );
?>