Templateshift Plugin Version 0.6
Disclaimer : No warranties at all, use on your
own risk !
Requirements : The plugin loader must be installed and
working !
Usage I
- Always make a backup, before messing around with your
files !
- Goto to the language tab and add descriptions for your Templates.
- Hint: You can also add
images here. (<img src="default.png" alt="Default">)
- If you like to add the template change buttons in your template
add this:
<?=tplsh('templatename')?>
to your template at the place where you want the link. You
will recieve and 'unformatted' link, so you
can style it like you want.
- If you like to add the template change buttons in a content page
add this:
#CMSimple
$output.=tplsh('templatename');#
at the place where you want the link. You will recieve and
'unformatted' link, so you
can style it like you want.
- Repeat step 4 or 5 for all your the templatestyles you want to
provide.
Usage II
- If you like to add the template change selectbar in your template
add this:
<?=tplsh()?>
- If you like to add the template change selectbar in your content
page add this:
#CMSimple
$output.=tplsh();#
-
In the templates config menu you can enable or disable the sort function of the selectbox.
If you enable the sort function it will sort the entry's in alphabetical order on the basis of the description.
Usage III
- If you like to add the template change in the Menu
add this in the content of your site:
<h1>HEADER</h1>
<h2>TEMPLATE</h2>
#CMSimple
header('Location:?HEADER&tpl=TEMPLATE');#
<h2>TEMPLATE2</h2>
#CMSimple
header('Location:?HEADER&tpl=TEMPLATE2');#
with the menu level name as HEADER and the template name as TEMPLATE.
Cookies
- Because some people in the CMSimple forum ask for Cookie support I have added it.
Just add to all of your templates at the beginning (before the doctype statement!)
<? setcookie ("TplShCookie", $tpl, time()+60*60*24*30); ?>
(in this example the cookie will be valid for 30 days.)
Stylesheets
- There is a globel stylesheet which allows you to change the look of the selectbox.
But I recomment to comment the global stylesheet out and use that class in your
templates stylesheets instead.
So you can change the color, size, font etc. for every
template and don't have to use always the same style.
- You can also change the look of the current styles entry. The class 'current' allows
you to change the background color of this entry for example.