X-Git-Url: http://git.cyclocoop.org/?p=velocampus%2Fweb%2Fwww.git;a=blobdiff_plain;f=www%2Fecrire%2Finc%2Faider.php;fp=www%2Fecrire%2Finc%2Faider.php;h=413f91ef10afb6b90590bfe5104c12f6900c4715;hp=0000000000000000000000000000000000000000;hb=80b4d3e85f78d402ed2e73f8f5d1bf4c19962eed;hpb=aaf970bf4cdaf76689ecc10609048e18d073820c diff --git a/www/ecrire/inc/aider.php b/www/ecrire/inc/aider.php new file mode 100644 index 0000000..413f91e --- /dev/null +++ b/www/ecrire/inc/aider.php @@ -0,0 +1,93 @@ + array ( + 'surtitre' => 'arttitre', + 'titre' => 'arttitre', + 'soustitre' => 'arttitre', + 'id_parent' => 'artrub', + 'descriptif' => 'artdesc', + 'virtuel' => 'artvirt', + 'chapo' => 'arttitre', + 'text_area' => 'arttexte'), + + 'editer_breve.html' => array( + 'id_parent' => 'brevesrub', + 'lien_titre' => 'breveslien', + 'statut' => 'brevesstatut'), + + 'editer_groupe_mot.html' => array( + 'titre' => 'motsgroupes'), + + 'editer_mot.html' => array( + 'titre' => 'mots', + 'id_groupe' => 'motsgroupes'), + + 'editer_rubrique.html' => array( + 'titre' => 'arttitre', + 'id_parent' => 'rubrub', + 'text_area' => 'raccourcis') + ); + +// http://doc.spip.org/@inc_aider_dist +function inc_aider_dist($aide='', $skel='', $env=array()) { + global $spip_lang, $spip_display, $aider_index; + + if (!$aide OR $spip_display == 4) return ''; + + if (($skel = basename($skel)) + AND isset($aider_index[$skel]) + AND isset($aider_index[$skel][$aide])) + $aide = $aider_index[$skel][$aide]; + + $args = "aide=$aide&var_lang=$spip_lang"; + + return aider_icone(generer_url_ecrire("aide_index", $args)); +} + +function aider_icone($url) +{ + global $spip_lang, $spip_lang_rtl; + + $t = _T('titre_image_aide'); + + return "\n " + . http_img_pack("aide-12".aide_lang_dir($spip_lang,$spip_lang_rtl).".png", + _T('info_image_aide'), + " title=\"$t\" class='aide'") + . ""; +} + + +// en hebreu le ? ne doit pas etre inverse +// http://doc.spip.org/@aide_lang_dir +function aide_lang_dir($spip_lang,$spip_lang_rtl) { + return ($spip_lang<>'he') ? $spip_lang_rtl : ''; +} +?>