Template Structure
Pligg's default template can be divided up into 6 parts to demonstrate how the template files work together to generate a page. This wiki entry will outline those 6 parts, please begin by opening the attached image file for use in this tutorial.
The header area is designated the number 1 in the attached image.
The header uses header.tpl to generate it's content. In some templates (such as Wistie) the file /sidebar_modules/categories.tpl is used to generate the categories in the header area.
The header area is used commonly for inserting the following data:
The main body area is designated the number 2 in the attached image.
The following templates are used to insert data into the main body:
The sidebar area is designated the number 3 in the attached image.
Pligg supports up to 2 sidebars without having to make any complicated edits. If you want to call a second sidebar, just add {include file=$tpl_second_sidebar.".tpl"} to pligg.tpl where you want sidebar2.tpl inserted. This could be anywhere on your site, not just to the side of the main body.
Sidebar content is something we reffer to as "sidebar widgets". These items are covered in more depth further down on the page and are demonstrated through the number 6 on the image.
The sidebar area is used commonly for inserting the following data:
The footer area is designated the number 4 in the attached image.
The footer area is used commonly for inserting the following data:
The story data area is designated the number 5 in the attached image.
The story data area is used to insert story content into the main body area. This includes the main story, comments, and who voted.
Template files used to generate the story data:
The sidebar widget data area is designated the number 6 in the attached image.
The sidebar widgets are the individual template files found in the /sidebar_modules/ folder included with a template. These items are small blocks of content that get inserted into the sidebars.
See the sidebar definition for examples of sidebar widgets.Element Information
Contents |
Header
The header area is designated the number 1 in the attached image.
The header uses header.tpl to generate it's content. In some templates (such as Wistie) the file /sidebar_modules/categories.tpl is used to generate the categories in the header area.
The header area is used commonly for inserting the following data:
- Search field
- Logo
- Category navigation
- Submit
- Upcoming and Published navigation
- Groups and Create Group
- Other common navigation buttons (profile, admin, login, logout, register)
Main Body
The main body area is designated the number 2 in the attached image.
The following templates are used to insert data into the main body:
- group_center.tpl
- group_story_center.tpl
- index_center.tpl (which includes link_summary.tpl)
- live_center.tpl
- live_comments_center.tpl
- live_published_center.tpl
- live_unpublished_center.tpl
- login_center.tpl
- page_mod.tpl
- profile_center.tpl
- register_center.tpl (and register_step_1.tpl)
- rssfeeds.tpl
- search_advanced_center.tpl
- search_center.tpl
- settemplate_center.tpl
- story_center.tpl (which includes link_summary.tpl)
- submit_step_1.tpl
- submit_step_2.tpl
- submit_step_3.tpl
- tag_cloud_center.tpl
- topusers_center.tpl
- upcoming_center.tpl
- user_center.tpl
- Registration Form
- Login Form
- Story Page (See also Story Data, number 5)
- Search Results
Sidebar
The sidebar area is designated the number 3 in the attached image.
Pligg supports up to 2 sidebars without having to make any complicated edits. If you want to call a second sidebar, just add {include file=$tpl_second_sidebar.".tpl"} to pligg.tpl where you want sidebar2.tpl inserted. This could be anywhere on your site, not just to the side of the main body.
Sidebar content is something we reffer to as "sidebar widgets". These items are covered in more depth further down on the page and are demonstrated through the number 6 on the image.
The sidebar area is used commonly for inserting the following data:
- Search field
- Login form
- Registration form
- Sort story links (Top today, yesterday, week, month, year, etc.)
- Latest Comments
- Top Tags
- Top Stories Today
- Latest Stories
Footer
The footer area is designated the number 4 in the attached image.
The footer area is used commonly for inserting the following data:
- Copyright Information
- RSS Information
- Advanced Search link
Story Data
The story data area is designated the number 5 in the attached image.
The story data area is used to insert story content into the main body area. This includes the main story, comments, and who voted.
Template files used to generate the story data:
- link_summary.tpl
- story_center.tpl
- comment_form.tpl
- comment_show.tpl
- edit_comment_center.tpl
Sidebar Widgets (Modules)
The sidebar widget data area is designated the number 6 in the attached image.
The sidebar widgets are the individual template files found in the /sidebar_modules/ folder included with a template. These items are small blocks of content that get inserted into the sidebars.
See the sidebar definition for examples of sidebar widgets.Element Information
Template Files:
Below is a list of all of the template files included with Pligg followed by a description for each file. This should make it easier for beginners to figure out what files they will want to edit.
This is a directory used to store several small template files that are known as "sidbar widgets". These files add small content blocks to the sidebar area such as a login or search form.
This file is used when there isn't any data to display in the main body area.
This form generates the comment form, which is included at the bottom of a story page.
This form displays comments at the bottom of a story.
This template controls the style for when a user or admin edits a comment.
This template is for editing groups information such as the group name, description, avatar and privacy type.
This template is for the bottom of the template, typically where copyright information is displayed.
This template controls the main Group listing page. This is the page that shows all of the groups for the site.
This file usually contains the site name, logo, search box, categories and other navigational links.
This file handles most of the story content. Everything from the story title, to what tags the story has.
This is the main live page, which shows the latest changes to the site.
This is the comments live page, which displays the latest comments added to the site.
This file handles the javascript for the live page. Usually you will only want to edit the hexadecimal color codes inside it.
This is used to render the live published page, which shows the latest published stories.
This shows the live unpublished stories which have been recently submitted to the site.
This template controls the main login page.
This template controls how pages added to your site through the admin page creator are displayed.
This is the main template file that controls the information in the tags and organizes what order other templates should be included.
This template controls user profile pages, but not your own user profile. Your own profile, where you can edit the values, is handled by user_center.tpl.
This template is used when a user wants to recommend a story to a friend. This is a "story tool".
This is the main registration template file.
This is the registration complete template that alerts users to check their email to verify their email address.
This template displays all of the published category RSS feeds.
This template controls the advanced search page feature for Pligg.
This is the template file for search results.
This template displays what templates are available for users to change to.
Below is a list of all of the template files included with Pligg followed by a description for each file. This should make it easier for beginners to figure out what files they will want to edit.
/sidebar_modules/
This is a directory used to store several small template files that are known as "sidbar widgets". These files add small content blocks to the sidebar area such as a login or search form.
blank.tpl
This file is used when there isn't any data to display in the main body area.
comment_form.tpl
This form generates the comment form, which is included at the bottom of a story page.
comment_show.tpl
This form displays comments at the bottom of a story.
edit_comment_center.tpl
This template controls the style for when a user or admin edits a comment.
edit_group_center.tpl
This template is for editing groups information such as the group name, description, avatar and privacy type.
editlink_edit_center.tpl
footer.tpl
This template is for the bottom of the template, typically where copyright information is displayed.
group_center.tpl
This template controls the main Group listing page. This is the page that shows all of the groups for the site.
group_story_center.tpl
header.tpl
This file usually contains the site name, logo, search box, categories and other navigational links.
index_center.tpl
link_summary.tpl
This file handles most of the story content. Everything from the story title, to what tags the story has.
live_center.tpl
This is the main live page, which shows the latest changes to the site.
live_comments_center.tpl
This is the comments live page, which displays the latest comments added to the site.
live_js.tpl
This file handles the javascript for the live page. Usually you will only want to edit the hexadecimal color codes inside it.
live_published_center.tpl
This is used to render the live published page, which shows the latest published stories.
live_unpublished_center.tpl
This shows the live unpublished stories which have been recently submitted to the site.
login_center.tpl
This template controls the main login page.
page_mod.tpl
This template controls how pages added to your site through the admin page creator are displayed.
pligg.tpl
This is the main template file that controls the information in the tags and organizes what order other templates should be included.
profile_center.tpl
This template controls user profile pages, but not your own user profile. Your own profile, where you can edit the values, is handled by user_center.tpl.
recommend_small.tpl
This template is used when a user wants to recommend a story to a friend. This is a "story tool".
register_center.tpl
This is the main registration template file.
register_step_1.tpl
This is the registration complete template that alerts users to check their email to verify their email address.
rssfeeds.tpl
This template displays all of the published category RSS feeds.
search_advanced_center.tpl
This template controls the advanced search page feature for Pligg.
search_center.tpl
This is the template file for search results.
settemplate_center.tpl
This template displays what templates are available for users to change to.
Aucun commentaire:
Enregistrer un commentaire