How to make / change a template in Pligg Beta 7

Register an Account
Pligg Chat Room
Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 12-05-2006, 01:19 PM
New Pligger
 
Join Date: Nov 2006
Posts: 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)
Reply With Quote
  #2 (permalink)  
Old 09-15-2009, 07:31 PM
New Pligger
 
Join Date: Sep 2009
Posts: 1
is there a video guide or a online pdf to do this?
Reply With Quote
  #3 (permalink)  
Old 09-15-2009, 09:35 PM
Yankidank's Avatar
Pligg Founder/Coder/Designer
Pligg Version: SVN
Pligg Template: Wistie
 
Join Date: Dec 2005
Location: Ocala, FL
Posts: 3,803
Send a message via AIM to Yankidank Send a message via Skype™ to Yankidank
pdennis0, you just dug up a thread that is 2 1/2 years out of date. Please see the wiki area for articles about designing templates, or open up a thread with a more specific question.

Now Available: Facebook Connect Module !
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Upgrading Pligg 6+ to Beta 7 default template not showing Thana Questions and Comments 1 10-19-2008 10:01 AM
how can i change a template in pligg cooldudeny Questions and Comments 12 04-19-2008 07:44 PM
HELP: Continuos parse errors when trying to change the template code juanmartinbravo Questions and Comments 7 01-26-2008 05:03 AM
Free Pligg Template: OLGnX DAgbar Questions and Comments 41 10-19-2007 01:27 PM
Pligg Double Beta Alpha Omega Preview 6 Yankidank Questions and Comments 4 01-13-2006 08:29 PM


Pligg Modules and Pligg Templates from Pligg Pro Find support on the Pligg CMS Forum - 24 hours a day! Make a donation to support Pligg CMS development