3 /***************************************************************************\
4 * SPIP, Systeme de publication pour l'internet *
6 * Copyright (c) 2001-2011 *
7 * Arnaud Martin, Antoine Pitrou, Philippe Riviere, Emmanuel Saint-James *
9 * Ce programme est un logiciel libre distribue sous licence GNU/GPL. *
10 * Pour plus de details voir le fichier COPYING.txt ou l'aide en ligne. *
11 \***************************************************************************/
13 if (!defined('_ECRIRE_INC_VERSION')) return;
15 include_spip('inc/presentation');
16 include_spip('inc/config');
19 // Actives/desactiver systeme de syndication
22 function configuration_syndications_dist()
24 global $spip_lang_left;
26 $activer_sites = $GLOBALS['meta']['activer_sites'];
27 $activer_syndic = $GLOBALS['meta']["activer_syndic"];
28 $proposer_sites = $GLOBALS['meta']["proposer_sites"];
29 $moderation_sites = $GLOBALS['meta']["moderation_sites"];
31 $res = "\n<table border='0' cellspacing='1' cellpadding='3' width=\"100%\">";
33 $res .= "<tr><td align='$spip_lang_left' class='verdana2'>";
35 $res .= bouton_radio("activer_sites", "oui", _T('item_gerer_annuaire_site_web'), $activer_sites == "oui", "changeVisible(this.checked, 'config-site', 'block', 'none');");
37 $res .= bouton_radio("activer_sites", "non", _T('item_non_gerer_annuaire_site_web'), $activer_sites == "non", "changeVisible(this.checked, 'config-site', 'none', 'block');");
39 $res .= "</td></tr></table>\n";
43 if ($activer_sites != 'non') $style = "display: block;";
44 else $style = "display: none;";
46 $res .= "<div id='config-site' style='$style'>";
48 // Utilisateurs autorises a proposer des sites references
51 $res .= debut_cadre_relief('',true);
52 $res .= "\n<table border='0' cellspacing='1' cellpadding='3' width=\"100%\">";
53 $res .= "\n<tr><td style='color: #000000' class='verdana1 spip_x-small'>";
54 $res .= "<label for='proposer_sites'>" . _T('info_question_proposer_site') ."</label>";
55 $res .= "\n<div style='text-align: center'><select name='proposer_sites' id='proposer_sites' size='1'>\n";
56 $res .= "<option".mySel('0',$proposer_sites).">"._T('item_choix_administrateurs')."</option>\n";
57 $res .= "<option".mySel('1',$proposer_sites).">"._T('item_choix_redacteurs')."</option>\n";
58 $res .= "<option".mySel('2',$proposer_sites).">"._T('item_choix_visiteurs')."</option>\n";
59 $res .= "</select></div>\n";
60 $res .= "</td></tr></table>\n";
61 $res .= fin_cadre_relief(true);
63 $res .= debut_cadre_relief("", true, "", _T('titre_syndication').aide ("rubsyn"));
65 $res .= "\n<table border='0' cellspacing='1' cellpadding='3' width=\"100%\">";
67 // Reglage de la syndication
69 $res .= "<tr><td class='verdana2'>";
70 $res .= _T('texte_syndication');
73 $res .= "<tr><td align='$spip_lang_left' class='verdana2'>";
75 $res .= bouton_radio("activer_syndic", "oui", _T('item_utiliser_syndication'), $activer_syndic == "oui", "changeVisible(this.checked, 'config-syndic', 'block', 'none');");
77 $res .= bouton_radio("activer_syndic", "non", _T('item_non_utiliser_syndication'), $activer_syndic == "non", "changeVisible(this.checked, 'config-syndic', 'none', 'block');");
79 if ($activer_syndic != "non") $style = "display: block;";
80 else $style = "display: none;";
82 $res .= "<div id='config-syndic' style='$style'>";
84 // Moderation par defaut des sites syndiques
85 $res .= "<hr /><p style='text-align: $spip_lang_left'>";
86 $res .= _T('texte_liens_sites_syndiques')."</p>";
88 $res .= afficher_choix('moderation_sites', $moderation_sites,
89 array('oui' => _T('item_bloquer_liens_syndiques'),
90 'non' => _T('item_non_bloquer_liens_syndiques')));
94 $res .= "</td></tr>\n";
98 $res .= fin_cadre_relief(true);
102 // Gestion des flux RSS
105 $res .= debut_cadre_relief("feed.png", true, "", _T('ical_titre_rss'));
107 $res .= "<table border='0' cellspacing='1' cellpadding='3' width=\"100%\">";
109 $res .= "<tr><td class='verdana2'>";
110 $res .= _T('info_syndication_integrale_1',
111 array('url' => generer_url_ecrire('synchro'),
112 'titre' => _T("icone_suivi_activite"))
115 _T('info_syndication_integrale_2').
117 $res .= "</td></tr>";
120 $res .= "<td align='$spip_lang_left' class='verdana2'>";
121 $res .= afficher_choix('syndication_integrale', $GLOBALS['meta']["syndication_integrale"],
122 array('oui' => _T('item_autoriser_syndication_integrale'),
123 'non' => _T('item_non_autoriser_syndication_integrale')), "<br />\n");
124 $res .= "</td></tr>";
125 $res .= "</table>\n";
127 $res .= fin_cadre_relief(true);
129 $res = debut_cadre_trait_couleur("site-24.gif",true, "", _T('titre_referencement_sites').aide ("reference"))
130 . ajax_action_post('configurer', 'syndications', 'configuration','',$res)
131 . fin_cadre_trait_couleur(true);
133 return ajax_action_greffe('configurer-syndications', '', $res);