3 #-----------------------------------------------------#
4 # Plugin : Couteau Suisse - Licence : GPL #
5 # Auteur : Patrice Vanneufville, 2006 #
6 # Contact : patrice¡.!vanneufville¡@!laposte¡.!net #
7 # Infos : http://www.spip-contrib.net/?article2166 #
8 #-----------------------------------------------------#
9 if(!defined("_ECRIRE_INC_VERSION")) return;
12 // outils/mon_outil.php : inclus par les pipelines de l'outil
13 // outils/mon_outil_options.php : inclus par couteau_suisse_options.php
14 // outils/mon_outil_fonctions.php : inclus par couteau_suisse_fonctions.php
16 cs_log("inclusion de config_outils.php");
17 //-----------------------------------------------------------------------------//
19 //-----------------------------------------------------------------------------//
22 'id' => 'revision_nbsp',
23 'code:options' => '$GLOBALS["activer_revision_nbsp"] = true; $GLOBALS["test_i18n"] = true ;',
24 'categorie' => 'admin',
31 'check' => 'couteauprive:autobr_oui',
33 'code:%s' => "define('_CS_AUTOBR_TRAIT', 1);",
36 'check' => 'couteauprive:autobr_non',
38 'code:%s' => "define('_CS_AUTOBR_RACC', 1);",
42 'code:options' => '%%alinea%%%%alinea2%%',
43 'categorie' => 'typo-corr',
44 // traitement automatique des TEXTE/articles, et TEXTE/forums (standard pour SPIP>=2.1)
45 'traitement:TEXTE/articles:pre_propre'
46 .(!defined('_SPIP20100')?
',traitement:TEXTE/forums:pre_propre':'') => 'autobr_pre_propre',
47 'pipelinecode:pre_typo' => 'if(%%alinea2%%) { include_spip(\'outils/autobr\'); $flux = autobr_alinea($flux); }',
48 'pipeline:nettoyer_raccourcis_typo' => 'autobr_nettoyer_raccourcis',
49 'pipeline:porte_plume_cs_pre_charger' => 'autobr_CS_pre_charger',
50 'pipeline:porte_plume_lien_classe_vers_icone' => 'autobr_PP_icones',
51 'code:fonctions' => "// pour le traitement TEXTE/articles et la balise #INTRODUCTION
52 include_spip('outils/autobr');
53 \$GLOBALS['cs_introduire'][] = 'autobr_nettoyer_raccourcis';",
54 'pipelinecode:pre_description_outil' => 'if($id=="autobr")
55 $texte=str_replace("@BALISES@",cs_balises_traitees("autobr"),$texte);',
58 // ici on a besoin d'une case input. La variable est : dossier_squelettes
59 // a la toute premiere activation de l'outil, la valeur sera : $GLOBALS['dossier_squelettes']
61 'nom' => 'dossier_squelettes',
62 'format' => _format_CHAINE
,
63 'defaut' => "\$GLOBALS['dossier_squelettes']",
64 'code' => "\$GLOBALS['dossier_squelettes']=%s;",
67 'id' => 'dossier_squelettes',
68 'code:spip_options' => '%%dossier_squelettes%%',
69 'categorie' => 'admin',
73 'id' => 'supprimer_numero',
75 $table_des_traitements['TITRE'][]= 'typo(supprimer_numero(%s))';
76 $table_des_traitements['TYPE']['mots']= 'typo(supprimer_numero(%s))';
77 $table_des_traitements['NOM'][]= 'typo(supprimer_numero(%s))'; */
78 'traitement:TITRE:pre_typo,
79 traitement:TITRE/mots:pre_typo,
80 traitement:NOM:pre_typo,
81 traitement:TYPE/mots:pre_typo' => 'supprimer_numero',
82 'categorie' => 'public',
86 'nom' => 'paragrapher',
87 'format' => _format_NOMBRE
,
88 'radio' => array(1 => 'item_oui', 0 => 'item_non', -1 => 'couteauprive:par_defaut'),
90 'code:%s>=0' => "\$GLOBALS['toujours_paragrapher']=%s;",
93 'id' => 'paragrapher2',
94 'code:spip_options' => '%%paragrapher%%',
95 'categorie' => 'admin',
99 'id' => 'forcer_langue',
100 'code:spip_options' => "\$GLOBALS['forcer_lang']=true;",
101 'categorie' => 'public',
105 'nom' => 'webmestres',
106 'format' => _format_CHAINE
,
108 'code:strlen(%s)' => "define('_ID_WEBMESTRES', %s);",
109 'code:!strlen(%s)' => "define('_ID_WEBMESTRES', 1);",
112 'id' => 'webmestres',
113 'code:spip_options' => '%%webmestres%%',
114 'categorie' => 'admin',
115 // non supporte avant la version 1.92
116 'version-min' => '1.9200',
117 'autoriser' => "autoriser('webmestre')",
118 'pipelinecode:pre_description_outil' => 'if($id=="webmestres")
119 $texte=str_replace(array("@_CS_LISTE_WEBMESTRES@","@_CS_LISTE_ADMINS@"),get_liste_administrateurs(),$texte);',
123 'id' => 'insert_head',
124 'code:options' => "\$GLOBALS['spip_pipeline']['affichage_final'] .= '|f_insert_head';",
125 'categorie' => 'spip',
128 // ici on a besoin d'une case input. La variable est : suite_introduction
129 // a la toute premiere activation de l'outil, la valeur sera : ' (...)'
130 add_variables( array(
131 'nom' => 'suite_introduction',
132 'format' => _format_CHAINE
,
133 'defaut' => '" (...)"',
134 'code' => "define('_INTRODUCTION_SUITE', %s);\n",
136 'nom' => 'lgr_introduction',
137 'format' => _format_NOMBRE
,
139 'code:%s && %s!=100' => "define('_INTRODUCTION_LGR', %s);\n",
141 'nom' => 'lien_introduction',
142 'format' => _format_NOMBRE
,
143 'radio' => array(1 => 'item_oui', 0 => 'item_non'),
145 'code' => "define('_INTRODUCTION_LIEN', %s);",
148 'id' => 'introduction',
149 'code:options' => "%%lgr_introduction%%%%suite_introduction%%%%lien_introduction%%",
150 'categorie' => 'spip',
153 // ici on a besoin de deux boutons radio : _T('icone_interface_simple') et _T('icone_interface_complet')
155 'nom' => 'radio_set_options4',
156 'format' => _format_CHAINE
,
157 'radio' => array('basiques' => 'icone_interface_simple', 'avancees' => 'icone_interface_complet'),
158 'defaut' => '"avancees"',
159 'label' => '@_CS_CHOIX@',
160 'code' => "\$_GET['set_options']=\$GLOBALS['set_options']=%s;",
163 'id' => 'set_options',
164 'auteur' => 'Vincent Ramos',
165 'code:options' => "%%radio_set_options4%%",
166 'categorie' => 'interface',
167 // pipeline pour retirer en JavaScript le bouton de controle de l'interface
168 'pipeline:header_prive' => 'set_options_header_prive',
169 // non supporte a partir de la version 1.93
170 'version-max' => '1.9299',
173 // ici on a besoin de trois boutons radio : _T('couteauprive:js_jamais'), _T('couteauprive:js_defaut') et _T('couteauprive:js_toujours')
175 'nom' => 'radio_filtrer_javascript3',
176 'format' => _format_NOMBRE
,
177 'radio' => array(-1 => 'couteauprive:js_jamais', 0 => 'couteauprive:js_defaut', 1 => 'couteauprive:js_toujours'),
179 'label' => '@_CS_CHOIX@',
180 // si la variable est non nulle, on code...
181 'code:%s' => "\$GLOBALS['filtrer_javascript']=%s;",
184 'id' => 'filtrer_javascript',
185 'code:options' => "%%radio_filtrer_javascript3%%",
186 'categorie' => 'securite',
187 'version-min' => '1.9200',
190 // ici on a besoin d'une case input. La variable est : forum_lgrmaxi
191 // a la toute premiere activation de l'outil, la valeur sera : 0 (aucune limite)
193 'nom' => 'forum_lgrmaxi',
194 'format' => _format_NOMBRE
,
196 'code:%s' => "define('_FORUM_LONGUEUR_MAXI', %s);",
199 'id' => 'forum_lgrmaxi',
200 'code:spip_options' => "%%forum_lgrmaxi%%",
201 'categorie' => 'securite',
202 'version-min' => '1.9200',
206 add_variables( array(
207 'nom' => 'logo_Hmax',
208 'format' => _format_NOMBRE
,
210 'code:%s' => "@define('_LOGO_MAX_HEIGHT', %s);\n",
212 'nom' => 'logo_Wmax',
213 'format' => _format_NOMBRE
,
215 'code:%s' => "@define('_LOGO_MAX_WIDTH', %s);\n",
217 'nom' => 'logo_Smax',
218 'format' => _format_NOMBRE
,
220 'code:%s' => "@define('_LOGO_MAX_SIZE', %s);\n",
223 'format' => _format_NOMBRE
,
225 'code:%s' => "@define('_IMG_MAX_HEIGHT', %s);\n",
228 'format' => _format_NOMBRE
,
230 'code:%s' => "@define('_IMG_MAX_WIDTH', %s);\n",
233 'format' => _format_NOMBRE
,
235 'code:%s' => "@define('_IMG_MAX_SIZE', %s);\n",
238 'format' => _format_NOMBRE
,
240 'code:%s' => "@define('_DOC_MAX_SIZE', %s);\n",
242 'nom' => 'img_GDmax',
243 'format' => _format_NOMBRE
,
245 'code:%s' => "@define('_IMG_GD_MAX_PIXELS', %s);\n",
247 'nom' => 'img_GDqual',
248 'format' => _format_NOMBRE
,
250 'code:%s' => "@define('_IMG_GD_QUALITE', %s);\n",
251 'label' => '@_CS_CHOIX@',
253 'nom' => 'copie_Smax',
254 'format' => _format_NOMBRE
,
256 'code' => "@define('_COPIE_LOCALE_MAX_SIZE', %s*1048576);",
259 'id' => 'SPIP_tailles',
260 'code:spip_options' => "%%logo_Hmax%%%%logo_Wmax%%%%logo_Smax%%%%img_Hmax%%%%img_Wmax%%%%img_Smax%%%%doc_Smax%%%%img_GDmax%%%%img_GDqual%%%%copie_Smax%%",
261 'categorie' => 'securite',
265 'id' => 'previsualisation',
266 'categorie' => 'interface',
267 'auteur' => '[Cédric Morin->http://www.yterium.net]',
268 'pipeline:pre_boucle' => 'previsu_redac_pre_boucle',
269 'pipeline:boite_infos' => 'previsu_redac_boite_infos',
270 // fichier distant pour les pipelines
271 'distant_pipelines' => 'http://zone.spip.org/trac/spip-zone/export/32230/_plugins_/previsu_redaction/previsu_redac_pipelines.php',
272 'version-min' => '1.9300',
276 'nom' => 'mot_masquer',
277 'format' => _format_CHAINE
,
278 'defaut' => "'masquer'",
279 'code' => "define('_MOT_MASQUER', %s);",
280 'commentaire' => '!sql_countsel("spip_mots", "titre="._q(%s))?"<span style=\"color:red\">"._T("couteauprive:erreur_mot", array("mot"=>%s))."</span>":""',
284 'categorie' => 'spip',
285 'auteur' => 'Nicolas Hoizey, Stéphanie Caron',
286 'pipeline:pre_boucle' => 'masquer_pre_boucle',
287 // fichier distant pour le pipeline
288 'distant_pipelines' => 'http://zone.spip.org/trac/spip-zone/export/35809/_plugins_/masquer/masquer_pipelines.php',
289 'code:options' => "%%mot_masquer%%",
290 'code:fonctions' => 'if (!function_exists("critere_tout_voir_dist")){
291 function critere_tout_voir_dist($idb, &$boucles, $crit) {
292 $boucle = &$boucles[$idb];
293 $boucle->modificateur["tout_voir"] = true;
296 'version-min' => '1.9300',
299 add_variables( array(
300 'nom' => 'auteur_forum_nom',
301 'check' => 'couteauprive:auteur_forum_nom',
304 'nom' => 'auteur_forum_email',
305 'check' => 'couteauprive:auteur_forum_email',
308 'nom' => 'auteur_forum_deux',
309 'check' => 'couteauprive:auteur_forum_deux',
312 // chaine de langue en extension sous SPIP>=3.0
313 $cs_temp = defined('_SPIP30000')?
'forum:':'';
315 'id' => 'auteur_forum',
316 'categorie' => 'securite',
318 'code:jq_init' => 'cs_auteur_forum.apply(this);',
319 'code:js' => "var cs_verif_email = %%auteur_forum_email%%;\nvar cs_verif_nom = %%auteur_forum_nom%%;\nvar cs_verif_deux = %%auteur_forum_deux%%;",
320 'pipelinecode:pre_description_outil' => 'if($id=="auteur_forum") $texte=str_replace(array("@_CS_FORUM_NOM@","@_CS_FORUM_EMAIL@"),
321 array(preg_replace(\',:$,\',"",_T("'.$cs_temp.'forum_votre_nom")),preg_replace(\',:$,\',"",_T("'.$cs_temp.'forum_votre_email"))),$texte);',
323 /* Astuce de b_b en php (a tester !)
324 'pipeline:formulaire_verifier' => 'nom_obligatoire',
325 function nom_obligatoire($flux){
326 $form = $flux['args']['form'];
328 if (!sinon($GLOBALS['visiteur_session']['nom'],$GLOBALS['visiteur_session']['session_nom'])){
329 $flux['data']['message_erreur'] .= _T('nom_obligatoire');
330 $flux['data']['session_nom'] = _T('nom_obligatoire');
331 unset($flux['data']['previsu']);
337 // ici on a besoin de trois boutons radio : _T('couteauprive:par_defaut'), _T('couteauprive:sf_amont') et _T('couteauprive:sf_tous')
339 'nom' => 'radio_suivi_forums3',
340 'format' => _format_CHAINE
,
341 'radio' => array('defaut' => 'couteauprive:par_defaut', '_SUIVI_FORUMS_REPONSES' => 'couteauprive:sf_amont', '_SUIVI_FORUM_THREAD' => 'couteauprive:sf_tous'),
342 'defaut' => '"defaut"',
343 'label' => '@_CS_CHOIX@',
344 // si la variable est differente de 'defaut' alors on codera le define
345 'code:%s!=="defaut"' => "define(%s, true);",
348 'id' => 'suivi_forums',
349 'code:options' => "%%radio_suivi_forums3%%",
350 'categorie' => 'admin',
351 // effectif que dans la version 1.92 (cf : plugin notifications)
352 'version-min' => '1.9200',
353 'version-max' => '1.9299',
356 add_variables( array(
357 'nom' => 'spam_mots',
358 'format' => _format_CHAINE
,
360 'defaut' => '"sucking blowjob superbabe ejakulation fucking (asses)"',
361 'code' => "define('_spam_MOTS', %s);",
364 'format' => _format_CHAINE
,
367 'code' => "define('_spam_IPS', %s);",
371 'code:options' => "%%spam_mots%%\n%%spam_ips%%",
372 // sauvegarde de l'IP pour tests
373 'code:spip_options' => '$ip_=$ip;',
374 'categorie' => 'securite',
377 // a placer apres l'outil 'spam' pour compatibilite IP
380 'code:spip_options' => '$ip = substr(md5($ip),0,16);',
381 'categorie' => 'securite',
386 'code:spip_options' => "define('_SPIP_FLOCK',false);",
387 'categorie' => 'admin',
388 'version-min' => '1.9300',
391 add_variables( array(
392 'nom' => 'ecran_actif',
393 'check' => 'couteauprive:ecran_activer',
395 // code d'appel en realpath() pour config/mes_options.php (SPIP < 2.1)
396 'code:%s' => "// bug SPIP 1.92, 2.0 et 2.1
397 if(isset(\$_REQUEST['exec']) && strncmp('admin_couteau_suisse',\$_REQUEST['exec'],20)==0) \$_REQUEST['exec']='admin_couteau_suisse';
398 ".((!defined('_SPIP20100'))?
"if(!defined('_ECRAN_SECURITE') && @file_exists(\$f=\"".str_replace('\\','/',realpath(dirname(__FILE__
)))."/lib/ecran_securite/distant_ecran_securite.php\")) include \$f;":''),
400 'nom' => 'ecran_load',
401 'format' => _format_NOMBRE
,
403 'code:%s' => "define('_ECRAN_SECURITE_LOAD',%s);\n",
406 'id' => 'ecran_securite',
407 'code:spip_options' => '%%ecran_load%%%%ecran_actif%%',
408 'categorie' => 'securite',
409 'distant' => 'http://zone.spip.org/trac/spip-zone/browser/_core_/securite/ecran_securite.php?format=txt',
410 'pipeline:fichier_distant' => defined('_SPIP20100')?
'ecran_securite_fichier_distant':'',
411 'pipelinecode:pre_description_outil' => 'if($id=="ecran_securite") $flux["non"] = !%%ecran_actif%% || !$flux["actif"];',
412 'pipeline:pre_description_outil' => 'ecran_securite_pre_description_outil',
413 'description' => "<:ecran_securite::>{{@_ECRAN_SECURITE@}}@_ECRAN_SUITE@",
416 add_variables( array(
417 'nom' => 'log_couteau_suisse',
418 'check' => 'couteauprive:cs_log_couteau_suisse',
421 'nom' => 'spip_options_on',
422 'check' => 'couteauprive:cs_spip_options_on',
424 'commentaire' => 'cs_outils_concernes("code:spip_options");',
426 'nom' => 'distant_off',
427 'check' => 'couteauprive:cs_distant_off',
429 'code:%s' => "define('_CS_PAS_DE_DISTANT','oui');",
431 'nom' => 'distant_outils_off',
432 'check' => 'couteauprive:cs_distant_outils_off',
434 'code:%s' => "define('_CS_PAS_D_OUTIL_DISTANT','oui');",
435 'commentaire' => 'cs_outils_concernes("fichiers_distants",%s);',
438 'id' => 'cs_comportement',
439 'code:spip_options' => "%%distant_off%% %%distant_outils_off%%",
440 'pipelinecode:pre_description_outil' => 'if($id=="cs_comportement") {
441 $tmp=(!%%spip_options_on%%||!$flux["actif"]||defined("_CS_SPIP_OPTIONS_OK"))?"":"<span style=\"color:red\">"._T("couteauprive:cs_spip_options_erreur")."</span>";
442 $texte=str_replace(array("@_CS_FILE_OPTIONS_ERR@","@_CS_DIR_TMP@","@_CS_FILE_OPTIONS@"),
443 array($tmp,cs_canonicalize(_DIR_RESTREINT_ABS._DIR_TMP),show_file_options()),$texte);
450 'code:options' => "\$GLOBALS['xhtml']='sax';",
451 'auteur' => 'Maïeul Rouquette',
452 'categorie' =>'public',
453 'version-min' => '1.9200',
458 'code:spip_options' => "\$GLOBALS['spip_pipeline']['insert_head'] = str_replace('|f_jQuery', '', \$GLOBALS['spip_pipeline']['insert_head']);",
460 'categorie' =>'public',
461 'version-min' => '1.9200',
464 add_variables( array(
465 'nom' => 'prive_travaux',
466 'format' => _format_NOMBRE
,
467 'radio' => array(0 => 'couteauprive:tous', 1 => 'couteauprive:admins_seuls'),
469 'code:%s' => "define('_en_travaux_PRIVE', %s);\n",
471 'nom' => 'admin_travaux',
472 'format' => _format_NOMBRE
,
473 'radio' => array(0 => 'couteauprive:tous', 1 => 'couteauprive:sauf_admin', 2 => 'couteauprive:sauf_admin_redac', 3 => 'couteauprive:sauf_identifies'),
476 'code' => "define('_en_travaux_PUBLIC', %s);\n",
478 'nom' => 'avertir_travaux',
479 'check' => 'couteauprive:travaux_masquer_avert',
481 'code:%s' => "define('_en_travaux_SANSMSG', %s);\n",
483 'nom' => 'message_travaux',
484 'format' => _format_CHAINE
,
485 'defaut' => "_T('couteauprive:travaux_prochainement')",
487 'code' => "\$tr_message=%s;\n",
489 'nom' => 'titre_travaux',
490 'format' => _format_NOMBRE
,
491 'radio' => array(1 => 'couteauprive:travaux_titre', 0 => 'couteauprive:travaux_nom_site'),
493 'code:%s' => "define('_en_travaux_TITRE', %s);",
495 'nom' => 'cache_travaux',
496 'format' => _format_NOMBRE
,
497 'check' => 'couteauprive:travaux_nocache',
499 'code:%s' => "define('_NO_CACHE',1);", // SPIP >=2.0
502 'id' => 'en_travaux',
503 'code:options' => "%%message_travaux%%%%prive_travaux%%%%admin_travaux%%%%avertir_travaux%%%%titre_travaux%%",
504 'categorie' => 'admin',
505 'auteur' => "Arnaud Ventre pour l'idée originale",
506 'pipeline:affichage_final' => 'en_travaux_affichage_final',
507 'pipelinecode:pre_description_outil' => 'if($id=="en_travaux") $texte=str_replace(array("@_CS_TRAVAUX_TITRE@","@_CS_NOM_SITE@"),
508 array("["._T("info_travaux_titre")."]","[".$GLOBALS["meta"]["nom_site"]."]"),$texte);',
509 'description' => '<:en_travaux::>[[%message_travaux%]][[%titre_travaux%]][[%admin_travaux%]][[-><admin_travaux valeur="1/2/3">%avertir_travaux%</admin_travaux>]][[->%cache_travaux%]][[%prive_travaux%]]',
512 add_variables( array(
513 'nom' => 'bp_tri_auteurs',
514 'check' => 'couteauprive:bp_tri_auteurs',
516 'code:%s' => "define('boites_privees_TRI_AUTEURS', %s);\n",
518 'nom' => 'bp_urls_propres',
519 'check' => 'couteauprive:bp_urls_propres',
521 'code:%s' => "define('boites_privees_URLS_PROPRES', %s);\n",
524 'check' => 'couteauprive:rss_var',
526 'code:%s' => "define('boites_privees_CS', %s);\n",
528 'nom' => 'format_spip',
529 'check' => 'couteauprive:format_spip',
531 'code:%s' => "define('boites_privees_ARTICLES', %s);\n",
533 'nom' => 'stat_auteurs',
534 'check' => 'couteauprive:stat_auteurs',
536 'code:%s' => "define('boites_privees_AUTEURS', %s);\n",
538 'nom' => 'qui_webmasters',
539 'check' => 'couteauprive:qui_webmestres',
541 'code:%s' => "define('boites_privees_WEBMASTERS', %s);\n",
544 'id' => 'boites_privees',
545 'auteur'=>'Pat, Joseph LARMARANGE (format SPIP)',
547 'code:options' => "%%cs_rss%%%%format_spip%%%%stat_auteurs%%%%qui_webmasters%%%%bp_urls_propres%%%%bp_tri_auteurs%%",
548 'categorie' => 'interface',
549 'pipeline:affiche_milieu' => 'boites_privees_affiche_milieu',
550 'pipeline:affiche_droite' => 'boites_privees_affiche_droite',
551 'pipeline:affiche_gauche' => 'boites_privees_affiche_gauche',
552 // controle de la boucle AUTEURS afin de respecter l'ordre des auteurs stockes en base
553 'pipeline:pre_boucle' => defined('_SPIP30000')?
'boites_privees_pre_boucle':'',
554 'code:fonctions' => 'include_spip("outils/boites_privees");',
555 // Pour la constante _CS_RSS_SOURCE
556 # 'pipelinecode:pre_description_outil' => 'if($id=="boites_privees") include_spip("cout_define");',
559 add_variables( array(
560 'nom' => 'max_auteurs_page',
561 'format' => _format_NOMBRE
,
563 'code:%s' => "@define('MAX_AUTEURS_PAR_PAGE', %s);\n",
565 'nom' => 'auteurs_0', 'check' => 'info_administrateurs', 'defaut' => 1, 'code:%s' => "'0minirezo',",
567 'nom' => 'auteurs_1', 'check' => 'info_redacteurs', 'defaut' => 1, 'code:%s' => "'1comite',",
569 'nom' => 'auteurs_5', 'check' => 'info_statut_site_4', 'defaut' => 1, 'code:%s' => "'5poubelle',",
571 'nom' => 'auteurs_6', 'check' => 'info_visiteurs', 'defaut' => 0, 'code:%s' => "'6forum',",
573 'nom' => 'auteurs_n', 'check' => 'couteauprive:nouveaux', 'defaut' => 0, 'code:%s' => "'nouveau',",
575 'nom' => 'auteurs_tout_voir',
576 'format' => _format_NOMBRE
,
577 'radio' => array(1 => 'couteauprive:statuts_tous', 0 => 'couteauprive:statuts_spip'),
580 'label' => '@_CS_CHOIX@',
581 // 'code:!%s' => "@define('AUTEURS_DEFAUT', join(\$temp_auteurs,','));",
582 'code:!%s' => "if(_request('exec')=='auteurs' && !_request('statut')) \$_GET['statut'] = join(\$temp_auteurs,',');",
583 'code:%s' => "if(_request('exec')=='auteurs' && !_request('statut')) \$_GET['statut'] = '!foo';",
587 'code:options' => "%%max_auteurs_page%%\$temp_auteurs=array(%%auteurs_0%%%%auteurs_1%%%%auteurs_5%%%%auteurs_6%%%%auteurs_n%%); %%auteurs_tout_voir%% unset(\$temp_auteurs);",
588 'categorie' => 'interface',
589 'version-min' => '1.9300',
590 // 'pipeline:affiche_milieu' => 'auteurs_affiche_milieu',
593 //-----------------------------------------------------------------------------//
595 //-----------------------------------------------------------------------------//
599 'auteur' => 'Cédric MORIN',
600 'categorie' => 'spip',
604 'id' => 'orientation',
605 'auteur' => 'Pierre Andrews (Mortimer) & IZO',
606 'categorie' => 'spip',
610 'nom' => 'balise_decoupe',
611 'format' => _format_NOMBRE
,
612 'radio' => array(1 => 'item_oui', 0 => 'item_non'),
614 'code:%s' => "define('_decoupe_BALISE', %s);\n",
619 // Le separateur <span class="csfoo xxxx"></span> est supprime en fin de calcul de page
620 'code:options' => "%%balise_decoupe%%define('_onglets_FIN', '<span class=\"csfoo ongl\"></span>');\n@define('_decoupe_SEPARATEUR', '++++');
621 if(!defined('_SPIP19300') && isset(\$_GET['var_recherche'])) {
622 include_spip('inc/headers');
623 redirige_par_entete(str_replace('var_recherche=', 'decoupe_recherche=', \$GLOBALS['REQUEST_URI']));
625 // construction des onglets
626 'code:jq_init' => "onglets_init.apply(this);",
627 // pour les balises #TEXTE : $table_des_traitements['TEXTE'] = 'cs_decoupe(propre(%s))';
628 // pour les articles, breves et rubriques : $table_des_traitements['TEXTE']['articles'] = 'cs_decoupe(propre(%s))';
629 'traitement:TEXTE:post_propre,
630 traitement:TEXTE/articles:post_propre,
631 traitement:TEXTE/forums:post_propre,
632 traitement:TEXTE/breves:post_propre,
633 traitement:TEXTE/rubriques:post_propre' => 'cs_decoupe',
634 // pour les balises #TEXTE : $table_des_traitements['TEXTE'] = 'propre(cs_onglets(%s))';
635 // pour les articles, breves et rubriques : $table_des_traitements['TEXTE']['articles'] = 'propre(cs_onglets(%s))';
636 'traitement:TEXTE:pre_propre,
637 traitement:TEXTE/articles:pre_propre,
638 traitement:TEXTE/forums:pre_propre,
639 traitement:TEXTE/breves:pre_propre,
640 traitement:TEXTE/rubriques:pre_propre' => 'cs_onglets',
641 'categorie' => 'typo-racc',
642 'pipeline:nettoyer_raccourcis_typo' => 'decoupe_nettoyer_raccourcis',
643 'pipeline:porte_plume_cs_pre_charger' => 'decoupe_CS_pre_charger',
644 'pipeline:porte_plume_lien_classe_vers_icone' => 'decoupe_PP_icones',
647 // couplage avec l'outil 'decoupe', donc 'sommaire' doit etre place juste apres :
648 // il faut inserer le sommaire dans l'article et ensuite seulement choisir la page
649 add_variables( array(
650 'nom' => 'prof_sommaire',
651 'format' => _format_NOMBRE
,
653 'code:%s>=2 && %s<=4' => "define('_sommaire_PROFONDEUR', %s);\n",
655 'nom' => 'lgr_sommaire',
656 'format' => _format_NOMBRE
,
658 'code:%s>=9 && %s<=99' => "define('_sommaire_NB_CARACTERES', %s);\n",
660 'nom' => 'auto_sommaire',
661 'format' => _format_NOMBRE
,
662 'radio' => array(1 => 'item_oui', 0 => 'item_non'),
664 'code:%s' => "define('_sommaire_AUTOMATIQUE', %s);\n",
666 'nom' => 'jolies_ancres',
667 'format' => _format_NOMBRE
,
668 'radio' => array(1 => 'item_oui', 0 => 'item_non'),
670 'code:%s' => "define('_sommaire_JOLIES_ANCRES', %s);\n",
672 'nom' => 'balise_sommaire',
673 'format' => _format_NOMBRE
,
674 'radio' => array(1 => 'item_oui', 0 => 'item_non'),
676 'code:%s' => "define('_sommaire_BALISE', %s);",
678 include_spip('inc/filtres');
682 // Le separateur <span class="csfoo xxxx"></span> est supprime en fin de calcul de page
683 'code:options' => "define('_sommaire_REM', '<span class=\"csfoo somm\"></span>');\ndefine('_CS_SANS_SOMMAIRE', '[!sommaire]');\ndefine('_CS_AVEC_SOMMAIRE', '[sommaire]');\n%%prof_sommaire%%%%lgr_sommaire%%%%auto_sommaire%%%%jolies_ancres%%%%balise_sommaire%%",
684 'code:jq' => 'if(jQuery("div.cs_sommaire").length) {
685 // s\'il y a un sommaire, on cache la navigation haute sur les pages
686 jQuery("div.decoupe_haut").css("display", "none");
687 // utilisation des cookies pour conserver l\'etat du sommaire si on quitte la page
688 if(cs_CookiePlugin) jQuery.getScript(cs_CookiePlugin, cs_sommaire_cookie);
690 'code:jq_init' => 'cs_sommaire_init.apply(this);',
691 // inserer : $table_des_traitements['TEXTE']['articles']= 'sommaire_d_article(propre(%s))';
692 // idem pour les breves et les rubriques
693 'traitement:TEXTE/articles:post_propre,
694 traitement:TEXTE/breves:post_propre,
695 traitement:TEXTE/rubriques:post_propre' => 'sommaire_d_article',
696 'traitement:CS_SOMMAIRE:post_propre' => 'sommaire_d_article_balise',
697 'categorie' => 'typo-corr',
698 'pipeline:nettoyer_raccourcis_typo' => 'sommaire_nettoyer_raccourcis',
699 'pipeline:pre_description_outil' => 'sommaire_description_outil',
700 'pipeline:pre_propre' => 'sommaire_intertitres',
703 // intertitres typo, outil compatible avec 'sommaire' :
704 add_variables( array(
706 'radio' => array('left' => 'left', 'right' => 'right', 'center' => 'center'),
707 'defaut' => "'left'",
709 'nom' => 'i_padding',
710 'format' => _format_NOMBRE
,
713 'nom' => 'i_hauteur',
714 'format' => _format_NOMBRE
,
717 'nom' => 'i_largeur',
718 'format' => _format_NOMBRE
,
722 'format' => _format_NOMBRE
,
725 'nom' => 'i_couleur',
726 'format' => _format_CHAINE
,
727 'defaut' => "'black'",
730 'format' => _format_CHAINE
,
731 'defaut' => "'dustismo.ttf'",
734 'id' => 'titres_typo',
735 'categorie' => 'typo-corr',
736 'code:options' => 'define("_titres_typo_ARG", "couleur=%%i_couleur%%,taille=%%i_taille%%,police=%%i_police%%,largeur=%%i_largeur%%,hauteur_ligne=%%i_hauteur%%,padding=%%i_padding%%,align=%%i_align%%");',
737 defined('_SPIP19300')?
'pipeline:pre_propre':'pipeline:pre_typo' => 'titres_typo_pre_typo',
738 'pipelinecode:pre_description_outil' => 'if($id=="titres_typo")
739 $texte=str_replace("@_CS_FONTS@",join(" - ",get_liste_fonts()),$texte);',
742 //-----------------------------------------------------------------------------//
744 //-----------------------------------------------------------------------------//
746 // TODO : gestion du jQuery dans la fonction a revoir ?
748 'id' => 'desactiver_flash',
749 'auteur' => 'Cédric MORIN',
750 'categorie' => 'public',
752 // fonction InhibeFlash_init() codee dans desactiver_flash.js : executee lors du chargement de la page et a chaque hit ajax
753 'code:jq_init' => 'InhibeFlash_init.apply(this);',
756 add_variables( array(
757 'nom' => 'radio_target_blank3',
758 'format' => _format_NOMBRE
,
759 'radio' => array(1 => 'item_oui', 0 => 'item_non'),
761 'code' => '$GLOBALS["tweak_target_blank"]=%s;',
763 'nom' => 'url_glossaire_externe2',
764 'format' => _format_CHAINE
,
766 'code:strlen(%s)' => '$GLOBALS["url_glossaire_externe"]=%s;',
768 'nom' => 'enveloppe_mails',
769 'format' => _format_NOMBRE
,
770 'radio' => array(1 => 'item_oui', 0 => 'item_non', -1 => 'couteauprive:par_defaut'),
773 'code:%s>0' => 'a.spip_mail:before{content:"\002709" !important;}',
774 'code:%s===0' => 'a.spip_mail:before{content:"" !important;}',
777 'id' => 'SPIP_liens',
778 'categorie' => 'public',
781 'description' => '<:SPIP_liens::>'.(defined('_SPIP19300')?
'<:SPIP_liens:1:>':''),
782 'code:options' => "%%radio_target_blank3%%\n%%url_glossaire_externe2%%",
783 'code:jq_init' => 'if(%%radio_target_blank3%%) { if(!cs_prive) jQuery("a.spip_out,a.spip_url,a.spip_glossaire",this).attr("target", "_blank"); }',
784 'code:css' => defined('_SPIP19300')?
'[[%enveloppe_mails%]]':NULL,
787 add_variables( array(
789 'check' => 'icone_rubriques',
793 'check' => 'icone_auteurs',
798 'categorie' => 'public',
800 'description' => '<:aff_tout::>[[%tout_rub%]][[->%tout_aut%]]',
801 'pipelinecode:pre_boucle' =>
802 'if(%%tout_rub%%) {if($flux->type_requete == \'rubriques\' && !isset($flux->modificateur[\'criteres\'][\'statut\']))
803 $flux->modificateur[\'criteres\'][\'statut\'] = true;}
804 if(%%tout_aut%%) {if($flux->type_requete == \'auteurs\' && !isset($flux->modificateur[\'criteres\'][\'statut\']))
805 $flux->modificateur[\'criteres\'][\'statut\'] = true;}',
808 //-----------------------------------------------------------------------------//
810 //-----------------------------------------------------------------------------//
813 'id' => 'visiteurs_connectes',
814 'auteur' => "Phil d'après spip-contrib",
815 'categorie' => 'public',
818 function cs_compter_visiteurs(){ return count(preg_files(_DIR_TMP.'visites/','.')); }
819 function action_visiteurs_connectes(){ echo cs_compter_visiteurs(); return true; }",
820 'version-min' => '1.9200', // pour la balise #ARRAY
821 'pipelinecode:pre_description_outil' => 'if($id=="visiteurs_connectes") if($GLOBALS["meta"]["activer_statistiques"]!="oui")
822 $texte.="\n\n<span style=\\"color:red;\\">"._T("couteauprive:visiteurs_connectes:inactif")."</span>";',
824 // une mise a jour toutes les 120 sec ?
825 /* 'code:js' => 'function Timer_visiteurs_connectes(){
826 jQuery("span.cs_nb_visiteurs").load("spip.php?action=visiteurs_connectes");
827 setTimeout("Timer_visiteurs_connectes()",120000);
829 'code:jq' => ' if(jQuery("span.cs_nb_visiteurs").length) Timer_visiteurs_connectes(); ',
833 //-----------------------------------------------------------------------------//
835 //-----------------------------------------------------------------------------//
839 'categorie' => 'typo-racc',
840 'pipeline:pre_typo' => 'ToutMulti_pre_typo',
843 add_variable( array( // variable utilisee par 'pipelinecode:insert_head'
845 'check' => 'couteauprive:puceSPIP',
847 'label' => '@_CS_CHOIX@',
851 'auteur' => "Jérôme Combaz pour l'idée originale",
852 'categorie' => 'typo-corr',
853 'pipelinecode:pre_typo' => 'if(strpos($flux, "-")!==false OR strpos($flux, "*")!==false) $flux = cs_echappe_balises("", "pucesli_remplace", $flux);',
854 'code:options' => 'function pucesli_remplace($texte) {
855 if(%%puceSPIP%%) {$texte = preg_replace(\'/^[*]\s*/m\', \'- \', $texte);}
856 return preg_replace(\'/^-\s*(?![-*#])/m\', \'-* \', $texte);
858 if(%%puceSPIP%%) {function pucesli_raccourcis() {return _T(\'couteauprive:puceSPIP_aide\');}}',
862 'id' => 'citations_bb',
863 'auteur' => 'Bertrand Marne, Romy Têtue',
864 'categorie' => 'typo-corr',
865 'code:css' => '/* Specifie des paires de guillemets sur plusieurs niveaux pour chaque langue */
866 /* Cf.: http://www.yoyodesign.org/doc/w3c/css2/generate.html#quotes-specify */
867 q { quotes: \'"\' \'"\' "\'" "\'" }
868 /* Guillemets selon la langue du texte */
869 :lang(fr) q { quotes: "\00AB\A0" "\A0\00BB" "\201C" "\201D" "\2018" "\2019"; }
870 :lang(en) q { quotes: "\201C" "\201D" "\2018" "\2019" }
871 :lang(es) q { quotes: "\00AB" "\00BB" "\201C" "\201D"; }
872 :lang(it) q { quotes: "\00AB\A0" "\A0\00BB" "\201C" "\201D"; }
873 :lang(de) q { quotes: "\00BB" "\00AB" ">" "<" }
874 :lang(no) q { quotes: "\00AB\A0" "\A0\00BB" "<" ">" }
875 /* Insere des guillemets avant et apres le contenu d\'un element Q */
876 q:before { content: open-quote; }
877 q:after { content: close-quote; }
879 * html q { font-style: italic; }
880 *+html q { font-style: italic; }',
881 'pipelinecode:pre_propre' => 'if(strpos($flux, "<qu")!==false) $flux=cs_echappe_balises("", "citations_bb_rempl", $flux);',
882 // Remplacer <quote> par <q> quand il n'y a pas de retour a la ligne (3 niveaux, preg sans l'option s)
883 'code:options' => 'function citations_bb_rempl($texte){
884 $texte = preg_replace($a="/<quote>(.*?)<\/quote>/", $b="<q>\$1</q>", $texte);
885 if(strpos($texte, "<qu")!==false) {
886 $texte = preg_replace($a, $b, $texte);
887 if(strpos($texte, "<qu")!==false) $texte = preg_replace($a, $b, $texte);
894 'nom' => 'decoration_styles',
895 'format' => _format_CHAINE
,
897 'defaut' => '"span.sc = font-variant:small-caps;
898 span.souligne = text-decoration:underline;
899 span.barre = text-decoration:line-through;
900 span.dessus = text-decoration:overline;
901 span.clignote = text-decoration:blink;
902 span.surfluo = background-color:#ffff00; padding:0px 2px;
903 span.surgris = background-color:#EAEAEC; padding:0px 2px;
905 'code:trim(%s)' => 'function _decoration_BALISES() { return trim(%s); }',
908 'id' => 'decoration',
909 'auteur' => 'izo@aucuneid.net, Pat',
911 'categorie' => 'typo-racc',
912 'code:options' => "%%decoration_styles%%",
913 'pipeline:pre_typo' => 'decoration_pre_typo',
914 'pipeline:bt_toolbox' => 'decoration_BarreTypo',
915 'pipeline:porte_plume_barre_pre_charger' => 'decoration_PP_pre_charger',
916 'pipeline:porte_plume_lien_classe_vers_icone' => 'decoration_PP_icones',
919 add_variables( array(
920 'nom' => 'couleurs_fonds',
921 'format' => _format_NOMBRE
,
922 'radio' => array(1 => 'item_oui', 0 => 'item_non' ),
924 'code' => "define('_COULEURS_FONDS', %s);\n",
926 'nom' => 'set_couleurs',
927 'format' => _format_NOMBRE
,
928 'radio' => array(0 => 'couteauprive:toutes_couleurs', 1 => 'couteauprive:certaines_couleurs'),
931 'code' => "define('_COULEURS_SET', %s);\n",
933 'nom' => 'couleurs_perso',
934 'format' => _format_CHAINE
,
936 'defaut' => '"gris, rouge"',
937 'code' => "define('_COULEURS_PERSO', %s);",
941 'auteur' => 'Aurélien PIERARD (idée originale), Pat',
942 'categorie' => 'typo-racc',
944 'pipeline:pre_typo' => 'couleurs_pre_typo',
945 'pipeline:nettoyer_raccourcis_typo' => 'couleurs_nettoyer_raccourcis',
946 'pipeline:bt_toolbox' => 'couleurs_BarreTypo',
947 'pipeline:porte_plume_barre_pre_charger' => 'couleurs_PP_pre_charger',
948 'pipeline:porte_plume_lien_classe_vers_icone' => 'couleurs_PP_icones',
949 'pipeline:pre_description_outil' => 'couleurs_pre_description_outil',
950 'code:options' => "%%couleurs_fonds%%%%set_couleurs%%%%couleurs_perso%%",
951 'code:fonctions' => "// aide le Couteau Suisse a calculer la balise #INTRODUCTION
952 include_spip('outils/couleurs');
953 \$GLOBALS['cs_introduire'][] = 'couleurs_nettoyer_raccourcis';
957 // outil essentiellement français. D'autres langues peuvent etre ajoutees dans outils/typo_exposants.php
959 'nom' => 'expo_bofbof',
960 'format' => _format_NOMBRE
,
961 'radio' => array(1 => 'item_oui', 0 => 'item_non' ),
963 'code:%s' => "define('_CS_EXPO_BOFBOF', %s);",
966 'id' => 'typo_exposants',
967 'auteur' => 'Vincent Ramos, Pat',
968 'categorie' => 'typo-corr',
970 'code:options' => '%%expo_bofbof%%',
971 'pipeline:post_typo' => 'typo_exposants',
972 'code:css' => 'sup, sup.typo_exposants { font-size:78%; font-variant:inherit; vertical-align:23%; }',
976 'id' => 'guillemets',
977 'auteur' => 'Vincent Ramos',
978 'categorie' => 'typo-corr',
979 'pipeline:post_typo' => 'typo_guillemets',
982 add_variables( array(
983 'nom' => 'liens_interrogation',
984 'format' => _format_NOMBRE
,
985 'radio' => array(1 => 'item_oui', 0 => 'item_non'),
987 'code:%s' => "\$GLOBALS['liens_interrogation']=true;\n",
989 'nom' => 'liens_orphelins',
990 'format' => _format_NOMBRE
,
991 'radio' => array(-1 => 'item_non', 0 => 'couteauprive:basique', 1 => 'couteauprive:etendu', -2 => 'couteauprive:par_defaut'),
993 'code' => '$GLOBALS["liens_orphelins"]=%s;',
994 // empeche SPIP de convertir les URLs orphelines (URLs brutes)
995 'code:%s<>-2' => defined('_SPIP19300')?
"\n// Pas de traitement automatique des liens orphelins :\n\$GLOBALS['spip_pipeline']['pre_liens']=str_replace('|traiter_raccourci_liens','',\$GLOBALS['spip_pipeline']['pre_liens']);
996 @define('_EXTRAIRE_LIENS',',^\$,');":'',
999 'format' => _format_NOMBRE
,
1001 'code:%s' => "define('_MAX_LONG_URL', %s);",
1003 'nom' => 'coupe_url',
1004 'format' => _format_NOMBRE
,
1006 'code:%s' => "define('_MAX_COUPE_URL', %s);",
1008 // attention : liens_orphelins doit etre place avant mailcrypt ou liens_en_clair
1010 'id' => 'liens_orphelins',
1011 'categorie' => 'typo-corr',
1013 'code:options' => '%%liens_interrogation%%',
1014 'code:spip_options' => '%%liens_orphelins%%%%long_url%%%%coupe_url%%',
1015 'pipeline:pre_propre' => 'liens_orphelins_pipeline',
1016 'traitement:EMAIL' => 'expanser_liens(liens_orphelins',
1017 'pipeline:pre_typo' => 'interro_pre_typo',
1018 'pipeline:post_propre' => 'interro_post_propre',
1019 'description' => defined('_SPIP19300')?
'<:liens_orphelins::><liens_orphelins valeur="0/1/-2"><:liens_orphelins:1:></liens_orphelins>':'<:liens_orphelins::>',
1023 'id' => 'filets_sep',
1024 'auteur' => 'FredoMkb',
1025 'categorie' => 'typo-racc',
1027 'pipeline:pre_typo' => 'filets_sep',
1028 'pipeline:bt_toolbox' => 'filets_sep_BarreTypo',
1029 'pipeline:porte_plume_barre_pre_charger' => 'filets_PP_pre_charger',
1030 'pipeline:porte_plume_lien_classe_vers_icone' => 'filets_PP_icones',
1035 'auteur' => "Sylvain, Pat",
1036 'categorie' => 'typo-corr',
1038 'code:css' => "table.cs_smileys td {text-align:center; font-size:90%; font-weight:bold;}",
1039 'pipeline:pre_typo' => 'cs_smileys_pre_typo',
1040 'pipeline:bt_toolbox' => 'cs_smileys_BarreTypo',
1041 'pipeline:porte_plume_barre_pre_charger' => 'cs_smileys_PP_pre_charger',
1042 'pipeline:porte_plume_lien_classe_vers_icone' => 'cs_smileys_PP_icones',
1047 'auteur' => "BoOz, Pat",
1048 'categorie' => 'typo-racc',
1049 'pipeline:pre_typo' => 'chatons_pre_typo',
1050 'pipeline:bt_toolbox' => 'chatons_BarreTypo',
1051 'pipeline:porte_plume_barre_pre_charger' => 'chatons_PP_pre_charger',
1052 'pipeline:porte_plume_lien_classe_vers_icone' => 'chatons_PP_icones',
1055 add_variables( array(
1056 'nom' => 'glossaire_groupes',
1057 'format' => _format_CHAINE
,
1058 'defaut' => "'Glossaire'",
1059 'code' => "\$GLOBALS['glossaire_groupes']=%s;\n",
1060 'commentaire' => defined('_SPIP19300')?
'fct_glossaire_groupes(%s);
1061 function fct_glossaire_groupes($gr){
1063 foreach(explode(":",$gr) as $g)
1064 if(!sql_countsel("spip_groupes_mots", "titre="._q($g))) $s.=($s?"<br />":"")._T("couteauprive:erreur_groupe", array("groupe"=>$g));
1065 return $s?"<p style=\"color:red\">$s</p>":"";
1068 'nom' => 'glossaire_limite',
1069 'format' => _format_NOMBRE
,
1071 'code:%s>0' => "define('_GLOSSAIRE_LIMITE', %s);\n",
1073 'nom' => 'glossaire_js',
1074 'radio' => array(0 => 'couteauprive:glossaire_css', 1 => 'couteauprive:glossaire_js'),
1075 'format' => _format_NOMBRE
,
1077 'code:%s' => "define('_GLOSSAIRE_JS', %s);",
1080 'id' => 'glossaire',
1081 'categorie' => 'typo-corr',
1083 'code:options' => "@define('_CS_SANS_GLOSSAIRE', '[!glossaire]');\n%%glossaire_limite%%%%glossaire_groupes%%%%glossaire_js%%",
1084 // 'traitement:LIEU:post_propre' => 'cs_glossaire',
1085 // sans oublier les articles, les breves, les forums et les rubriques !
1086 // SPIP ne considere pas que la premiere definition est un tronc commun...
1087 // meme traitement au chapo des articles...
1088 'traitement:TEXTE:post_propre,
1089 traitement:TEXTE/articles:post_propre,
1090 traitement:TEXTE/breves:post_propre,
1091 traitement:TEXTE/forums:post_propre,
1092 traitement:TEXTE/rubriques:post_propre,
1093 traitement:CHAPO:post_propre' => 'cs_glossaire',
1094 // Precaution pour les articles virtuels (SPIP < 3.0)
1095 defined('_SPIP30000')?
'foo':'traitement:CHAPO:pre_propre' => 'nettoyer_chapo',
1096 // Mise en forme des titres
1097 'traitement:TITRE/mots:post_typo' => 'cs_glossaire_titres',
1098 'code:css' => 'a.cs_glossaire:after {display:none;}',
1099 // fonction glossaire_init() codee dans glossaire.js : executee lors du chargement de la page et a chaque hit ajax
1100 'code:jq_init' => 'glossaire_init.apply(this);',
1101 'pipelinecode:nettoyer_raccourcis_typo' => '$flux=str_replace(_CS_SANS_GLOSSAIRE, "", $flux);',
1104 // attention : mailcrypt doit etre place apres liens_orphelins
1106 'id' => 'mailcrypt',
1107 'categorie' => 'securite',
1108 'auteur' => "Alexis Roussel, Paolo, Pat",
1111 'pipelinecode:post_propre' => "if(strpos(\$flux, '@')!==false) \$flux=cs_echappe_balises('', 'mailcrypt', \$flux);",
1112 'code:js' => "function lancerlien(a,b){ x='ma'+'ilto'+':'+a+'@'+b; return x; }",
1113 // jQuery pour remplacer l'arobase image par l'arobase texte
1114 // ... puis arranger un peu le title qui a ete protege
1115 'code:jq_init' => "jQuery('span.spancrypt', this).attr('class','cryptOK').html(''+'4;');
1116 jQuery(\"a[\"+cs_sel_jQuery+\"title*='..']\", this).each(function () {
1117 this.title = this.title.replace(/\.\..t\.\./,'[@]');
1119 'code:css' => 'span.spancrypt {background:transparent url(' . url_absolue(find_in_path('img/mailcrypt/leure.gif'))
1120 . ') no-repeat scroll 0.1em center; padding-left:12px; text-decoration:none;}',
1121 'traitement:EMAIL' => 'mailcrypt_email_dist',
1122 // compatibilite avec le plugin facteur
1123 'pipelinecode:facteur_pre_envoi' => 'include_spip("public/parametrer"); // charger mes_fonctions
1124 $flux->Body = maildecrypt($flux->Body);
1125 $flux->AltBody = maildecrypt($flux->AltBody);',
1129 // attention : liens_en_clair doit etre place apres tous les outils traitant des liens
1131 'id' => 'liens_en_clair',
1132 'categorie' => 'spip',
1134 'pipeline:post_propre' => 'liens_en_clair_post_propre',
1135 'code:css' => 'a.spip_out:after {display:none;}',
1138 add_variables( array( // variable utilisee par 'pipelinecode:insert_head'
1139 'nom' => 'scrollTo',
1140 'check' => 'couteauprive:jq_scrollTo',
1142 'format' => _format_NOMBRE
,
1143 ), array( // variable utilisee par 'pipelinecode:insert_head'
1144 'nom' => 'LocalScroll',
1145 'check' => 'couteauprive:jq_localScroll',
1147 'format' => _format_NOMBRE
,
1150 'id' => 'soft_scroller',
1151 'categorie' => 'public',
1153 'pipelinecode:insert_head' => 'if(%%scrollTo%%) {$flux.=\'<script src="\'.find_in_path("outils/jquery.scrollto.js").\'" type="text/javascript"></script>\'."\n";}
1154 if(%%LocalScroll%%) {$flux.=\'<script src="\'.find_in_path("outils/jquery.localscroll.js").\'" type="text/javascript"></script>\'."\n";}',
1155 'code:js' => 'function soft_scroller_init() { if(typeof jQuery.localScroll=="function") jQuery.localScroll({hash: true}); }',
1156 'code:jq_init' => 'soft_scroller_init.apply(this);',
1159 // http://www.malsup.com/jquery/corner/
1160 add_variables( array(
1161 'nom' => 'jcorner_classes',
1162 'format' => _format_CHAINE
,
1164 'defaut' => defined('_SPIP19300')?
'"// coins ronds aux formulaires
1165 .formulaire_inscription, .formulaire_forum, .formulaire_ecrire_auteur
1167 // colorisation de la dist de SPIP 2.0 en ajoutant un parent
1168 \".chapo, .texte\" = wrap(\'<div class=\"jc_parent\" style=\"padding:4px; background-color:#ffe0c0; margin:4px 0;\"><\/div>\')
1169 \".menu\" = wrap(\'<div class=\"jc_parent\" style=\"padding:4px; background-color:lightBlue; margin:4px 0;\"><\/div>\')
1171 // coins ronds aux parents !
1173 :'" // coins ronds pour les menus de navigation
1174 .rubriques, .breves, .syndic, .forums, .divers
1176 // en couleurs sur l\'accueil
1177 .liste-articles li .texte = css(\'background-color\', \'#E0F0F0\') .corner()
1179 // colorisation de la dist de SPIP 1.92 en ajoutant un parent
1180 \"#contenu .texte\" = wrap(\'<div class=\"jc_parent\" style=\"padding:4px; background-color:#E0F0F0; margin:4px 0;\"><\/div>\')
1182 // coins ronds aux parents !
1184 'code:trim(%s)' => 'function _jcorner_CLASSES() { return trim(%s); }',
1185 ), array( // variable utilisee par 'pipelinecode:insert_head'
1186 'nom' => 'jcorner_plugin',
1187 'check' => 'couteauprive:jcorner_plugin',
1189 'format' => _format_NOMBRE
,
1193 'categorie' => 'public',
1196 'code:options' => "%%jcorner_classes%%",
1197 // fichier distant pour le plugin jQuery : http://github.com/malsup/corner/commits/
1198 'distant' => defined('_SPIP20100')
1199 // version 2.09 (11-MAR-2010), jQuery v1.3.2 mini
1200 ?
'http://github.com/malsup/corner/raw/ca8d745fdfe054e1bb62fbd22eca9850c1353e03/jquery.corner.js'
1201 // version 2.03 (05-DEC-2009)
1202 :'http://github.com/malsup/corner/raw/46bbbc8706853c879c9224b7ebf5f284f726314d/jquery.corner.js',
1203 'pipelinecode:insert_head' => 'if(%%jcorner_plugin%%) {$flux.=\'<script src="\'.find_in_path("lib/jcorner/distant_jquery.corner.js").\'" type="text/javascript"></script>\'."\n";}',
1204 'pipeline:insert_head' => 'jcorner_insert_head',
1205 // jcorner_init() n'est disponible qu'en partie publique
1206 'code:jq_init' => 'if(typeof jcorner_init=="function") jcorner_init.apply(this);',
1209 add_variables( array(
1210 'nom' => 'insertions',
1211 'format' => _format_CHAINE
,
1213 'defaut' => '"oeuf = œuf
1215 (a priori) = {a priori}
1216 (([hH])uits) = $1uit
1217 /([cC]h?)oeur/ = $1œur
1218 /oeuvre/ = œuvre
1219 (O[Ee]uvre([rs]?)) = Œuvre$1
1220 /\b([cC]|[mM].c|[rR]ec)on+ais+a((?:n(?:ce|te?)|ble)s?)\b/ = $1onnaissa$2
1222 'code' => 'function _insertions_LISTE() { return trim(%s); }',
1225 'id' => 'insertions',
1226 'categorie' => 'typo-corr',
1227 'code:options' => "%%insertions%%",
1228 // sans oublier les articles, les breves, les forums et les rubriques !
1229 // SPIP ne considere pas que la premiere definition est un tronc commun :
1230 'traitement:CHAPO:pre_propre,
1231 traitement:PS:pre_propre,
1232 traitement:TEXTE:pre_propre,
1233 traitement:TEXTE/articles:pre_propre,
1234 traitement:TEXTE/breves:pre_propre,
1235 traitement:TEXTE/forums:post_propre,
1236 traitement:TEXTE/rubriques:pre_propre' => 'insertions_pre_propre',
1239 // le plugin moderation moderee dans le couteau suisse
1240 include_spip('inc/charsets');
1242 'id' => 'moderation_moderee',
1243 'auteur' => 'Yohann(potter64)',
1244 'categorie' => 'admin',
1245 'version-min' => '1.9300',
1246 'code:options' => '%%moderation_admin%%%%moderation_redac%%%%moderation_visit%%',
1247 'code:jq_init' => 'if(window.location.search.match(/page=forum/)!=null) jQuery("legend:contains(\''
1248 .addslashes(unicode2charset(html2unicode(_T((defined('_SPIP30000')?
'forum:':'').'bouton_radio_modere_priori')))).'\')", this).next().html(\''
1249 .addslashes(_T('couteauprive:moderation_message')).'\');',
1250 'pipeline:pre_edition' => 'moderation_vip',
1252 add_variables( array(
1253 'nom' => 'moderation_admin',
1254 'check' => 'couteauprive:moderation_admins',
1256 'code:%s' => "define('_MOD_MOD_0minirezo',%s);",
1258 'nom' => 'moderation_redac',
1259 'check' => 'couteauprive:moderation_redacs',
1261 'code:%s' => "define('_MOD_MOD_1comite',%s);",
1263 'nom' => 'moderation_visit',
1264 'check' => 'couteauprive:moderation_visits',
1266 'code:%s' => "define('_MOD_MOD_6forum',%s);",
1270 'id' => 'titre_parent',
1271 'categorie' => 'spip',
1273 'code:options' => '%%titres_etendus%%',
1275 add_variable( array(
1276 'nom' => 'titres_etendus',
1277 'check' => 'couteauprive:titres_etendus',
1278 'format' => _format_NOMBRE
,
1279 'radio' => array(1 => 'item_oui', 0 => 'item_non'),
1281 'code:%s' => "define('_PARENTS_ETENDUS',%s);",
1285 'id' => 'balise_set',
1286 'categorie' => 'spip',
1290 'id' => 'corbeille',
1291 'categorie' => 'admin',
1292 'version-min' => '1.9300',
1293 'code:options' => "%%arret_optimisation%%",
1295 add_variable( array(
1296 'nom' => 'arret_optimisation',
1297 'format' => _format_NOMBRE
,
1298 'radio' => array(1 => 'item_oui', 0 => 'item_non'),
1300 'code:%s' => "define('_CORBEILLE_SANS_OPTIM', 1);
1301 if(!function_exists('genie_optimiser')) {
1302 // surcharge de la fonction d'optimisation de SPIP (inc/optimiser.php)
1303 function genie_optimiser(\$t='foo'){ include_spip('optimiser','genie'); optimiser_base_une_table(); return -(mktime(2,0,0) + rand(0, 3600*4)); }\n}",
1307 'id' => 'trousse_balises',
1308 'categorie' => 'spip',
1314 'categorie' => 'spip',
1316 'pipelinecode:insert_head,
1317 pipelinecode:header_prive' => '$flux.=\'<script type="text/javascript" src="\'.generer_url_public(\'cout_dates.js\',\'lang=\'.$GLOBALS[\'spip_lang\']).\'"></script>
1318 <script type="text/javascript" src="\'.find_in_path("outils/jquery.jclock.js").\'"></script>\'."\n";',
1319 'code:jq_init' => 'jclock_init.apply(this);',
1322 add_outil(defined('_SPIP20100')?
array(
1324 'categorie' => 'securite',
1328 'categorie' => 'securite',
1329 'version-min' => '1.9300',
1331 'distant' => 'http://core.spip.org/projects/spip/repository/raw/branches/spip-2.1/ecrire/genie/mise_a_jour.php',
1334 // reglage des differents selecteurs en partie privee
1337 'categorie' => 'interface',
1338 'code:spip_options' => "%%rubrique_brouteur%%%%select_mots_clefs%%%%select_min_auteurs%%%%select_max_auteurs%%"
1340 add_variable( array(
1341 'nom' => 'rubrique_brouteur',
1342 'format' => _format_NOMBRE
,
1344 'code:%s' => "define('_SPIP_SELECT_RUBRIQUES', %s);"
1346 add_variable( array(
1347 'nom' => 'select_mots_clefs',
1348 'format' => _format_NOMBRE
,
1350 'code:%s<>50' => "define('_MAX_MOTS_LISTE', %s);"
1352 add_variable( array(
1353 'nom' => 'select_min_auteurs',
1354 'format' => _format_NOMBRE
,
1356 'code:%s<>30' => "define('_SPIP_SELECT_MIN_AUTEURS', %s);"
1358 add_variable( array(
1359 'nom' => 'select_max_auteurs',
1360 'format' => _format_NOMBRE
,
1362 'code:%s<>30' => "define('_SPIP_SELECT_MAX_AUTEURS', %s);"
1366 // Recuperer tous les outils (et leurs variables) de la forme outils/toto_config.xml
1367 foreach (find_all_in_path('outils/', '\w+_config\.xml$') as $f) {
1371 // Recuperer tous les outils de la forme outils/monoutil_config.php
1372 // y compris les lames perso dont on met le nom en italiques
1374 foreach (find_all_in_path('outils/', '\w+_config\.php$') as $f)
1375 if(preg_match(',^([^.]*)_config$,', basename($f, '.php'),$regs)){
1376 if($outil = charger_fonction($regs[0], 'outils'))
1377 $outil(preg_match(',couteau_suisse/outils/,', $f));
1379 // compatibilite ...
1381 if(function_exists($cs_temp=$regs[1].'_add_outil')) {
1382 $cs_temp = $cs_temp();
1383 $cs_temp['id'] = $regs[1];
1384 add_outil($cs_temp);
1387 if(isset($outils[$regs[1]]) && strpos($f, '/couteau_suisse/outils/'.$regs[1])===false)
1388 $outils[$regs[1]]['perso'] = 1;
1394 // Ajout des outils personnalises sous forme globale
1395 if(isset($GLOBALS['mes_outils'])) {
1396 foreach($GLOBALS['mes_outils'] as $id=>$outil) {
1398 $outil['perso'] = 1;
1401 unset($GLOBALS['mes_outils']);
1405 // http://archives.rezo.net/spip-core.mbox/
1406 // http://www.spip-contrib.net/Citations
1407 // http://www.spip-contrib.net/la-balise-LESMOTS et d'autres balises #MAINTENANT #LESADMINISTRATEURS #LESREDACTEURS #LESVISITEURS
1408 // http://www.spip-contrib.net/Ajouter-une-lettrine-aux-articles
1409 // http://www.spip-contrib.net/Generation-automatique-de
1410 // http://www.spip-contrib.net/Balise-LOGO-ARTICLE-ORITRAD
1413 //global $cs_variables; cs_log($cs_variables, 'cs_variables :');