Simon Schneebeli | 1 Dec 20:02
Favicon

Re: Login / Cookies Problem

Meanwhile I managed to login again through another persons accounts (ouff).

- Deletion of all the cookies didn't help

- Deletion of the content of ecrire/data didn't help either.

Some additional information that might be useful:
- The problem is not linked to the browser or platform I'm working on. 
I've tried out from different systems and it's always the same.
- I don't think it's cookies related. I'm unable to login even with 
"Identification sans cookie".
- I've installed the spip-listes plugin (no idea if this is of any 
influence). 
- The problem appeared progressively on all the three computers I use. 
And on my standard computer, the problem appeared after having sent out 
a newsletter through spip-listes. I was however unable to reproduce 
this. Sending out a new newsletter didn't cause the same for my new user 
account.
- SPIP version 1.9.1; spip-listes version 1.9.b2 (the most recent one).

I have the impression, I'm not the only one who has this problem as one 
can read for example in:
- http://forum.spip.org/fr_185138.html
- http://lists.adullact.net/pipermail/agora-generale/2004-May/001162.html

Simon

Pierre Andrews wrote:
> Hello Simon,
>
(Continue reading)

Gilles Vincent | 2 Dec 10:43
Picon
Gravatar

Fwd: Login / Cookies Problem

Hi,
Do you use special (with accents for ex.) characters in your login or password ?
If you use the link to change your password, what happens then : can
you login again with your new password ?
I think that you've whecked that /ecrire/data is in 777 mod :-/
Would you agree to test if your problem still occurs with the
developpment version of SPIP ? You can download it here :
http://trac.rezo.net/files/spip/ (to check the version lock at
http://trac.rezo.net/files/spip/ref/spip/svn.revision)

.Gilles

PS.: agora corresponds to a very old (and modified) version of SPIP. So..

2006/12/1, Simon Schneebeli <simon.schneebeli@...>:
> Meanwhile I managed to login again through another persons accounts (ouff).
>
> - Deletion of all the cookies didn't help
>
> - Deletion of the content of ecrire/data didn't help either.
>
> Some additional information that might be useful:
> - The problem is not linked to the browser or platform I'm working on.
> I've tried out from different systems and it's always the same.
> - I don't think it's cookies related. I'm unable to login even with
> "Identification sans cookie".
> - I've installed the spip-listes plugin (no idea if this is of any
> influence).
> - The problem appeared progressively on all the three computers I use.
> And on my standard computer, the problem appeared after having sent out
(Continue reading)

Bart Braem | 3 Dec 21:38
Picon
Gravatar

Templates to display articles in pairs?

Hello,

I'm rewriting my site design and I am now looking for a way to display
articles in pairs. I need this because I want to display the articles in
pairs, like this:

<div class="leftarticle">
(article text etc.)
</div>
<div class="rightarticle">
(article2 text etc.)
</div>
<div class="leftarticle">
(article3 text etc.)
</div>
<div class="rightarticle">
(article4 text etc.)
</div>

How can I do that? 
I know how to get the first half of the articles and then the next half but
that's not what I need. 
I know how to get exactly two articles and then all other articles but
that's not what I need either.
I guess I could use recursion but I don't see how. Did anyone already do
this?

Regards,
Bart

(Continue reading)

Simon Schneebeli | 3 Dec 21:49
Favicon

Re: Templates to display articles in pairs?

Well, you can define a loop for every individual article, i.e. like this:

<BOUCLE_1(ARTICLES) {par date} {0,1}
<h3 class="titre"><a href="#URL_ARTICLE">[(#DATE|affdate)]: #TITRE</a></h3>
[<p class="soustitre">(#SOUSTITRE)</p>]
[<div class="texte">(#TEXTE)</div>]
<br class="nettoyeur" />
</BOUCLE_1>

<BOUCLE_2(ARTICLES) {par date} {1,1}
<h3 class="titre"><a href="#URL_ARTICLE">[(#DATE|affdate)]: #TITRE</a></h3>
[<p class="soustitre">(#SOUSTITRE)</p>]
[<div class="texte">(#TEXTE)</div>]
<br class="nettoyeur" />
</BOUCLE_2>

<BOUCLE_3(ARTICLES) {par date} {2,1}
<h3 class="titre"><a href="#URL_ARTICLE">[(#DATE|affdate)]: #TITRE</a></h3>
[<p class="soustitre">(#SOUSTITRE)</p>]
[<div class="texte">(#TEXTE)</div>]
<br class="nettoyeur" />
</BOUCLE_3>

<BOUCLE_1(ARTICLES) {par date} {3,1}
<h3 class="titre"><a href="#URL_ARTICLE">[(#DATE|affdate)]: #TITRE</a></h3>
[<p class="soustitre">(#SOUSTITRE)</p>]
[<div class="texte">(#TEXTE)</div>]
<br class="nettoyeur" />
</BOUCLE_4>

(Continue reading)

Gilles Vincent | 3 Dec 22:11
Picon
Gravatar

Re: Templates to display articles in pairs?

I imagine that you want to display two columns :
In that case the better solution is simply to use CSS and floating div :

.block { width:49%; float:left; }
.nettoyeur { clear:left; }

and then simply loop other articles :
<BOUCLE_1(ARTICLES) {par date} >
<div class="block">
<h3 class="titre"><a href="#URL_ARTICLE">[(#DATE|affdate)]: #TITRE</a></h3>
[<p class="soustitre">(#SOUSTITRE)</p>]
[<div class="texte">(#TEXTE)</div>]
</div>
[(#COMPTEUR_BOUCLE|modulo{2}|?{'','<br class="nettoyeur" />'}]
</BOUCLE_1>

Hope it helps,

.Gilles
---
2006/12/3, Bart Braem <bart.braem@...>:
> Hello,
>
> I'm rewriting my site design and I am now looking for a way to display
> articles in pairs. I need this because I want to display the articles in
> pairs, like this:
>
> <div class="leftarticle">
> (article text etc.)
> </div>
(Continue reading)

Gilles Vincent | 3 Dec 22:22
Picon
Gravatar

Re: Templates to display articles in pairs?

Hi Simon,

with your solution, we must know the number of articles we want to show.

A more generic solution is possible by using a recursion + doublons + modulo :

<BOUCLE_1(ARTICLES) {par date} {0,2}{doublons}>
   <div class="[(#COMPTEUR_BOUCLE|modulo{2}|?{'rightarticle','leftarticle'}]">
   <h3 class="titre"><a href="#URL_ARTICLE">[(#DATE|affdate)]: #TITRE</a></h3>
   [<p class="soustitre">(#SOUSTITRE)</p>]
   [<div class="texte">(#TEXTE)</div>]
   </div>
</BOUCLE_1>
   <BOUCLE_recursive(BOUCLE_1)> </BOUCLE_recursive>
</B_1>

I think it should work.

.Gilles
----
2006/12/3, Simon Schneebeli <simon.schneebeli@...>:
> Well, you can define a loop for every individual article, i.e. like this:
>
>
> <BOUCLE_1(ARTICLES) {par date} {0,1}
> <h3 class="titre"><a href="#URL_ARTICLE">[(#DATE|affdate)]: #TITRE</a></h3>
> [<p class="soustitre">(#SOUSTITRE)</p>]
> [<div class="texte">(#TEXTE)</div>]
> <br class="nettoyeur" />
> </BOUCLE_1>
(Continue reading)

Pierre Andrews | 4 Dec 13:13
Picon
Favicon
Gravatar

Re: Templates to display articles in pairs?


Bart Braem wrote:
> Hello,
> 
> I'm rewriting my site design and I am now looking for a way to display
> articles in pairs. I need this because I want to display the articles in
> pairs, like this:
> 
> <div class="leftarticle">
> (article text etc.)
> </div>
> <div class="rightarticle">
> (article2 text etc.)
> </div>
> <div class="leftarticle">
> (article3 text etc.)
> </div>
> <div class="rightarticle">
> (article4 text etc.)
> </div>

You can use the recursive loop or the other css+br as proposed solution 
by Gilles, but just for the idea, here is a third solution:

<BOUCLE_art(ARTICLES)>
<div class="[(#COMPTEUR_BOUCLE|alterner{"leftarticle","rightarticle"})]">
....
</div>
</BOUCLE_art>

(Continue reading)

Bart Braem | 4 Dec 13:14
Picon
Gravatar

Re: Templates to display articles in pairs?

Bart Braem wrote:

> I'm rewriting my site design and I am now looking for a way to display
> articles in pairs. I need this because I want to display the articles in
> pairs,

I managed to take care of it with the alternating loops, I'll show the code
when it's finished.
Time for another question:
Do you know how I can filter out articles longer than let's say 4000
characters? I tried this but it did not work:
<BOUCLE_articles_large(ARTICLES){id_rubrique}{par titre}{inverse}{doublons
groot}>{#TEXTE|strlen>4000}
If that's not possible showing the 5 largest articles would be useful too,
but then somehow I should get access to #TEXTE as a criterion.

Thanks for your help!
Bart

Pierre Andrews | 4 Dec 13:48
Picon
Favicon
Gravatar

Re: Templates to display articles in pairs?


Bart Braem wrote:
> Bart Braem wrote:
> 
>> I'm rewriting my site design and I am now looking for a way to display
>> articles in pairs. I need this because I want to display the articles in
>> pairs,
> 
> I managed to take care of it with the alternating loops, I'll show the code
> when it's finished.
> Time for another question:
> Do you know how I can filter out articles longer than let's say 4000
> characters? I tried this but it did not work:
> <BOUCLE_articles_large(ARTICLES){id_rubrique}{par titre}{inverse}{doublons
> groot}>{#TEXTE|strlen>4000}

Ok, to do it this way, you would need to do:
[(#TEXTE|strlen|>{4000}|?{#TEXTE,''})]

you apply strlen to the TEXTE, then test if it's more that 4000 then if 
true show TEXTE, else show nothing ('').

The problem is that you will have to go through all of your articles to 
find the right one as this is not a criterion of the loop but just a 
display test. Thus it's really not very good for the performance.

> If that's not possible showing the 5 largest articles would be useful too,
> but then somehow I should get access to #TEXTE as a criterion.

There is a cleaner way to do it, accessing texte as a criterion, but 
(Continue reading)

Gilles Vincent | 4 Dec 14:51
Picon
Gravatar

Re: Templates to display articles in pairs?

The simplest is the best !
I'm a real newbie when I have to build simple loops ;)
^^

2006/12/4, Pierre Andrews <mortimer.pa@...>:
> You can use the recursive loop or the other css+br as proposed solution
> by Gilles, but just for the idea, here is a third solution:
>
> <BOUCLE_art(ARTICLES)>
> <div class="[(#COMPTEUR_BOUCLE|alterner{"leftarticle","rightarticle"})]">
> ....
> </div>
> </BOUCLE_art>
>

Gmane