Subscribe via Feedburner Flickr Images Youtube Profile LinkedIn Profile
xScape Premium Themes

T2: System Basics

Thumbnail for T2: System Basics

This is first in series of tutorials about using T2 templates system. This post will focus on system basics. Second will be about standard ratings, third part will be about widgets and T2, and multi rating block and T2.

t2 templates 300x145 T2: System Basics

Main T2 Panel

Main T2 panel show the list of all templates in the database. You can filter list by template type. For some templates you can see the name of tag this template replaces within some other templates. Every tag used in templates is in the form %TAG%, as it was before. You must use all capital letters.

For each templates type plugin installs one default template and maybe some extra/expanded templates. You can use any of existing templates to create your own. Default templates can’t be deleted or edited. Each template has one or more elements that are used in different situations, depending on template.

t2 defaults 300x167 T2: System Basics

T2 Defaults Panel

In the bottom of this panel there is an option to set default templates for each template type. These default templates will be used in case you don’t specify template for some type of rendering. This panel will feature some more options in te future, but for now this is it.

t2 editor simple 300x134 T2: System Basics

Vote Template Editor

Types: Elements

These are very basic templates that don’t use any tags.  They have 2 or more elements. For instance, Word Votes is used to set single and plural version of word vote/votes. Default is in english, but if you want it in some other language, duplicate that template, and you will get a editor panel. Give the template a name, and description (not necessary). Write singular and plural version of word vote, and save it. Similar is for all the other elemental templates. When you create your own templates, you can go to defaults panel, and set your templates as default.

t2 codep T2: System Basics

Dependent Template

Types: Rating Text

These templates have one or more elements, and support a number of tags. Some of these tags can be some other templates. Most of templates use Word Votes template. And you can select which template is used. If template is codependent in the elements side of the editor you see a selection box for such templates. When template is rendered, that dependent template will be rendered using the selection you set.

Types: Widgets

These templates are used for rendering widgets. If widget needs to display list of results, usually you need to set 3 elements: header, item and footer. Default templates use unordered lists, but you can use tables or divs if you want.

Templates in your own language

If you want to translate templates to any language, duplicate default ones, translate them and change if you want, save them, and set as defaults for future easier use. Also, don’t forget to change what templates are used on the settings panel for standard, comments and other types of ratings. All default templates will be only in english.

Few more posts about T2 will follow soon.

GD Star Rating
loading...

Share this:

del.icio.us DiGG Google StumbleUpon Google Buzz Microsoft Live MiXX RSS PDF
T2: System Basics, 7.9 out of 10 based on 44 ratings

Comments are closed.

Comments are closed.

www.dev4Press.com

Dev4Press is a premium service dedicated to developing of high quality plugins and themes for WordPress, custom development and consulting. Follow this link to find out more...

Feedburner Feedburner updates

Sign up to receive all latest news about GD Star Rating directly to your email.
xScape Premium Themes