Technology Services for Ministry

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. 

 

  1. Allow Caching: By default, this option is turned on (set to 1). To turn off this option, change the option to 0.

  2. 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.

  3. 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).

  4. 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).

  5. 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.

  6. 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.

  7. 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.

  8. 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: 

 

  1. (dk) Danish 

  2. (de) German 

  3. (it) Italian 

  4. (fr) French 

  5. (nw) Norwegian 

  6. (es) Spanish 

  7. (cz) Czechoslovakian 

  8. (nl) 

  9. (pl) 

  10. (si) 

  11. (fi) Finnish 

  12. (tr) 

  13. (se) 

  14. (pt) 

  15. (ru) Russian 

  16. (ro) Romanian 

  17. (ch)  

  18. (sk) 

  19. (lt)  

  20. (is) 

  21. (hr) 

  22. (hu) Hungarian 

  23. (gl) 

  24. (tl) 

  25. (gr) Greek 

  26. (hk)  

  27. (eu) 

  28. (bg) Belgian 

  29. (et) 

  30. (ar) 

  31. (he) Hebrew 

  32. (us)  

  33. (lv) Latvian 

  34. (jp) Japanese 

  35. (vn)  

  36. (ca) 

  37. (ba) 

  38. (kr) 

  39. (eo) 

  40. (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: 

 

  1. Using the Template Module, click on the root directory and then select Info/Modify from the drop-down list on the right.

  2. Click the Edit icon to the left of Setup. 

  3. 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). 

  4. 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: 

 

  1. Create a new SMS Resource Type record and TypoScript Object  

  2. 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

  1. Refer to Illustration 45. Click on the List Module in the Backend (1).

  2. Click on the SMS Storage Folder (2).

  3. Click on the Create New Record icon in the upper right corner of the screen (3).

 

 


  1. Illustration : New Plugin Resource Type 2


    Illustration : New Plugin Resource Type 2

  2. Refer to Illustration 46. Scroll down and click on SMS Resource Types (4) to create a new resource type record.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 


  1. Illustration : New Plugin Resource Type

    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).

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

  1. Refer to Illustration 48. Scroll down the page to t


    Illustration : Add File Field to Resource Type

    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.

  2. Click 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.

 


  1. Illustration : Edit the Template Resource

    Refer to Illustration 49. Click on the Template module. (1)

  2. Click the page name Sermon, (or other location where the template record for SMS is stored.) (2)

  3. Choose Info/Modify from the drop down menu in the upper right of the screen. (3)

  4. Click the Edit pencil image, to the left of Resources: which opens another edit page. (4)

 


  1. Illustration : Edit the SMS Template Resource

    Refer to Illustration 50. Click on the Edit pencil image on the wecsermons.tmpl record of the UPDATE RESOURCE LIST (5).


  2. Illustration : Edit the Template, Insert the Sermon Guide Marker

    Refer to Illustration 51. Find the template you wish to modify and 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.

 

 

 

  1. 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.

     

  2. 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.  

 

  1. Refer to Illustration 54


    Illustration : Adding TypoScript for a New Resource 1

    . Click on the Template Module (1).

  2. Click on the page where the SMS Static Template is installed on your site—typically either the Root Page (Home) or the Sermons page (2).

  3. Click the upper right dropdown, and select Info/Modify (3).

  4. Click the Edit icon (pencil) to the right of Setup (4).

 

 

  1. Refer to Illustration 55


    Illustration : Adding TypoScript for a New Resource

    . 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.)

  2. Click 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 

title 

Sermon Guide - 12/31/07 

file 

sermon_guide1.pdf,sermon_guide2.pdf 

(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 

output 

 

 

Line 3 

output 

Sermon Guide – 12/31/07

 

Line 5 

output 

<a href="uploads/tx_wecsermons/{current:1}">Sermon Guide – 12/31/07</a>

 

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 

 

  WEC_Sermon_Management_System_1.0_02.sxw 16 / 30