2 squelettes

Hi!

I'm developping a new layout to a site. How can I see it on line but
not replacing the actual version until the new one is ready? In other
words, can I have 2 squelettes at the same time? Maybe I can install a
new spip that points to the same database?

Thank you!
tereza

Hi,

a simple method I used was to switch the template according to the user IP :

<?php
if ($_SERVER['REMOTE_ADDR'] == 'your_ip_adress') $dossier_squelette = 'v2';
?>

by default Spip seach for your template inside '/squelettes:/plugins:/:/dist'
(and it takes the first template which was found in this chain of directories)
$dossier_squelette simply adds an element to this list
(note that you can also use in this variable a list of directories)

.Gilles

2007/8/29, Tereza Loparic <telopa@gmail.com>:

Hi!

I'm developping a new layout to a site. How can I see it on line but
not replacing the actual version until the new one is ready? In other
words, can I have 2 squelettes at the same time? Maybe I can install a
new spip that points to the same database?

Thank you!
tereza
_______________________________________________
spip-en@rezo.net - http://listes.rezo.net/mailman/listinfo/spip-en

Hi Gilles,

Thanks again for this tip but I have a last question : Where do you write
This ? Directly in your html templates files or in your mes_fonctions.php
???

Thanks
E.

--

On Wed, August 29, 2007 10:45 pm, Gilles Vincent wrote:

Hi,

a simple method I used was to switch the template according to the user IP
:

<?php
if ($_SERVER['REMOTE_ADDR'] == 'your_ip_adress') $dossier_squelette =
'v2';
?>

by default Spip seach for your template inside
'/squelettes:/plugins:/:/dist'
(and it takes the first template which was found in this chain of
directories)
$dossier_squelette simply adds an element to this list
(note that you can also use in this variable a list of directories)

.Gilles

2007/8/29, Tereza Loparic <telopa@gmail.com>:

Hi!

I'm developping a new layout to a site. How can I see it on line but
not replacing the actual version until the new one is ready? In other
words, can I have 2 squelettes at the same time? Maybe I can install a
new spip that points to the same database?

Thank you!
tereza
_______________________________________________
spip-en@rezo.net - http://listes.rezo.net/mailman/listinfo/spip-en

_______________________________________________
spip-en@rezo.net - http://listes.rezo.net/mailman/listinfo/spip-en

In mes_fonctions.php

mes_fonctions is called each time a cache file will be caculated (and
returned after to the browser)
mes_options.php (in ecrire/ or config/) is called at each hit and
overwrites some php values which are still in your cache file
(basically these variables are in ecrire/inc_version.php)

.Gilles
---
2007/8/30, L'oiseau2nuit (ex- Zzz.) <loiseau2nuit@no-log.org>:

Hi Gilles,

Thanks again for this tip but I have a last question : Where do you write
This ? Directly in your html templates files or in your mes_fonctions.php
???

Thanks
E.

--
http://www.loiseau2nuit.net

On Wed, August 29, 2007 10:45 pm, Gilles Vincent wrote:
> Hi,
>
> a simple method I used was to switch the template according to the user IP
> :
>
> <?php
> if ($_SERVER['REMOTE_ADDR'] == 'your_ip_adress') $dossier_squelette =
> 'v2';
> ?>
>
> by default Spip seach for your template inside
> '/squelettes:/plugins:/:/dist'
> (and it takes the first template which was found in this chain of
> directories)
> $dossier_squelette simply adds an element to this list
> (note that you can also use in this variable a list of directories)
>
> .Gilles
>
> 2007/8/29, Tereza Loparic <telopa@gmail.com>:
>> Hi!
>>
>>
>> I'm developping a new layout to a site. How can I see it on line but
>> not replacing the actual version until the new one is ready? In other
>> words, can I have 2 squelettes at the same time? Maybe I can install a
>> new spip that points to the same database?
>>
>> Thank you!
>> tereza
>> _______________________________________________
>> spip-en@rezo.net - http://listes.rezo.net/mailman/listinfo/spip-en
>>
> _______________________________________________
> spip-en@rezo.net - http://listes.rezo.net/mailman/listinfo/spip-en
>

Thanks, Once again :slight_smile:

E.

On Thu, August 30, 2007 8:28 am, Gilles Vincent wrote:

In mes_fonctions.php

mes_fonctions is called each time a cache file will be caculated (and
returned after to the browser)
mes_options.php (in ecrire/ or config/) is called at each hit and
overwrites some php values which are still in your cache file
(basically these variables are in ecrire/inc_version.php)

.Gilles
---
2007/8/30, L'oiseau2nuit (ex- Zzz.) <loiseau2nuit@no-log.org>:

Hi Gilles,

Thanks again for this tip but I have a last question : Where do you
write
This ? Directly in your html templates files or in your
mes_fonctions.php
???

Thanks
E.

--
http://www.loiseau2nuit.net

On Wed, August 29, 2007 10:45 pm, Gilles Vincent wrote:
> Hi,
>
> a simple method I used was to switch the template according to the
user IP
> :
>
> <?php
> if ($_SERVER['REMOTE_ADDR'] == 'your_ip_adress') $dossier_squelette =
> 'v2';
> ?>
>
> by default Spip seach for your template inside
> '/squelettes:/plugins:/:/dist'
> (and it takes the first template which was found in this chain of
> directories)
> $dossier_squelette simply adds an element to this list
> (note that you can also use in this variable a list of directories)
>
> .Gilles
>
> 2007/8/29, Tereza Loparic <telopa@gmail.com>:
>> Hi!
>>
>>
>> I'm developping a new layout to a site. How can I see it on line but
>> not replacing the actual version until the new one is ready? In other
>> words, can I have 2 squelettes at the same time? Maybe I can install
a
>> new spip that points to the same database?
>>
>> Thank you!
>> tereza
>> _______________________________________________
>> spip-en@rezo.net - http://listes.rezo.net/mailman/listinfo/spip-en
>>
> _______________________________________________
> spip-en@rezo.net - http://listes.rezo.net/mailman/listinfo/spip-en
>