The mystery with search in SPIP
Hi Serge, I'm pretty sure it comes from this line in inc/recherche : $recherche = trim(translitteration($recherche)); which converts the request into ascii… most useful to remove accentuated characters, but probably a killer for cyrillic as your content is not in ascii do you work with the fulltext plugin or with the "native" spip search? On Thu, Dec 1, 2011 at 2:26 PM, Serge Markitanenko <serge.markitanenko@...> wrote: > Greeting, > > as we work in Ukraine for Ukraine & Russian market. Most of our websites are > in cyrillic. > And there is a mystery with search result in Russian language. > Search works perfectly in private space, but totally could not found > anything if we submit > the search form via public interface. Of course the search string should be > typed in cyrillic. > The search works well in 1.9.xx branch, but doen't in 2.x.x. > And the same with SPIP 3 beta. I did bug report year or two ago. > We did own search module for public part of the site for our needs. > But what could be the source of the mystery? Is any idea or solution? > Best regards, > Serge > _______________________________________________ > spip-en@... - http://listes.rezo.net/mailman/listinfo/spip-en > > -- -- Fil
Hello to all!
I was trying to overcome this problem.
I'm pretty sure it comes from this line in inc/recherche :
$recherche = trim(translitteration($recherche));
which converts the request into ascii… most useful to remove
accentuated characters, but probably a killer for cyrillic as your
content is not in ascii
Dear SPIP team, today, I used SPIP for the first time. As a diligent user, one of the first things I did was to change my password. I noted that if my password contains an umlaut (e.g. ü, u with trema), the password is not changed and a blank page is displayed instead. I would expect instead that my password is changed, and some confirmation displayed. Non-ASCII characters in passwords should provide no problem, especially for an application that makes internationalization a priority. A second issue is that I haven't find a way to post a proper bug report on your website; hence the message to the mailing list. Best, Jonas
Le 13/12/11 00:16, Jonas Wagner a écrit : > Non-ASCII > characters in passwords should provide no problem, especially for an > application that makes internationalization a priority. all is fine for me with 'totoü' as pasword on SPIP 2.1.12 > A second issue is that I haven't find a way to post a proper bug report > on your website; hence the message to the mailing list. yes. not easy to find it : http://core.spip.org/account/register
Greeting, the most simple way - break the articles by yourself using models + writing the JQuery script. You could contact me after 03/01/2012 and I will try to help you. Second way - the spip site http://www.spipmedia.net have the same article break as you wish. You could learn their source code by yourself - just view the source of http://www.spipmedia.net/squelettes/sommaire.html http://www.spipmedia.net/squelettes/article.html Best regards, Serge Markitanenko http://www.voltairestudio.com 2011/12/25 kamran Mir Hazar <kamran_mirhazar@...>: > Hello, > Is there any plugin to break an article in more than one page without > creating several articles? > Here is an example: > http://www.nytimes.com/2011/12/25/business/bourbons-all-american-roar.html?ref=global-home > Thanks > Kamran > > > _______________________________________________ > spip-en@... - http://listes.rezo.net/mailman/listinfo/spip-en >
Hi,
the filter used in spipmedia reminds me this old contribution :
http://www.spip-contrib.net/Decouper-un-article-en-plusieurs
it creates a filter that can be used like this
<BOUCLE_(ARTICLES){id_article}>
[(#TEXTE*|decouper_en_page{#ID_ARTICLE}|propre)]
</BOUCLE_>
And the next/prev uri are generated like standard article pages.
I've just tested it on SPIP 2.1.12
Here is a copy more or less translated of the filter that you must add to mes_fonctions.php :
source : http://www.spip-contrib.net/Decouper-un-article-en-plusieurs
/*
* +----------------------------------+
* Nom du Filtre : decouper_en_page
* +----------------------------------+
* Date : Vendredi 6 juin 2003
* Auteur : "gpl" : gpl-6SQNBOJVynlAfugRpC6u6w@public.gmane.org
* Aurelien PIERARD : aurelien.pierard-A05WjiLMj4L1KXRcyAk9cg@public.gmane.orger-ministre.gouv.fr
* +-------------------------------------+
* Fonctions de ce filtre :
* Il sert a presenter un article sur plusieurs pages
* +-------------------------------------+
*
* Pour toute suggestion, remarque, proposition d'ajout
* reportez-vous au forum de l'article :
* http://www.uzine.net/spip_contrib/article.php3?id_article=62
*/
function decouper_en_page($text,$id_article) {
$nextart = $_GET['artsuite'];
if (empty($nextart)) $nextart = 0;
// page split (separator : "-----")
$page = split('-----', $text);
// Total pages number
$num_pages = count($page);
// If only one page, or at the result of a seach, return everything.
if ($num_pages == 1 || !empty($var_recherche) || $nextart < 0 || $nextart > $num_pages) {
// Add anchors to <h3>
$text = preg_replace("|\{\{\{(.*)\}\}\}|U","<a id=\"sommaire_#NB_TITRE_DE_MON_ARTICLE#\"></a>$0", $text);
$array = explode("#NB_TITRE_DE_MON_ARTICLE#" , $text);
$res =count($array);
$i =1;
$text=$array[0];
while($i<$res){
$text=$text.$i.$array[$i];
$i++;
}
return $text;
}
$p_prec = $nextart - 1;
$p_suiv = $nextart + 1;
$uri_art = generer_url_entite($id_article, "article");
$uri_art .= strpos($uri_art, '?') ? '&' : '?';
// Add anchors to <h3>
$page[$nextart] = preg_replace("|\{\{\{(.*)\}\}\}|U","<a id=\"sommaire_#NB_TITRE_DE_MON_ARTICLE#\"></a>$0", $page[$nextart]);
$array = explode("#NB_TITRE_DE_MON_ARTICLE#" , $page[$nextart]);
$res =count($array);
$i =1;
$page[$nextart]=$array[0];
while($i<$res){
$page[$nextart]=$page[$nextart].$i.$array[$i];
$i++;
}
// Pagination
switch (TRUE) {
case ($nextart == 0):
$previous = "";
$next = "<a href='" . $uri_art . "artsuite=" . $p_suiv . "'>>></a>";
break;
case ($nextart == ($num_pages-1)):
$previous = "<a href='" . $uri_art . "artsuite=" . $p_prec . "'><<</a>";
$next = "";
break;
default:
$previous = "<a href='" . $uri_art . "artsuite=" . $p_prec . "'><<</a>";
$next = "<a href='" . $uri_art . "artsuite=" . $p_suiv . "'>>></a>";
break;
}
for ($i = 0; $i < $num_pages; $i++) {
$j = $i;
if ($i == $nextart) {
$actual .= " <strong>" . ++$j . "</strong> ";
}
else {
$actual .= " <a href='" . $uri_art . "artsuite=$i'>" . ++$j . "</a> ";
}
}
// Here, you can customize
$result .= $page[$nextart];
$result .= "<div class='pagination' style='text-align:center'>pages : $previous $actual $next</div>";
return $result;
}
// FIN du Filtre decouper_en_page
Hope it helps,
.Gilles
---
Greeting,
the most simple way - break the articles by yourself using models +
writing the JQuery script.
You could contact me after 03/01/2012 and I will try to help you.
Second way - the spip site http://www.spipmedia.net have the same
article break as you wish.
You could learn their source code by yourself - just view the source of
http://www.spipmedia.net/squelettes/sommaire.html
http://www.spipmedia.net/squelettes/article.html
Best regards,
Serge Markitanenko
http://www.voltairestudio.com
2011/12/25 kamran Mir Hazar <kamran_mirhazar-/E1597aS9LQAvxtiuMwx3w@public.gmane.org>:> _______________________________________________> Hello,
> Is there any plugin to break an article in more than one page without
> creating several articles?
> Here is an example:
> http://www.nytimes.com/2011/12/25/business/bourbons-all-american-roar.html?ref=global-home
> Thanks
> Kamran
>
>
> spip-en-JM9gtpQu/Ho@public.gmane.org - http://listes.rezo.net/mailman/listinfo/spip-en
>
_______________________________________________
spip-en-JM9gtpQu/Ho@public.gmane.org - http://listes.rezo.net/mailman/listinfo/spip-en
Greeting,
the most simple way - break the articles by yourself using models +
writing the JQuery script.
You could contact me after 03/01/2012 and I will try to help you.
Second way - the spip site http://www.spipmedia.net have the same
article break as you wish.
You could learn their source code by yourself - just view the source of
http://www.spipmedia.net/squelettes/sommaire.html
http://www.spipmedia.net/squelettes/article.html
Best regards,
Serge Markitanenko
http://www.voltairestudio.com
2011/12/25 kamran Mir Hazar <kamran_mirhazar-/E1597aS9LQAvxtiuMwx3w@public.gmane.org>:> _______________________________________________> Hello,
> Is there any plugin to break an article in more than one page without
> creating several articles?
> Here is an example:
> http://www.nytimes.com/2011/12/25/business/bourbons-all-american-roar.html?ref=global-home
> Thanks
> Kamran
>
>
> spip-en-JM9gtpQu/Ho@public.gmane.org - http://listes.rezo.net/mailman/listinfo/spip-en
>
_______________________________________________
spip-en-JM9gtpQu/Ho@public.gmane.org - http://listes.rezo.net/mailman/listinfo/spip-en
Hi,
Thanks,I do not have file mes_fonctions.php in my SPIP. Shall I create it under squelettes directory?
Kamran
From: Gilles VINCENT <gilles.vincent-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: Serge Markitanenko <serge.markitanenko <at> gmail.com>
Cc: kamran Mir Hazar <kamran_mirhazar <at> yahoo.com>; spip-en <spip-en-JM9gtpQu/Ho@public.gmane.org>
Sent: Tuesday, December 27, 2011 12:05 PM
Subject: Re: [Spip-en] Article break in several pages
Hi,
the filter used in spipmedia reminds me this old contribution :
http://www.spip-contrib.net/Decouper-un-article-en-plusieurs
it creates a filter that can be used like this
<BOUCLE_(ARTICLES){id_article}>
[(#TEXTE*|decouper_en_page{#ID_ARTICLE}|propre)]
</BOUCLE_>
And the next/prev uri are generated like standard article pages.
I've just tested it on SPIP 2.1.12
Here is a copy more or less translated of the filter that you must add to mes_fonctions.php :
source : http://www.spip-contrib.net/Decouper-un-article-en-plusieurs
/*
* +----------------------------------+
* Nom du Filtre : decouper_en_page
* +----------------------------------+
* Date : Vendredi 6 juin 2003
* Auteur : "gpl" : gpl-6SQNBOJVynlAfugRpC6u6w@public.gmane.org
* Aurelien PIERARD : aurelien.pierard-A05WjiLMj4KqPVlgewlOEi/IejrXlDKSUNw490ZoPkc@public.gmane.org
* +-------------------------------------+
* Fonctions de ce filtre :
* Il sert a presenter un article sur plusieurs pages
* +-------------------------------------+
*
* Pour toute suggestion, remarque, proposition d'ajout
* reportez-vous au forum de l'article :
* http://www.uzine.net/spip_contrib/article.php3?id_article=62
*/
function decouper_en_page($text,$id_article) {
$nextart = $_GET['artsuite'];
if (empty($nextart)) $nextart = 0;
// page split (separator : "-----")
$page = split('-----', $text);
// Total pages number
$num_pages = count($page);
// If only one page, or at the result of a seach, return everything.
if ($num_pages == 1 || !empty($var_recherche) || $nextart < 0 || $nextart > $num_pages) {
// Add anchors to <h3>
$text = preg_replace("|\{\{\{(.*)\}\}\}|U","<a id=\"sommaire_#NB_TITRE_DE_MON_ARTICLE#\"></a>$0", $text);
$array = explode("#NB_TITRE_DE_MON_ARTICLE#" , $text);
$res =count($array);
$i =1;
$text=$array[0];
while($i<$res){
$text=$text.$i.$array[$i];
$i++;
}
return $text;
}
$p_prec = $nextart - 1;
$p_suiv = $nextart + 1;
$uri_art = generer_url_entite($id_article, "article");
$uri_art .= strpos($uri_art, '?') ? '&' : '?';
// Add anchors to <h3>
$page[$nextart] = preg_replace("|\{\{\{(.*)\}\}\}|U","<a id=\"sommaire_#NB_TITRE_DE_MON_ARTICLE#\"></a>$0", $page[$nextart]);
$array = explode("#NB_TITRE_DE_MON_ARTICLE#" , $page[$nextart]);
$res =count($array);
$i =1;
$page[$nextart]=$array[0];
while($i<$res){
$page[$nextart]=$page[$nextart].$i.$array[$i];
$i++;
}
// Pagination
switch (TRUE) {
case ($nextart == 0):
$previous = "";
$next = "<a href='" . $uri_art . "artsuite=" . $p_suiv . "'>>></a>";
break;
case ($nextart == ($num_pages-1)):
$previous = "<a href='" . $uri_art . "artsuite=" . $p_prec . "'><<</a>";
$next = "";
break;
default:
$previous = "<a href='" . $uri_art . "artsuite=" . $p_prec . "'><<</a>";
$next = "<a href='" . $uri_art . "artsuite=" . $p_suiv . "'>>></a>";
break;
}
for ($i = 0; $i < $num_pages; $i++) {
$j = $i;
if ($i == $nextart) {
$actual .= " <strong>" . ++$j . "</strong> ";
}
else {
$actual .= " <a href='" . $uri_art . "artsuite=$i'>" . ++$j . "</a> ";
}
}
// Here, you can customize
$result .= $page[$nextart];
$result .= "<div class='pagination' style='text-align:center'>pages : $previous $actual $next</div>";
return $result;
}
// FIN du Filtre decouper_en_page
Hope it helps,
.Gilles
---On Tue, Dec 27, 2011 at 10:59 AM, Serge Markitanenko <serge.markitanenko-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:Greeting,
the most simple way - break the articles by yourself using models +
writing the JQuery script.
You could contact me after 03/01/2012 and I will try to help you.
Second way - the spip site http://www.spipmedia.net have the same
article break as you wish.
You could learn their source code by yourself - just view the source of
http://www.spipmedia.net/squelettes/sommaire.html
http://www.spipmedia.net/squelettes/article.html
Best regards,
Serge Markitanenko
http://www.voltairestudio.com
2011/12/25 kamran Mir Hazar <kamran_mirhazar-/E1597aS9LQAvxtiuMwx3w@public.gmane.org>:> _______________________________________________> Hello,
> Is there any plugin to break an article in more than one page without
> creating several articles?
> Here is an example:
> http://www.nytimes.com/2011/12/25/business/bourbons-all-american-roar.html?ref=global-home
> Thanks
> Kamran
>
>
> spip-en-JM9gtpQu/Ho@public.gmane.org - http://listes.rezo.net/mailman/listinfo/spip-en
>
_______________________________________________
spip-en-JM9gtpQu/Ho@public.gmane.org - http://listes.rezo.net/mailman/listinfo/spip-en
_______________________________________________
spip-en-JM9gtpQu/Ho@public.gmane.org - http://listes.rezo.net/mailman/listinfo/spip-en
RSS Feed29 | |
|---|---|
38 | |
13 | |
2 | |
22 | |
6 | |
16 | |
5 | |
3 | |
2 | |
1 | |
9 | |
6 | |
9 | |
6 | |
18 | |
4 | |
37 | |
14 | |
14 | |
28 | |
12 | |
21 | |
28 | |
4 | |
3 | |
5 | |
16 | |
12 | |
42 | |
11 | |
1 | |
41 | |
16 | |
32 | |
64 | |
40 | |
54 | |
16 | |
18 | |
26 | |
27 | |
18 | |
34 | |
53 | |
27 | |
86 | |
36 | |
42 | |
64 | |
47 | |
67 | |
25 | |
29 | |
39 | |
51 | |
21 | |
25 | |
16 | |
78 | |
117 | |
39 | |
23 | |
27 | |
33 | |
24 | |
35 | |
31 | |
25 | |
10 | |
25 | |
25 | |
36 | |
44 | |
77 | |
80 | |
24 | |
21 | |
41 | |
5 | |
26 | |
43 | |
40 | |
48 | |
50 | |
35 | |
40 | |
29 | |
1 |