NewsFeaturesDownloadsDevelopmentSupportAbout Us

Updating templates for LifeType 1.2

From LifeType Wiki



Templates from LifeType 1.1 should work flawlessly in LifeType 1.2 but they will be missing some of the new features available in the new release such as paging of comments or detection of the logged-in user in the comment form.

In addition to this, templates from LifeType 1.2 will not work properly if they are using any of the unported plugins.

The following sections will list some of the improvements related to the template layer that you should bear in mind in order to have a fully working version of your template under LifeType 1.2

Changes in LifeType 1.2

Paging of comments

LifeType is able to split the list of comments received for a post over several different pages. This has the double advantage of generating smaller pages and of pulling a smaller amount of data from the database every time. Think about loading a post page with over 1000 comments!

The changes needed to get paging for comments working are described Template Guidelines#Paging for comments.

Comment form for authenticated users

LifeType 1.2 is able to detect the user who is currently logged in an pre-fill the username field of the comment input form, in addition to marking the comment as being posted by an authenticated user.

There are some changes required to implement this in your templates but the best solution is to remove your version of commentform.template altogether, and let LifeType use the global one stored under templates/default/. This process will happen automatically (as part of a new feature available in LifeType 1.2) and all you have to do is tweak the CSS code of your template to make it use the classes used by the default comment form.

There are more details on this feature in the Template Guidelines#Comment form for authenticated users.

Automatic page titles

This is a feature that should please those who have been heavily customizing their page titles to please search engines. LifeType will now generate generally good enough page titles that can be directly used in our pages via the {$pageTitle} tag. The old method of customizing the page title at the Smarty/template level is of course possible, but this solution should be good enough for most users.

There are more details in the Template Guidelines#Page titles

Anti-Spam tests

You should add the following code to your header.template in order to take advantage of all of the built-in anti-spam tests.

{if $badbehavior}

More information is here.