3 /***************************************************************************\
4 * SPIP, Systeme de publication pour l'internet *
6 * Copyright (c) 2001-2014 *
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 // Choix du type d'url
17 include_spip('inc/presentation');
18 include_spip('inc/config');
20 function configuration_type_urls_dist()
22 if ($GLOBALS['type_urls'] != 'page') // fixe par mes_options
26 foreach (find_all_in_path('urls/', '\w+\.php$', array()) as $f) {
27 $r = basename($f, '.php');
28 if ($r == 'index' OR strncmp('generer_',$r,8)==0) continue;
30 $exemple = 'URLS_' . strtoupper($r) . '_EXEMPLE';
31 $exemple = defined($exemple) ?
constant($exemple) : '?';
32 $dispo[$r] = "<em>$r</em> — <tt>" . $exemple . '</tt>';
35 $res = "<p class='verdana2'>"
36 . _T('texte_type_urls')
38 . "<div class='verdana2'>"
39 . afficher_choix('type_urls', $GLOBALS['meta']['type_urls'], $dispo)
42 . _T('texte_type_urls_attention', array('htaccess' => '<tt>.htaccess</tt>'))
46 $res = '<br />'.debut_cadre_trait_couleur("", true, "", _T('titre_type_urls').aide("confurl"))
47 . ajax_action_post('configurer', 'type_urls', 'config_fonctions', '', $res)
48 . fin_cadre_trait_couleur(true);
50 return ajax_action_greffe("configurer-type_urls", '', $res);