SMS User's Guide
Performance Modifications
Performance Options in the Constant Editor
For instructions on changing Constant Editor options, refer to Modifications Using the Constant Editor.
There are a number of performance modifications you can make using the Constant Editor. Use the following instructions for modifying these options.
Allow Caching: By default, this option is turned on (set to 1). To turn off this option, change the option to 0.
Use Storage Folder: If you would prefer to use the TYPO3 General Storage Folder rather than the Sermon Storage Folder, set this option to 0.
SMS Record Storage PID: If you choose to use the TYPO3 General Storage Folder, you must specify the Storage Folder's PID (see Illustration 23 for how to find the page's PID).
Template File: If you're going to create or modify the SMS Template file, point this option to the location of your new Template (see Modifying the Layout Template).
List View – Alternating Class: If you wish to, you can change the class declaration added to odd rows of the list view. The ###ALTERNATING_CLASS### marker is replaced by the assigned string. Out of the Box, the SMS list view adds a class to every odd row, allowing you to style odd and even rows differently for visual improvements. The default class is tx-wecsermons-pi1-list-odd, but this can be changed to something different if you wish.
Single View – Single PID: If you choose to use the Single Display option, set this option to the Page ID where you wish the Single Sermon records to show (see Illustration 23 to view how to find the page's PID). If you use the Single View, you must also change the List View – List PID and the Search View – Search PID options.
List View – List PID: If you choose to use the Single Display option, set this option to the Page ID where you wish the Single Sermon records to show. If you use the Single View, you must also change the Single View – Single PID and the Search View – Search PID options.
Search View – Search PID: If you choose to use the Single Display option, set this option to the Page ID where you wish the Search results to show. This PID does not have to be the same PID as the Single Display page, but whatever page you choose must have the SMS plugin installed and configured for the Sermons Search feature (see Adding a Search Feature to the Layout).
Localization
The SMS extension has the potential for being multi-lingual using the local_lang file. Included languages for this extension include:
(dk) Danish
(de) German
(it) Italian
(fr) French
(nw) Norwegian
(es) Spanish
(cz) Czechoslovakian
(nl)
(pl)
(si)
(fi) Finnish
(tr)
(se)
(pt)
(ru) Russian
(ro) Romanian
(ch)
(sk)
(lt)
(is)
(hr)
(hu) Hungarian
(gl)
(tl)
(gr) Greek
(hk)
(eu)
(bg) Belgian
(et)
(ar)
(he) Hebrew
(us)
(lv) Latvian
(jp) Japanese
(vn)
(ca)
(ba)
(kr)
(eo)
(my)
Although English is the default language, it is easy to change the SMS extension language. Indeed, to use a different language requires but a single line of TypoScript added into the Template's Setup. To change the SMS extension language:
Using the Template Module, click on the root directory and then select Info/Modify from the drop-down list on the right.
Click the Edit icon to the left of Setup.
Scroll down to the bottom of the file and add the following TypoScript:
plugin.tx_wecsermons_pi1.LOCAL_LANG = XX >
(where XX is the two letter language code from the above chart).
Click Update and close.
Adding a Custom Resource Type
One of the highly flexible portions of the SMS extension is the ability to create custom resources, select properties for the resources, and define how the resources will be shown in the Frontend. This is accomplished by defining a new Resource Type.
![]()
Caution: The rest of this section assumes the reader has an understanding of template records, TypoScript, cObjects, and how to use these in conjunction to provide Frontend output. For assistance with this, see the Support section of www.webempoweredchurch.com. WEC provides a self-help Community forum, and a list of third party providers who may assist you in your needs.
There area two steps to create and use a custom resource type for the SMS extension. Those steps are as follows:
Create a new SMS Resource Type record and TypoScript Object
Modify the SMS template file, inserting new markers as needed
Example Addition of a New Resource Type
Let's suppose your organization stores the Study Guides of each sermon in Adobe PDF files. You would like to make the file available for download, but would also like a preview of the document next to the document link. You would prefer the preview be generated from the first document page, rather than uploading a separate thumbnail image for every file. SMS Resource template markers alone will not accomplish this, but you can use the output from the TypoScript Object along with the ###RESOURCE_CONTENT### template marker to display this output.
Begin by logging into the TYPO3 Backend with an administration login. You must have administration privileges in order to modify template records.
Step 1: Creating a New Resource Type

Illustration : Adding a New Plugin Resource Type 1
Refer to Illustration 45. Click on the List Module in the Backend (1).
Click on the SMS Storage Folder (2).
Click on the Create New Record icon in the upper right corner of the screen (3).
Refer to Illustration 46. Scroll down and click on SMS Resource Types (4) to create a new resource type record.
Refer to Illustration 47. In the new SMS Resource Type record, fill in the Title, Marker Name, and TypoScript Object Fields, along with any other fields you require (5).
Illustration : New Plugin Resource Type
Refer to Illustration 48. Scroll down the page to t
he Visible Resource Fields. Click the File item to add the file field to this resource type (6). This allows you to upload a file directly into this Sermon Guide resource type.
Illustration : Add File Field to Resource TypeClick the Save & Close button (7).
Step 2: Modify the Template File
After creating the SMS Resource Type records, you need to modify the existing template file and add markers for the new SMS Resource Type.
![]()
Tip: See the Modifying the Layout Template portion of this document, under the Advanced Options section, for details on making a copy of the existing template file for modification.
Refer to Illustration 49. Click on the Template module. (1)
Illustration : Edit the Template ResourceClick the page name Sermon, (or other location where the template record for SMS is stored.) (2)
Choose Info/Modify from the drop down menu in the upper right of the screen. (3)
Click the Edit pencil image, to the left of Resources: which opens another edit page. (4)
Refer to Illustration 50. Click on the Edit pencil image on the wecsermons.tmpl record of the UPDATE RESOURCE LIST (5).
Illustration : Edit the SMS Template Resource
Refer to Illustration 51. Find the template you wish to modify and insert the Sermon Guide marker:
Illustration : Edit the Template, Insert the Sermon Guide Marker
<!--###SERMON_GUIDE###-->(6)The template marker, ###SERMON_GUIDE### sets the start and end point where the output for a sermon guide will be placed in the template. The marker ###RESOURCE_CONTENT### tells the SMS to show the Sermon Guide using the TypoScript object.
Illustration : Insert the Sermon Subpart Marker
Refer to Illustration 52. Insert a subpart marker for the Sermon Guide template (7).
The Sermon Guide template is used to display the single view of a Sermon Guide Resource.Refer to Illustration 50 again. Click the Update button to save your changes to the template file.
Step 3: Create a New TypoScript Object
In some circumstances you may not get all that you need out of a new resource type, using template markers alone. This is the point that TypoScript takes over, giving you advanced control of how your custom resource type is shown.

Illustration : TypoScript Object Name Field in an SMS Resource Type Record
Technical Stuff: For every resource type, there is a ###RESOURCE_CONTENT### marker that renders TypoScript content objects (cObjects). Within the setup field of a template record, you can use TypoScript to configure this advanced output of your custom resources. This is accomplished by adding new properties to the resource_type cObject array.
The resource_type cOjbect:
plugin.tx_wecsermons_pi1.resource_types = CASE
The resource_types object is a CASE content object (cOjbect). This object contains an array that defines how to display each resource type on the Frontend. Each array property name is defined by the TypoScript Object Name field of the SMS Resource Type record (see Illustration 53).
Example TypoScript Code
plugin.tx_wecsermons_pi1.resource_types {
# PDF (Portable Document)
pdf = COA
pdf {
...
}
# Flash video
flv = COA
flv {
...
}
# MP3 Audio
mp3 = COA
mp3 {
...
}
# Sermon Guide
= COA
{
...
}
# Other custom resources
...
}
Text : TypoScript Example for Custom Resources
To create a new TypoScript Object, begin by logging into the TYPO3 Backend with an administration login.
Refer to Illustration 54
. Click on the Template Module (1).
Illustration : Adding TypoScript for a New Resource 1Click on the page where the SMS Static Template is installed on your site—typically either the Root Page (Home) or the Sermons page (2).
Click the upper right dropdown, and select Info/Modify (3).
Click the Edit icon (pencil) to the right of Setup (4).
Refer to Illustration 55
. Insert your new TypoScript code (5) to update the resource_types object array, creating a new definition for SermonGuide. (See Text 1 below for example code.)
Illustration : Adding TypoScript for a New ResourceClick the Update button to save your changes (6).
Example TypoScript Code
plugin.tx_wecsermons_pi1.resource_types {
# Sermon Guide (PDF format)
# Use COA, content object array, to output multiple types of content at once
SermonGuide = COA
SermonGuide {
# Use the image cObject to output a preview of the PDF file
10 = IMAGE
10 {
prefixComment = 2 | Sermon Guide Preview:
altText.field = title
file.import = uploads/tx_wecsermons/
file.import.field = file
file.width = 150m
file.height = 150m
wrap = <div class="tx-wecsermons-pi1-sermonguide-preview" style="float: left;">|</div>
stdWrap.typolink {
parameter = uploads/tx_wecsermons/{field:file}
parameter {
setCurrent.field = file
setCurrent.listNum = 0
insertData = 1
}
}
}
# Use the text cObject to output the title of this resource, wrapping the title
# in a link to the file attachment
20 = TEXT
20.prefixComment = 2 | Sermon Guide File Link:
20.field = title
20.typolink {
parameter = uploads/tx_wecsermons/{field:file}
parameter.insertData = 1
}
20.wrap = <p class="bodytext">|</p>
30 = TEXT
30.field = description
30.parseFunc < plugin.tx_wecsermons_pi1.general_stdWrap.parseFunc
wrap = <div class="tx-wecsermons-pi1-sermonguide">|</div>
}
}
Text 1: Example TypoScript Code for Illustration 49
Above is the example code needed for Illustration 55. This is obviously a complicated example, so take a look at the Simplified TypoScript Example section below for more detail.
Simplified TypoScript Example
Let's take a moment and walk through a simple TypoScript example, using the SMS Resource Type - Downloadable File. For
Assume this is the current Record that is being processed by TYPO3, truncated for simplicity:
Example Downloadable File Record
(There are two files attached to this record, sermon_guide1.pdf, and sermon_guide2.pdf)
downloadfile = TEXT
downloadfile {
field = title
typolink {
parameter = uploads/tx_wecsermons/{current:1}
parameter {
setCurrent.field = file
setCurrent.listNum = 0
insertData = 1
}
}
}
Text : Simplified TypoScript Example
Line 1: Define downloadfile a TEXT cObject. This causes any resource of this type to be rendered as simple text. See TEXT cObject of TypoScript Reference Document, TSRef section 8.3.
Line 3: Setting the field property to the value of title sets the output of downloadfile to the value stored in the title field of the current record. See field property of stdWrap, in TSRef section 5.1.
Line 4: Define typolink so that See typolink function in TSRef document, section 5.8.
Line 5: Set the typolink parameter to uploads/tx_wecsermons/{current:1}. Here, {current:1} is a variable that will be replaced during execution. See getText data type in TSRef section 2.2.
Line 7: setCurrent causes the current variable to be assigned the value stored in the file field of the record. current is essentially a temporary storage area where you can store content and manipulate it before assigning it to the actual output. See setCurrent property of the stdWrap function in TSRef section 5.1, and field property in the same section.
Line 8: The listNum property is set to 0, specifying an index key that is used to select one value from a comma separated list. In this case the file field is a comma separated list of filenames, and the index starts at 0 for the first item, i.e. Indexes 0,1,2,3. An index value of 2 selects the third item in the comma separated list. See listNum property of stdWrap, in TSRef section 5.1.
Line 9: Setting the insertData propery to 1 specifies that the parameter property value should be searched for {} brackets which denote variables, and any of these should be replaced by actual data. See insertData property of stdWrap, in TSRef section 5.1.
Now lets step through the execution process watching as each line is executed in order. Notice how the HTML output of the downloadfile cObject changes, and how the current variable is assigned a value, modified, and ultimately merged into the ouput.
Line 1
Line 3
Line 5
Line 7
output | <a href="uploads/tx_wecsermons/{current:1}">Sermon Guide – 12/31/07</a> |
current | sermon_guide1.pdf,sermon_guide2.pdf |
Line 8
output | <a href="uploads/tx_wecsermons/{current:1}">Sermon Guide – 12/31/07</a> |
current | sermon_guide1.pdf |
Line 9
output | <a href="uploads/tx_wecsermons/sermon_guide1.pdf">Sermon Guide – 12/31/07</a> |
current | sermon_guide1.pdf |
| 16 / 30 |


