Go Back   Pligg Forum > Pligg Help > General Help
Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 12-05-2006, 12:19 PM
jimbeam jimbeam is offline
New Pligger
 
Join Date: Nov 2006
Posts: 10
Downloads: 0
Uploads: 0
Thanks: 0
Thanked 0 Times in 0 Posts
How to make / change a template in Pligg Beta 7

How to make / change a template in Pligg Beta 7.


Templates and their files (css, js and images) are now stored in a subfolder in the templates folder.


To start a new template, you can create a new template folder and copy all the files from one of the existing templates into your folder. Then open /template/tempates.tpl and add a line for your template. Then open your site in your browser and choose your template.


Pages are still opened via thier php file. Example login is still login.php. The template is called at the end of the file...


$main_smarty->assign('tpl_center', $the_template . '/login_center');
$main_smarty->display($the_template . '/generic_main.tpl');


This tells smarty to use the login_center.tpl file for the middle of the login page. Generic_main.tpl is used for any page that does not require special code like "onload".


Generic_main.tpl does the following...


includes the lang.conf file.
sets up some basic html layout.
includes head.tpl
starts
includes the tpl_center template (body.tpl)

Body.tpl does the following...

sets up some divs
includes the tpl_header template
more divs
includes the tpl_center template (login_center in this example)
more divs
includes the tpl_left_sidebar template (user panel stuff)
more divs
includes the tpl_right_sidebar template (about + misc links + categories)
you know what goes here
includes the tpl_footer template

To change the top of the page (logo + search box) you would modify header.tpl
To change the left sidebar (user panel) you would modify user_panel.tpl
To change the right sidebar (about + misc links + categories) you would modify sidebar.tpl
To change the bottom of the page (powered by pligg) you would modify footer.tpl


To change the center of specific pages. Most pages use the _center.tpl. Example the login page uses login_center.tpl and the register page uses register_center.tpl.


To change the way a story looks on the main page, the queued page or the story page, you'd modify link_summary.tpl. PHP code and smarty variables are set in /libs/link_summary.php.
The 2 Column sidebar, the body.tpl is different. Step 6 includes tpl_left_sidebar then immediately includes tpl_right_sidebar.


The variables like tpl_header are set in the /libs/smartyvariables.php file and should not be changed (you'll break other templates)
__________________
Your Online Skool - www.netskool.blogspot.com
Reply With Quote
Reply



Thread Tools
Display Modes
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Similar Threads
Thread Thread Starter Forum Replies Last Post
how do i change the text, Pligg beta 8 and edit the site tekman Pligg Templates 1 11-23-2006 05:27 PM
Anyone want to make a pligg template for money? pood Pligg Templates 9 11-05-2006 09:21 PM
How can I make the following changes in the Pligg 8.1.0 template? cvcxl Pligg Templates 2 10-18-2006 12:54 PM
Page titles & breadcrumbs AshDigg Core Development 11 06-30-2006 06:35 PM


LinkBacks Enabled by vBSEO 3.0.0