Go Back   Pligg Forum > Pligg Development > Pligg Templates
Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 07-19-2007, 01:14 PM
techsmeks techsmeks is offline
Casual Pligger
 
Join Date: Jul 2007
Posts: 63
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.
  #2 (permalink)  
Old 07-19-2007, 01:20 PM
tbones tbones is offline
Constant Pligger
 
Join Date: Apr 2007
Posts: 1,074
Downloads: 26
Uploads: 0
Thanks: 53
Thanked 25 Times in 23 Posts
Do you read the latest posts (Setting Default Template) ?
Reply With Quote
  #3 (permalink)  
Old 07-19-2007, 02:02 PM
techsmeks techsmeks is offline
Casual Pligger
 
Join Date: Jul 2007
Posts: 63
Downloads: 2
Uploads: 0
Thanks: 1
Thanked 6 Times in 5 Posts
Toggling templates

Thanks for linking to the other thread.

Maybe you can throw some light on this - are references to "yget" in sidebar_comments.php, sidebar_stories.php and sidebar_stories_u.php now fixed in the latest version? Without addressing these, toggling does not work.

BTW distinguishing between the toggling of multiple templates, for those of us who may be using multiple templates versus setting a different default template.
__________________
www.mobengines.com Create your own Pliggs instantly!
Reply With Quote
  #4 (permalink)  
Old 07-19-2007, 02:09 PM
tbones tbones is offline
Constant Pligger
 
Join Date: Apr 2007
Posts: 1,074
Downloads: 26
Uploads: 0
Thanks: 53
Thanked 25 Times in 23 Posts
Ok, your topic is slightly different

The revision should cover all earlier occurances of yget in the code, I´ve reported that once to Ash.

But to be sure: Click on the "text changed" links of the revison link.
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 On
[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
Templates not showing in Admin area, folders are 777 peachesboy General Help 3 12-21-2007 04:20 PM
9.5 Pligg Templates eon Pligg Templates 15 05-23-2007 02:56 AM
Looking for custom Pligg templates? paul411 Pligg Templates 0 11-14-2006 11:19 PM
Editing the templates? colt45 Pligg Templates 8 06-28-2006 10:11 PM
Farcry - Mollio CSS Templates hevnsnt Pligg Templates 4 05-03-2006 07:29 PM


LinkBacks Enabled by vBSEO 3.0.0