Version: , by Zhin Jio
Developer Last Online: Nov 2010
Version: Unknown
Rating:
Released: 03-12-2003
Last Update: Never
Installs: 0
No support by the author.
Hey all,
I have a question regarding styles vs. templates. My impression up to now is that the 'Style' portion of the show defines the overall look of the page, color/font/property-wise ... creating definitions for many variables that are used later on, especially in the templates (eg, {linkcolor} and the like).
The templates were/are a series of layout elements that get called from the various php scripts to lay down the page design.
And most importantly, that these two things are managed completely separately from one another. For example, it should be possible to have 10 different color styles that ALL use the same body of templates (like 'Default', for example).
Is this impression incorrect?
The reason I'm asking is because I tried creating a new style yesterday, to give users some different look/feel options and encountered problems.
Steps:
1) from admin cp, Add Style:
Title: plForum
Replacement set : Default
Template set : Default
User selectable : yes
2) created a new directory under my images directory called plForum to house all the images
3) copied ALL of the default images in, and then modified the ones I wanted to
4) modified the plForum style to have new color definitions
What I found was that both the plForum AND the Default style definitions were changed. In fact, any changes I made to the Default were ALSO reflected into plForum, and vice versa.
Clearly this doesn't seem to be correct behavior. Did I do something wrong? Is there a step I missed? Did I maybe do something accidentally that I didn't mention here?
Thanks in advance for the assistance.
Regards,
- ZJ
Show Your Support
This modification may not be copied, reproduced or published elsewhere without author's permission.
To have two skins working with their own styles and templates, you must create a new template set and replacement set for your new skin, not making it work with the default templates and replacement set. If you make it that the default skin and your new skin uses the same template set, then both skins will look messed up, having the templates mixed with both skins. So leave the default skin with its default templates and replacement set, and have your new skin have its OWN template set and replacement set. If you had hacks or anything else on your default template set, you'll have to re-add the template changes again to the new skin. Hopefully that made sense. Cheers
Originally posted by joeboo To have two skins working with their own styles and templates, you must create a new template set and replacement set for your new skin, not making it work with the default templates and replacement set. If you make it that the default skin and your new skin uses the same template set, then both skins will look messed up, having the templates mixed with both skins. So leave the default skin with its default templates and replacement set, and have your new skin have its OWN template set and replacement set. If you had hacks or anything else on your default template set, you'll have to re-add the template changes again to the new skin. Hopefully that made sense. Cheers
Yup, it makes perfect sense. But doesn't it also make sense that so long as there isn't any color specific code in any template, that one template should do the trick? You say it will look 'messed up' in both. Why? Sure, I'll need to be less creative than I would otherwise (since I have to use the same types of buttons and images throughout... but what is really stopping me?
Originally posted by Zhin Jio
Yup, it makes perfect sense. But doesn't it also make sense that so long as there isn't any color specific code in any template, that one template should do the trick? You say it will look 'messed up' in both. Why? Sure, I'll need to be less creative than I would otherwise (since I have to use the same types of buttons and images throughout... but what is really stopping me?
And, why was I seeing the behavior I saw?
- ZJ
There you go. Just dont do custom design on a template that only pertains to one skin. Remember that you got more than one skin using info from that template set. Thats when you should use the new skin's new replacement set, not the default one. So you can use replacing variables.
Originally posted by Kars10 You can use many styles with only one templateset. (i have 4 Styles on one set).
Just point the styles to different replacmentsets.
AH. Suddenly everything makes sense. I never actually expanded out the replacement set to see what was in it. Lookie there... all the link colors and stuff you define in the style. Fancy that.
This worked like a champ. I only found one issue with creating the new structure.
so for Default:
the imagesfolder variable points to:
images
for plForum, it points to
images/plForum
I'm also using vbPortal to give the front page a more homey feel. It broke. It was using imagesfolder to point to all its images. It also (sneakily) makes copies of the default top banner images in its own images folder.
so I needed to prepend the $bburl variable to all references to imagesfolder, and then it worked. This created a new problem, but nothing that couldn't be fixed with a quick filesystem symbolic link. All hail unix.