Re: doc for skins
Joe Stewart <[email protected]> Mon, 7 Apr 2003 15:53:56 -0500
| Newsgroups | gmane.comp.cms.phpslash.user |
|---|---|
| Message-ID | <[email protected]> |
On Mon, Apr 07, 2003 at 01:05:56PM -0500, Joshua A Udall wrote:
> phpslashers -
>
> I've just upgraded to 0.71 and I'd like to change the look of my site. The
> template documentation is a little dated. I found that out there are three
> slashHead.tpl files in the default install and there doesn't appear to be
> any docs for the development of skins. Could someone briefly make an
> outline of skins and perhaps we could get this in the docs. If no one else
> has time write it up single handedly, I'll compile the responses, make it
> readable, and submit it to whoever for inclusion in the next release. Some
> of the basic questions I have are:
>
Hopefully you can get enough responses to help the documentation get
up to date.
> 1) How do I now change the look of my site?
The pertinent section of the docs:
http://www.phpslash.org/article.php3?story_id=28&topic_id=39§ion_id=8#ss6.3
The templates listed are pretty correct. Really slashHead.tpl,
slashFoot.tpl, fancybox.tpl and style/skinname.css.
To get started just create another directory alongside the other skins
and copy skin.ini from basiccurves. Then copy the template you need
to change from the basic skin to your new directory and make your
changes.
The templates mostly have html comments so viewing the source is
helpful to know which template displays what.
skins have this basic layout:
public_html-templates-lang-skinname
-styles/skinname.css (optional css file)
-images/skinname (optional skin specific image files)
For more skin examples download the phpslash-skins test release:
http://sourceforge.net/project/showfiles.php?group_id=10566&release_id=150735
Please help improve these skins, they are kinda rough. You may
recognize some of them.
If anyone wants to volunteer to maintain a skins repository, please
speak up.
> 2) Why are there more than one version of each file and how do skins
> work? I certainly don't want to do it three times over (or more) for each
> skin. Some basic command line examples would be very helpful if they are
> explained. Such as this little piece was from Luis in the mail archives
> addressing a question of how to restrict a site to only one skin - but I
> don't quite get it:
>
The phpSlash distribution has three skins included. default, basic,
and basiccurves.
- default is the older skin without CSS.
- basic has CSS support.
- basiccurves resembles the default skin but has CSS support. This
skin is an example of how to create your own skin.
Before the skin.ini allowed extending a parent skin, all template
files had to be included in each skin. So the default and basic are
complete sets of templates.
The basiccurves only has the files different from its parent skin.
> $> cd $PHPSLASHROOT/templates
> $> for i in `/bin/ls en`; do mkdir no/$i; done
> $> for i in `/bin/ls no`; do echo 'skin.parent =
> "../en/$i"' > no/$i/skin.ini; done
>
> essentially, create a directory for e/a template you have in "en" in the
> directory "no". and then create a skin.ini file that contains the line:
> skin.parent = "../en/$i" . where $i is the name of e/a one of the
> directories in the directory "en" ... it's more confusing to explain it than
> to code it... just read the shell code above...
>
> 4) What's the skin.ini file? What are some options that could be used?
It is a method to provide metadata about the skin.
Two variables are currently available.
skin.parent - If your extended skin doesn't provide a template, this
skin will be searched for the needed template. So if you don't change
a template, it doesn't have to be included in your skin.
skin.parent.language - Should be able to have a parent skin in another
language. This variable is not as widely tested.
> 3) What if I have changes outside the skin files, how to I prevent those
> changes from being overwritten in the next upgrade?
>
It depends on what you are changing. We try to make it so that you
don't have to touch the class files. If you do have something that
needs changing in them, it's better to extend them OOP style and use
addClassReplacement.
> Thanks for your comments.
>
> P.S. another request for the config.ini.php file is to include the value of
> the logo file name "new_logo.gif" within a variable. To me, it seems that
> file name is hardcoded into the html files and it's not intuitive why that
> file is used in slashHead.tpl as opposed to something like
> slashHead_logo.gif or something or rather.
>
Can't say that I agree with you here. The name could be better, but
being called from the header template seems the right place.
thanks,
Joe
>
> Josh Udall
> Botany Department
> Iowa State University
> Ames, IA 50011
> (515) 294-7098
>
>
>
-------------------------------------------------------
This SF.net email is sponsored by: ValueWeb:
Dedicated Hosting for just $79/mo with 500 GB of bandwidth!
No other company gives more support or power for your dedicated server
http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/