View Single Post
  #1 (permalink)  
Old 07-19-2007, 01:14 PM
techsmeks techsmeks is offline
Casual Pligger
 
Join Date: Jul 2007
Posts: 62
Downloads: 2
Uploads: 0
Thanks: 1
Thanked 6 Times in 5 Posts
Toggling between templates

This should help make it easier to test and deploy new templates and also answer questions (Setting Default Template) around setting templates.

In order to toggle between multiple templates:

1. Replace references to "yget" in sidebar_comments.php, sidebar_stories.php and sidebar_stories_u.php to enable the currently selected template:
Add reference to $selectedtemplate variable to this line as shown: global $the_template, $main_smarty, $db, $selectedtemplate;
and replace if($the_template == "yget") with if ($the_template == $selectedtemplate)

2. Add the following line to libs/smartyvariables.php
$selectedtemplate = $db->get_var('SELECT var_value from ' . table_config . ' where var_name="$thetemp";');

3. Use the latest files for sidebar_stats and random_story modules

Once you have the new template in the templates directory, add the template entry to the templates.tpl file and set the template name in admin>config>templates. The new template should show up.
__________________
www.mobengines.com Create your own Pliggs instantly!
Reply With Quote
Sponsored Links
Check out the New Modules at the Pligg Pro Shop.