[SPIP] +2.1.12
[velocampus/web/www.git] / www / ecrire / configuration / syndications.php
1 <?php
2
3 /***************************************************************************\
4 * SPIP, Systeme de publication pour l'internet *
5 * *
6 * Copyright (c) 2001-2011 *
7 * Arnaud Martin, Antoine Pitrou, Philippe Riviere, Emmanuel Saint-James *
8 * *
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 \***************************************************************************/
12
13 if (!defined('_ECRIRE_INC_VERSION')) return;
14
15 include_spip('inc/presentation');
16 include_spip('inc/config');
17
18 //
19 // Actives/desactiver systeme de syndication
20 //
21
22 function configuration_syndications_dist()
23 {
24 global $spip_lang_left;
25
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"];
30
31 $res = "\n<table border='0' cellspacing='1' cellpadding='3' width=\"100%\">";
32
33 $res .= "<tr><td align='$spip_lang_left' class='verdana2'>";
34
35 $res .= bouton_radio("activer_sites", "oui", _T('item_gerer_annuaire_site_web'), $activer_sites == "oui", "changeVisible(this.checked, 'config-site', 'block', 'none');");
36 $res .= " &nbsp;";
37 $res .= bouton_radio("activer_sites", "non", _T('item_non_gerer_annuaire_site_web'), $activer_sites == "non", "changeVisible(this.checked, 'config-site', 'none', 'block');");
38
39 $res .= "</td></tr></table>\n";
40
41
42
43 if ($activer_sites != 'non') $style = "display: block;";
44 else $style = "display: none;";
45
46 $res .= "<div id='config-site' style='$style'>";
47
48 // Utilisateurs autorises a proposer des sites references
49 //
50 $res .= "<br />\n";
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);
62
63 $res .= debut_cadre_relief("", true, "", _T('titre_syndication').aide ("rubsyn"));
64
65 $res .= "\n<table border='0' cellspacing='1' cellpadding='3' width=\"100%\">";
66 //
67 // Reglage de la syndication
68 //
69 $res .= "<tr><td class='verdana2'>";
70 $res .= _T('texte_syndication');
71 $res .= "</td></tr>";
72
73 $res .= "<tr><td align='$spip_lang_left' class='verdana2'>";
74
75 $res .= bouton_radio("activer_syndic", "oui", _T('item_utiliser_syndication'), $activer_syndic == "oui", "changeVisible(this.checked, 'config-syndic', 'block', 'none');");
76 $res .= "<br />\n";
77 $res .= bouton_radio("activer_syndic", "non", _T('item_non_utiliser_syndication'), $activer_syndic == "non", "changeVisible(this.checked, 'config-syndic', 'none', 'block');");
78
79 if ($activer_syndic != "non") $style = "display: block;";
80 else $style = "display: none;";
81
82 $res .= "<div id='config-syndic' style='$style'>";
83
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>";
87
88 $res .= afficher_choix('moderation_sites', $moderation_sites,
89 array('oui' => _T('item_bloquer_liens_syndiques'),
90 'non' => _T('item_non_bloquer_liens_syndiques')));
91
92 $res .= "</div>";
93
94 $res .= "</td></tr>\n";
95
96 $res .= "</table>\n";
97
98 $res .= fin_cadre_relief(true);
99 $res .= "</div>";
100
101 //
102 // Gestion des flux RSS
103 //
104
105 $res .= debut_cadre_relief("feed.png", true, "", _T('ical_titre_rss'));
106
107 $res .= "<table border='0' cellspacing='1' cellpadding='3' width=\"100%\">";
108
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"))
113 ).
114 '<p>' .
115 _T('info_syndication_integrale_2').
116 '</p>';
117 $res .= "</td></tr>";
118
119 $res .= "<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";
126
127 $res .= fin_cadre_relief(true);
128
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);
132
133 return ajax_action_greffe('configurer-syndications', '', $res);
134 }
135 ?>