Technology Services for Ministry

SMS User's Guide

Adding a New Plugin Resource Type

This is a unique resource type that allows you to define how another Frontend plugin interacts with the SMS. In the example we'll use here, we will create a news article SMS Resource that will display news articles with our SMS Records. 

 

Step 1: Create a Plugin Display Page if Needed

This step is only required if the plugin you are integrating into the SMS is not already set up on your web site. If the plugin is already set up, you may skip down to Step 2. 

 

Caution:
In order for many plugins to work properly, they need to be set up on a page by themselves. Plugins that require user input, such as filling in a text box or choosing from a list of options, can inadvertently delete commands of a different plugin on the same page when you hit the submit button.

 

Tip:
Those plugins that do not require you to hit submit, such as the WEC Audio Player, work well amongst other players all on the same page.

 


  1. Illustration : Creating a Plugin Display Page

    Refer to Illustration 56. Click on the List module. (1)

  2. Click on the the page where you have the sermon plugin configured. (2)

  3. Click on the Create a new Record icon. (3)

  4. Click the Page (inside) selection from the list that appears. (4)


Illustration : Title the Plugin Display Page

  1. Refer to Illustration 57. Be sure to give the page an appropriate Pagetitle, then fill in any other fields that you require. (5)

  2. Click the Save & Close button when finished. (6)

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 


  1. Illustration : Creating New Content

    Refer to Illustration 58. Click on the Page module. (1)

  2. Click on the name of the new page you just created. (2)

  3. Click on the Create New Element button. (3)

 

 

 

 

  1. Refer to Illustration 59. Scroll down the


    Illustration : Choose the Plugin

    page to the plugin you wish to add to the page. (4)

 

 

 

 

 

 

 

 

  1.  

     

  2. Refer to Illustration 60. Configure the plu


    Illustration : Configuring the Plugin

    gin as needed to display the records you wish from the Sermon Management System.

     

     

 

 

 

 

 

 

 

 

 

 

Step 2: Creating the SMS Resource Type Record

The purpose of the SMS Resource Type Record is to join SMS Resources to HTML Templates and TypoScript. The SMS Resource Type record is where we configure a resource type to act as a plugin. 


Illustration : Adding a New plugin Resource Type 1

  1. Refer to Illustration 61. 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 (3).

 

 

 

 

  1.  

     


  2. Illustration :  New Plugin Resource Type 2

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

     

     

     

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 


  1. Illustration : New Plugin Resource Type 3

    Refer to Illustration 63. Change the Type of Resource Type to plugin/Extension (5).

  2. After changing the Type of Resource Type, TYPO3 will ask you to save now in order to reload the form. Click OK (6).

 


  1. Illustration : Creating a Plugin SMS Resource Type

    Refer to Illustration 64. Fill out all of the required fields. The Querystring Parameter is a critical field that enables the viewing of records from another extension. This defines part of the query string that another extension will use to display or render one of its records, i.e., the tt_news extension uses the query string parameter: tx_ttnews[tt_news]=3, to render the tt_news record with UID = 3. (7)

 


Tip: Discovering the query string parameter requires researching the extension you wish you use with the SMS plugin and entering the appropriate string here. Most often, this will be in the format of: tx_<plugin_name> [<variable>].

 

 

 

 

 

 

 

 

 

Step 3: Creating a 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.  

 


This step is not required if SMS Resource markers are sufficient for your needs, or if you are simply linking to a plugin outside of the SMS pages.

 


Technical Stuff: For every resource type, the ###RESOURCE_CONTENT### marker 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. The TypoScript Object Name of a SMS Resource Type record is what connects the TypoScript you write to the resource. The TypoScript code is added to the resource_type cObject array.

 

 

Inserting the TypoScript into the Template's Setup Field 

 

  1. Refer to Illustration 65


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

     

  5. Refer to Illustration 66


    Illustration : Inserting TypoScript Code into the Setup Field

    . Insert your TypoScript code, and click the Update button (5).

 

Example TypoScript 

plugin.tx_wecsermons_pi1.resource_types {

 

        news < plugin.tt_news

        news {

                code >

                code = SINGLE

                substitutePagetitle = 0

                templateFile = EXT:wec_sermons/res/tt_news_v2_template.html

        }

Text : TypoScript Code For News Article

See Text 3 for code shown in Illustration 66.

  WEC_Sermon_Management_System_1.0_02.sxw 17 / 30