You’ve seen a lot of beautiful Pligg templates created by web developers of different skills and experience. Perhaps, you want to try your hand at developing Pligg designs as well? Then take a look at the quick tips we have prepared for you today!
First we should say that Pligg makes use of Template Lite - a sort of Smarty template engine. If you want to use CSS, Javascript, PHP or CSS code within your .tpl files you need to provide a special markup for the Smarty code:
- for CSS and Javascript: you should use a {literal} tag at the beginning and a {/literal} tag in the end
- for PHP: you must put the {/php} in the place of the closing tag
Examples:
1.Javascript
{literal}
<script type=”text/javascript”>
document.write(”Hello World!”);
</script>
{/literal}
2.CSS
{literal}
<style type=”text/css”>
.example {font-weight:bold;}
</style>
{/literal}
3.PHP
{php}
echo ‘Hello World!”;
{/php}
5 Main Pligg Template Files
A lot of beginners who start creating Pligg template may be confused by the number of .tpl files used by Pligg as there are up to 40 of them. These files are responsible for every little element every designer might be eager to use but don’t worry - you don’t have to edit all of these files for a successful look of your template. You can modify only 5 main template files and in the shortest time your website will look unmatched.
1. Pligg.tpl
This type of template files is responsible for the main layout control and comprises most of the data contained in the header.
2. Header.tpl
This file allows to navigate the published, upcoming and submit pages and i used for wrapping the breadcrumb, search box and the category.
3. Sidebar.tpl (and sidebar2.tpl)
These two types of files are responsible for the sidebar content. It is divided in two files in order for you to choose whether you want to have two sidebars or use the second one.
4. Footer.tpl
This template file is used for the content of your website footer, particularly for contact information, site links and credits.
5. Link_summary.tpl
Link_summary.tpl file is for implementing the styling of the story data which includes the story page, upcoming page, profile page, group page or third submission step page. It possesses a lot of features and is considered to be one of the most complicated template files but if you will take your time and read the code thoroughly you won’t find it difficult to understand the layout of the template.
Understanding the Language File
Another aspect that deserves special attention concerns the way Pligg uses the language elements. In order to support the most of the languages the words and phrases were put into a single file which is usually located in the /languages directory. Comprising all the language elements in one file makes it easier for you to find the very word or phrase you might be eager to change within your template. Moreover, it simplifies the process of translation as well.
These are only the basics of Pligg template creation process. For more tips and tutorials you should read the Pligg Wiki articles. Besides, these articles are editable so every user may implement some changes within them if necessary or add his/her own useful tips to the collection! Join, contribute, create!
This is a new Pligg template called Mystique and available for free download. The template possesses nice design and is distinguished by advanced functionality features which makes it a perfect basis for any kind of website you are going to start up.
