Can i use the private part of SPIP for Peer-reviewing

Dear Sir,

I want know if i can configure SPIP in such a way that it could be used to peer-review articles before publication.

I have been trying to configure SPIP such that, the Admin would be the only one who has access to articles 'submitted for evaluation'. He would then allow access two or more selected editors (reviewers) to comment on an article without seeing the name of the author.

The Admin should be the only one with access to a reviewer's comment.
the Admin would then publish an article online.

I would like to know if i could use SPIP's forums for this. IF so, could you  direct me to as to how to go about it.

Thank You.

Picon

Problem? mysql from 4.0 to 4.1

My spip is 1.8b2 and it rocks on mysql 4.0 thats on my ( remote)  
server, but now they upgrade to 4.1..
will it affect my spip??
kindly
Tom
Gilles Vincent | 9 Jan 00:19
Picon
Gravatar

Re: Problem? mysql from 4.0 to 4.1

No

2007/1/8, tom@... <tom@...>:
> My spip is 1.8b2 and it rocks on mysql 4.0 thats on my ( remote)
> server, but now they upgrade to 4.1..
> will it affect my spip??
> kindly
> Tom
> _______________________________________________
> spip-en@... - http://listes.rezo.net/mailman/listinfo/spip-en
>
Pierre Andrews | 10 Jan 12:38
Picon
Favicon
Gravatar

Re: Can i use the private part of SPIP for Peer-reviewing


Kwame Yeboah - Gyan wrote:
> Dear Sir,
> 
> I want know if i can configure SPIP in such a way that it could be used to
> peer-review articles before publication.
> 
> I have been trying to configure SPIP such that, the Admin would be the only
> one who has access to articles 'submitted for evaluation'. He would then
> allow access two or more selected editors (reviewers) to comment on an
> article without seeing the name of the author.
> 
> The Admin should be the only one with access to a reviewer's comment.
> the Admin would then publish an article online.
> 
> I would like to know if i could use SPIP's forums for this. IF so, could
> you  direct me to as to how to go about it.

Hello,

I think you are on the right trail: there is no way to do that directly 
from the private area, but you could use forums to do that.

You could do something like that:
1- limit forums to authenticated visitors (that's an option in the 
management of the forums, see in the configuration panels). This way, 
only registered visitors (i.e. the reviewers) could comment on the articles
2- as the reviewers are only logged as visitors, they have no access to 
the private area and can't see all the article. What you do then is make 
a template that displays the article to the logged visitors,
3- the template only shows the article to the selected reviewers, 
without displaying the authors name and provides a comment box but 
doesn't list the other forum messages.

There is probably multiple ways to implement that. You should probably 
read the introductory documentation on templates in SPIP: 
http://www.spip.net/en_rubrique199.html
so you can understand a bit more about what i'll explain here.

So to implement that, you should first configure spip correctly:
1- limit the forums to registered visitors and create (or let them do) a 
visitor account per reviewer.
2- create a keyword group called "reviewers" with one keyword by 
reviewer, putting in the description field the id of the reviewer.
3- install the #SESSION plugin:
http://spip-zone.info/spip.php?page=session
this will allow you to control who is connected.

Now you should create a template for the review. This is the basic code 
to put in a review.html file in your "squelettes" directory.

#CACHE{0}
<BOUCLE_art(ARTICLES) {statut=prop} {id_article}>
<BOUCLE_check_review(MOTS){id_article}{type=reviewers} 
{descriptif=#SESSION{id_auteur}}>
</BOUCLE_check_review>
<h1>#_art:TITRE</h1>
#_art:TEXTE
<hr>
<h2>Your Review:</h2>
#FORMULAIRE_FORUM
</B_check_review>
YOU CAN ACCESS THIS PAGE, you might want to login #LOGIN_PUBLIC
<//B_check_review>
</BOUCLE_art>

Then, when an article is proposed, then you'll:
a) add the reviewer's keyword to the article
b) send a link to each reviewer:
yoursite.co/?page=review&id_article=XX
where XX is the id of the article.

Here is how it works:
- The _art loop only display the article selected in the url and check 
that it has a proposed status
- the _check_review loop checks if that article has a keyword in the 
group "reviewer" with the description field equals to the logged user id
   - if this is true, then we display the title and text of the article 
with a forum form
   - else we display a message and a login form.

I haven't tested that but I hope it works.

There is however a limitation: the authors that want to write an article 
need a login to the private area. Therefore, they will see the proposed 
articles and who has submited them. Hence the reviewers shouldn't be 
authors...
There is a plugin I think, that allows you to put a form for writting 
articles in the public area, so the authors have no need to go to the 
private area, but I have never used it, so I can't comment on that.

Good luck,

Pierre

Marko Pekic | 17 Jan 14:55
Picon

#SET and #GET

Hello,

how can I use #SET to set a PHP variable which already exists?

<?php
	$variable = "some text";
?>

#SET{something,$variable}
or
#SET{something,<?=$variable;?>}
or
<?="#SET{something,".$variable."}"?>

doesn't work!

Marko
Gilles Vincent | 17 Jan 16:43
Picon
Gravatar

Re: #SET and #GET

2007/1/17, Marko Pekic <marko.pekic@...>:
> Hello,
>
> how can I use #SET to set a PHP variable which already exists?
>

yes you can

use #EVAL for this.
#EVAL{expression} corresponds to "return expression" without anything
else, so use it with precaution !

For exemple, to avoid XSS, you should use
#SET{something, #EVAL{'intval($variable)'}} and #GET{something}

Note that #SET / #GET aren't really necessary here ...

documentation can be found here : http://doc.spip.org/ <at> balise_EVAL_dist

.Gilles
----

> <?php
>         $variable = "some text";
> ?>
>
> #SET{something,$variable}
> or
> #SET{something,<?=$variable;?>}
> or
> <?="#SET{something,".$variable."}"?>
>
> doesn't work!
>
> Marko
> _______________________________________________
> spip-en@... - http://listes.rezo.net/mailman/listinfo/spip-en
>
Marko Pekic | 17 Jan 20:50
Picon

Re: #SET and #GET

On Wednesday 17 January 2007 16:43, Gilles Vincent wrote:
> 2007/1/17, Marko Pekic <marko.pekic@...>:
> > Hello,
> >
> > how can I use #SET to set a PHP variable which already exists?
>
> yes you can
>
> use #EVAL for this.
> #EVAL{expression} corresponds to "return expression" without anything
> else, so use it with precaution !
>
> For exemple, to avoid XSS, you should use
> #SET{something, #EVAL{'intval($variable)'}} and #GET{something}

I have:

----
<?php
	$string = "some text";
?>

#SET{something,#EVAL{$string}}
first line: #GET{something}
<?="<br>second line: ".$string;?>
----

and the output is:

first line:
second line: some text

Why don't I have anything in the first line?

If I enter the content of the string directly (#EVAL{"some text"}), it is 
displayed.

Marko
Gilles Vincent | 17 Jan 23:27
Picon
Gravatar

Re: #SET and #GET

Oops' sorry.

I've realised that I said a stupid thing : it's definitly impossible
in that way.
(just add &var_mode=debug to your url to be convinced about it)

However you can do something like this :
add in mes_options.php this line
define('MY_VARIABLE','this is a string')

and use it into your template like this :  #EVAL{MY_VARIABLE}

In fact all this is logical :
when the cached page is calculated, you don't know anything about
$variable (but you know the value of MY_VARIABLE).
We can considere that the cache file is pre-compiled : with dynamic
non-cacheable datas like '$variable' are interpreted at the last part
of the process, when the huge cache file is interpreted by an eval()
-- note that this is also the case of anything that comes from
mes_fonctions.php

But where does $variable comme from ?
from another program or from a post (then #ENV is ok) ?
Maybe there is a contrib that already does what you want to do (for
ex. #SESSION)..

Sorry for my mistake,
hope it helps,

.Gilles
--
2007/1/17, Marko Pekic <marko.pekic@...>:
> On Wednesday 17 January 2007 16:43, Gilles Vincent wrote:
> > 2007/1/17, Marko Pekic <marko.pekic@...>:
> > > Hello,
> > >
> > > how can I use #SET to set a PHP variable which already exists?
> >
> > yes you can
> >
> > use #EVAL for this.
> > #EVAL{expression} corresponds to "return expression" without anything
> > else, so use it with precaution !
> >
> > For exemple, to avoid XSS, you should use
> > #SET{something, #EVAL{'intval($variable)'}} and #GET{something}
>
> I have:
>
> ----
> <?php
>         $string = "some text";
> ?>
>
> #SET{something,#EVAL{$string}}
> first line: #GET{something}
> <?="<br>second line: ".$string;?>
> ----
>
> and the output is:
>
> first line:
> second line: some text
>
> Why don't I have anything in the first line?
>
> If I enter the content of the string directly (#EVAL{"some text"}), it is
> displayed.
>
> Marko
> _______________________________________________
> spip-en@... - http://listes.rezo.net/mailman/listinfo/spip-en
>
Marko Pekic | 17 Jan 23:39
Picon

Re: #SET and #GET

On Wednesday 17 January 2007 23:27, you wrote:
> Maybe there is a contrib that already does what you want to do (for
> ex. #SESSION)..

Well, the thing I want to do is to select all articles in some sections, but I 
don't want preselected sections like {id_rubrique IN 17,28,56}.
I select needed sections by a parent loop
<BOUCLE_sections (RUBRIQUES) {titre="Title"}>

and I want to select ALL articles which are contained in (sub)sections 
named "Title", so I need to dinamically change {id_rubrique IN .......} and I 
thought the possibility was to use
<BOUCLE_articles (ARTICLES) {id_rubrique IN #GET{something}}>, 
where "something" contains a string (for example) "17,28,56".

Is there another way to do it?

Marko
Gilles Vincent | 18 Jan 11:07
Picon
Gravatar

Re: #SET and #GET

2007/1/17, Marko Pekic <marko.pekic@...>:
> Well, the thing I want to do is to select all articles in some sections, but I
> don't want preselected sections like {id_rubrique IN 17,28,56}.
> I select needed sections by a parent loop
> <BOUCLE_sections (RUBRIQUES) {titre="Title"}>
>
> and I want to select ALL articles which are contained in (sub)sections
> named "Title", so I need to dinamically change {id_rubrique IN .......} and I
> thought the possibility was to use
> <BOUCLE_articles (ARTICLES) {id_rubrique IN #GET{something}}>,
> where "something" contains a string (for example) "17,28,56".
>

Of course it's possible to do this inthis way :
<BOUCLE_sections (RUBRIQUES) {titre="Title"}>
<BOUCLE_articles (ARTICLES) {id_rubrique IN #GET{something}}>
</BOUCLE_articles>
</BOUCLE_sections>

However, this presents several disadvantages, especially if you want
to order you articles.
So you have to do a join between the table spip_articles and spip_rubriques.

In this case, this is simply
<BOUCLE_articles (ARTICLES) {titre_rubrique="Title"}>
</BOUCLE_articles>

.Gilles

> Is there another way to do it?
>
> Marko
> _______________________________________________
> spip-en@... - http://listes.rezo.net/mailman/listinfo/spip-en
>

Gmane