Each Preachit template needs to have a template parameter file. The name for this file is template16.xml and it must sit in the root folder for each Preachit template. It is an xml and must fit with Joomla specifications for xml files that are used to generate the input entries in standard Joomla forms. Below we'll explain how to structure the file and run through all the field names that can be used to controls aspects of the Preachit core. You can of course add as many other options as you require to deal the behaviour of the template itself. However, in these instances you need to programme the different effects into the template itself.
File tags
The file is a standard xml file and needs to begin with a specification of this:
<?xml version="1.0" encoding="utf-8"?>
The content of this file then needs to be wrapped in form tags:
<form>
---The content of the file goes here ---
</form>
The parameters settings are then split into various fieldsets such as:
<fieldset name="general" addfieldpath="/administrator/components/com_preachit/models/fields">
---- the different fields go here ---
</fieldset>
In editing area of the template parameters in the Preachit Admin the different options are shown in different tabs. The name of fields will determine the tabs that it is shown in. The names you can use are - general, messagelist, video, audio, text, generalmedia, serieslist, series, teacherlist, teacher, ministrylist, ministry, as media or taglist.
The addfieldpath tells Joomla to register a folder where field files are found. The path here allows you to use the fields specified in the models/fields folder of the Preachit administrator.
Template fields
Below we have listed the fields that can be set in the template parameter file that affect things in the core of Preachit.
We recommend that you look at a template16.xml file from one of our templates to see how these have been implemented and the xml code for each one.
mobtemp
This is the setting for overriding the main template if the user is on a mobile device.
date_format
This is the setting for determining the format of the main date for a message. The value needs to be a standard php date format.
dur_format
This is the setting for determining the format of the duration value. If set to 1 it will show 1 hr 10 mins 5 secs. If set to 2 it will show 1 hr 10 mins. If set to 3 it will show 1:10:05.
display_comments
This is global template setting determining whether to show comments or not.
share
This is the global template setting determining whether to show social bookmarks.
sharecode
This should return an array of id's that link with the share table in Preachit and determine which social book marks to show for the messages.
fbimg
The entry given here is used to set up the image used for sharing to Facebook. It should either be a url for an image or {message}, {series} or {teacher}.
bible_link
This is the setting for deciding if the scripture references are returned as links or plain text.
biblelinktype
This sets the type of the Bible link. 1 links to Bible Gateway. 2 links to Biblia.com. 3 links to You Version.
bible_sep
This determine the character separating the chapters from the verses in the Scripture reference.
linktags
This is the setting for deciding gif the tags are returned with links or just plain text.
series_link
This is the setting for deciding if the series name is returned as links or plain text.
ministry_link
This is the setting for deciding if the ministry name is returned as links or plain text.
teacher_link
This is the setting for deciding if the teacher name is returned as links or plain text.
edit_link
This is the setting for deciding if an edit link is shown where the user has the correct permissions.
download_method
This sets the download method. 0 sets it to auto (recommended and default). 1 forces it to readfile. 2 forces it to curl.
access
This sets the access level for material viewed within this template.
studylist_no
This sets the number of messages per page on the message list.
messagesort
This sets the order for the message list. The value returned should be a valid sql order query such as: 'date asc'.
smessagesort
This sets the order for the message list in the series view. The value returned should be a valid sql order query such as: 'date asc'.
tmessagesort
This sets the order for the message list in the teacher view. The value returned should be a valid sql order query such as: 'date asc'.
minmessagesort
This sets the order for the message list in the ministry view. The value returned should be a valid sql order query such as: 'date asc'.
bmessagesort
This sets the order for the message list in the book view. The value returned should be a valid sql order query such as: 'date asc'.
dmessagesort
This sets the order for the message list in the date view. The value returned should be a valid sql order query such as: 'date asc'.
videoskin
This sets the file to be called for the video player skin. The player needs to be set up to take the [skin] value in the media players area of the Preachit administrator.
audioskin
This sets the file to be called for the audio player skin. The player needs to be set up to take the [skin] value in the media players area of the Preachit administrator.
downloadterms
This sets whether the download links go straight to the file or to a terms page.
downloadtermshtml
This determines the text for the download terms page. It must include [downloadlink] as Preachit looks for this to substitute the link into the correct place.
podcastlink
This should return an array of id's that link with the podcast table in Preachit and determine which podcast links to show for the message. The links can then be grabbed from the template helper class with the call - $helper->getpodcastlinks().
serieslist_no
This sets the number of series per page on the series list.
seriessort
This sets the order for the series list. The value returned should be a valid sql order query such as: 'name asc'.
serimgdef
This should return 1 or 0 depending on whether you want a default image to be used for the series image if one has not be assigned to the series in the series form.
teacherlist_no
This sets the number of teacher per page on the teacher list.
teachersort
This sets the order for the teacher list. The value returned should be a valid sql order query such as: 'lastname asc'.
teaimgdef
This should return 1 or 0 depending on whether you want a default image to be used for the teacher image if one has not be assigned to the teacher in the teacher form.
ministrylist_no
This sets the number of ministry per page on the ministry list.
ministrysort
This sets the order for the ministry list. The value returned should be a valid sql order query such as: 'name asc'.
minimgdef
This should return 1 or 0 depending on whether you want a default image to be used for the ministry image if one has not be assigned to the ministry in the ministry form.
