SPIP-Contrib

SPIP-Contrib

عربي | Deutsch | English | Español | français | italiano

251 Plugins, 182 contribs On SPIP-Zone, 147 visitors now

Home page > Templates > Tools for Templates > SKtheme > Plugin : Sktheme

Plugin : Sktheme

Theme manager for spip 1.9.2

21 December 2006 – by skedus – commentaires

All the versions of this article: [English] [français]

0 vote

-  Plugin Name : sktheme
-  Version : 0.6 (1.0 simple version http://skedus.free.fr/spip/spip.php...)
-  Author : Team work on SPIP-Zone
-  Licence : GPL
-  SPIP Compatibility : SPIP 1.9 and 1.9.1
-  Site example : Skedus Land
-  Main features :

  • Manage theme directories for squelette (bone) and css distribution
  • Public space theme switcher

Installation

-  First you need to get a .zip distribution, either here below or on spip-zone for a more recent version
-  Unzip the file sktheme-0.6-plugin.zip (which will give you a sktheme directory)
-  Upload this directory sktheme (and its content ;-) ) in the plugin directory to your SPIP site root (you should create this plugin directory if necessary)
-  In the menu Configuration->Manage plugins of the private area, select the Sktheme plugin to activate it.

You are now ready to configure the plugin: use Configuration->Manage themes in the private area.

PNG - 18.9 kb
  1. Choose a squelette distribution (at the beginning you don’t really have any choice because only the official distribution dist is available, but don’t worry: you will be able to add some others).
  2. As soon as you select a squelette distribution the habillage (meaning the color, look, css) list will be updated with the available options. (Once again, at first not a lot of choice, only dist but we will see later how to add some others.)
PNG - 19 kb

For those who want to go quick, quick, quick!

Sometime a demo is better than a boring explanation, and you can test the themes directory example by doing this:

  1. Download the file sktheme-0.6-themes.zip
  2. Unzip the file (which gives you a themes directory)
  3. Upload this directory to your SPIP root directory
  4. Go back to the private area and navigate to Configuration->Manage theme
PNG - 23.5 kb
  1. Select a new habillage (these habillage (css) styles are based on the official squelette (template) distribution)
  2. Validate

Your public space has changed! Magic, isn’t it ?

Principle

Let’s see how it works — it is quite simple :
-  The idea is to use the SPIP search directory mechanism.
-  Define a theme as squelettes (template) + a habillage (css)

The search order will be then:

  1. habillage directory (one directory per habillage) [1]
  2. squelette (one directory per squelette distribution) [2]
  3. squelettes directory (if you have one)
  4. dist directory (Official squelette directory of SPIP)

Sktheme allows you to choose the location for the first two (see the plugin configuration page in the private area). themes is the default value for both.

PNG - 13.9 kb

Note: you can choose to have 2 different locations or not, it’s up to you.

Tips:

It is possible to put a template (squelette) such sommaire.html in the habillage directory. Then not only the look but also the page structure will change when you switch from one habillage to another. Well this is not what sktheme is supposed to handle but it works: SPIP is so good ;-)

To distinguish between squelettes directory and habillage directory, Sktheme is using a file call theme.xml [3]. This file needs to exist in each directory and allows sktheme to keep up-to-date the list of available habillages and squelettes in the private area.

The switcher

On Spip-zone you can find many useful things, that is nothing new :-), I found a nice plugin call switcher written by Fil which allows you to have several template directories and to switch from one to another (mainly to test and check templates). Modifying this plugin to handle the two extra directories, we can add a theme switcher to sktheme. Thanks to Fil then, sktheme has its own switcher.

WATCH OUT As the sktheme switcher is based on the same principle as Fil’s switcher, you cannot use both. So if you want to use sktheme, please disactivate the switcher plugin first.

The sktheme switcher is activated in the configuration page. You can chose to activate it for administrator or for everyone as you want.

PNG - 10.5 kb

As soon as the switcher is activated, a new menu is available at the top of your public area.

PNG - 9.6 kb
PNG - 41.1 kb

Balise

Skteme comes with a new tag that you can introduce in your bones.

-  #SKTHEME_HABILLAGES_SWITCHER: this tag include a new menu for switching from one habillage to another. Then your users can choose.

PNG - 2.2 kb
PNG - 32.8 kb

Themes creation

-  build your templates as usual.
-  place the result in a directory
-  then create a theme.xml file for sktheme

It is easier to take a look at the example in the zip below.

I hope that this plugin will be useful to you.

WATCH OUT:

In order to simplify Sktheme usage a new version is available on : http://skedus.free.fr/spip/spip.php...

This version only modify the habillage.css file but add some colors to your SPIP distribution, Well just enough to start fast and to want more ;-)

Footnotes

[1] a habillage directory is located in the habillage directory defined in the sktheme configuration page

[2] a squelette directory is located in the squelette directory defined in the sktheme configuration page

[3] This file is described in the online documentation of the sktheme plugin

Back to top

Vos commentaires

  • Le 5 April 2009 à 13:01, by ?

    Turkish version of Do?


    TopList - Sohbet

    Reply to this message

  • Le 27 March 2009 à 23:27, by skedus

    WATCH OUT:

    In order to simplify Sktheme usage a new version is available
    on : http://skedus.free.fr/spip/spip.php...

    This version only modify the habillage.css file but add some colors to your SPIP distribution, Well just enough to start fast and to want more ;-)

    Reply to this message

  • Le 25 February 2009 à 05:36, by www.zape4at.com

    Aga, tak tochno :)

    Reply to this message

  • Le 30 April 2008 à 14:46, by ilya

    Someone know how look this plugin in russian version?
    ilya

    Reply to this message

  • Le 15 November 2007 à 20:12, by confused

    hello,

    Where are the links to files:

    sktheme-0.6-plugin.zip & sktheme-0.6-themes.zip?

    I can’t seem to find them, and they are not on this page. Any help would be greatly appreciated. Thank you.

    • Le 20 February 2008 à 14:00, by erik

      i second this!

      very VERY frustating :D

    • Le 20 February 2008 à 18:31, by Mat

      At the end of the french version ;-)

    Reply to this message

Reply to this article

Who are you? (optional)
  • [Sign In]

Pour afficher votre trombine avec votre message, enregistrez-la d'abord sur gravatar.com (gratuit et indolore) et n'oubliez pas d'indiquer votre adresse e-mail ici.

Ajoutez votre commentaire ici
  • Ce formulaire accepte les raccourcis SPIP et le code HTML. Pour créer des paragraphes, laissez simplement des lignes vides.

Add a document

Back to top

Here they're talking

  • (fr) SPIP-Listes

    30 novembre 2006 – 745 commentaires

    SPIP-listes permet la gestion et l’envoi de lettres d’information (newsletters) au moyen d’un courriel au format html ou texte. Il est possible d’envoyer des messages aux abonnés qui se sont formellement inscrits à une ou plusieurs lettres (...)

  • (fr) Galerie SPIP + PHP, simple et prête à l’emploi

    20 janvier 2006 – commentaires

    Voici donc le principe, faire une galerie d’image "très classique", comme celle-ci. Je voulais que les liens de navigation ne restent pas actifs quand il n’y avait plus rien à voir, afficher une image dans sa taille normale, et permettre de choisir (...)

  • (fr) Menu - portes coulissantes -

    28 février 2005 – commentaires

    Un menu efficace et joli en CSS, c’est possible grâce à la méthode des portes coulissantes. Un vrai cas d’école. Passionnant pour qui souhaite découvrir les CSS tout en enjolivant son SPIP.

  • (fr) Plugin Thélia

    26 juin 2007 – 526 commentaires

    Une approche basée sur l’utilisation conjointe des deux logiciels SPIP et Thélia pour la réalisation de sites de publication et de vente en ligne

  • (fr) Essayez SPIP 2.1-RC

    19 mars – 12 commentaires

    La version Release Candidate de SPIP est sortie de la forge.