X-Git-Url: http://git.cyclocoop.org/?p=velocampus%2Fweb%2Fwww.git;a=blobdiff_plain;f=www%2Fecrire%2Fconfiguration%2Freducteur.php;fp=www%2Fecrire%2Fconfiguration%2Freducteur.php;h=f1cc626e338776086dfab32ded2efeb1daa61e19;hp=0000000000000000000000000000000000000000;hb=80b4d3e85f78d402ed2e73f8f5d1bf4c19962eed;hpb=aaf970bf4cdaf76689ecc10609048e18d073820c diff --git a/www/ecrire/configuration/reducteur.php b/www/ecrire/configuration/reducteur.php new file mode 100644 index 0000000..f1cc626 --- /dev/null +++ b/www/ecrire/configuration/reducteur.php @@ -0,0 +1,166 @@ +"._T('info_taille_maximale_images')."

"; + $time = time(); + $url = generer_url_action("tester_taille", "arg=3000&time=$time"); + $test_out .= ""; + $test_out .= "
"; + } + else { + effacer_meta('max_taille_vignettes'); + } + + return ajax_action_greffe("configurer-reducteur", '', + debut_cadre_trait_couleur("image-24.gif", true, "", _T("info_image_process_titre")) + . debut_cadre_relief("", true) + . "

" + . _T('info_image_process') + . "

" + . $res + . "
" + . "

" + . _T('info_image_process2') + . "

" + . $test_out + . fin_cadre_relief(true) + . (!$formats_graphiques ? '' : format_choisi()) + . fin_cadre_trait_couleur(true) + ); +} + +function format_choisi() +{ + global $spip_lang_left, $spip_lang_right; + + $creer_preview = $GLOBALS['meta']["creer_preview"]; + $taille_preview = $GLOBALS['meta']["taille_preview"]; + if ($taille_preview < 10) $taille_preview = 120; + + $res .= "

"; + $res .= _T('info_ajout_image'); + $res .= "

\n"; + $res .= "
"; + $res .= bouton_radio("creer_preview", "oui", _T('item_choix_generation_miniature'), $creer_preview == "oui", "changeVisible(this.checked, 'config-preview', 'block', 'none');"); + $res .= '
'; + + if ($creer_preview == "oui") $style = "block;"; else $style = "none;"; + + $res .= "
" + . "" + . "
"; + $res .= " "._T('info_pixels'); + + $res .= '

'; + $res .= "
"; + $res .= bouton_radio("creer_preview", "non", _T('item_choix_non_generation_miniature'), $creer_preview != "oui", "changeVisible(this.checked, 'config-preview', 'none', 'block');"); + + return + debut_cadre_relief("", true, "", _T('info_generation_miniatures_images')) + . ajax_action_post('configurer', 'reducteur', 'config_fonctions', '', $res) + . fin_cadre_relief(true); +} + +// http://doc.spip.org/@afficher_choix_vignette +function afficher_choix_vignette($process) { + + //global $taille_preview; + $taille_preview = 120; + + // Ici on va tester les capacites de GD independamment des tests realises + // dans les images spip_image -- qui servent neanmoins pour la qualite + /* if (function_exists('imageformats')) { + + } */ + + + $class = ''; + if ($process == $GLOBALS['meta']['image_process']) { + $class = " selected"; + } + return "\n
$process$process
\n"; + +} + +?>