X-Git-Url: http://git.cyclocoop.org/?p=velocampus%2Fweb%2Fwww.git;a=blobdiff_plain;f=www%2Fecrire%2Finc%2Fgadgets.php;fp=www%2Fecrire%2Finc%2Fgadgets.php;h=2b73e989013b81b91ebca74609aec26750cbff49;hp=0000000000000000000000000000000000000000;hb=80b4d3e85f78d402ed2e73f8f5d1bf4c19962eed;hpb=aaf970bf4cdaf76689ecc10609048e18d073820c diff --git a/www/ecrire/inc/gadgets.php b/www/ecrire/inc/gadgets.php new file mode 100644 index 0000000..2b73e98 --- /dev/null +++ b/www/ecrire/inc/gadgets.php @@ -0,0 +1,223 @@ + permettant aux boutons de jouer +// du on/off au survol +// -> fonction bandeau_gadgets() +// 2. Au survol, sera execute un script en Ajax menu_{gadget}.php +// + + +// http://doc.spip.org/@bandeau_gadgets +function bandeau_gadgets($largeur, $options, $id_rubrique) { + global $connect_id_auteur, $spip_lang_rtl, $spip_lang, $spip_lang_left, $spip_lang_right, $spip_ecran; + + $bandeau = "
". + "\n
\n
" + + // GADGET Menu rubriques + . "\n
" + . "" + ._T('icone_site_entier') + . "" + . "\n
" + . "
"; + // FIN GADGET Menu rubriques + + + // GADGET Navigation rapide + $bandeau .= "
" + . "" . _T('icone_brouteur') . "" + . "\n
\n" + . "
\n"; + // FIN GADGET Navigation rapide + + // GADGET Recherche + $r = _T('info_rechercher'); + $bandeau .= "\n
" + . generer_form_ecrire('recherche', + (""), + " method='get' style='margin: 0px; position: relative;'") + . "
"; + // FIN GADGET recherche + + // messagerie et agenda + if ($GLOBALS['meta']['messagerie_agenda'] != 'non') { + // GADGET Agenda + $bandeau .= "
" + . "" + . _T('icone_agenda') + . "" + + . "\n
\n" + . "
\n"; + // FIN GADGET Agenda + + // GADGET Messagerie + $gadget = ''; + $gadget .= "
"; + $gadget .= ""; + $gadget .= _T('icone_messagerie_personnelle'); + $gadget .= ""; + $gadget .= "\n
\n"; + $gadget .= "
"; + + $bandeau .= $gadget; + + // FIN GADGET Messagerie + } + + // Suivi activite + $bandeau .= "
" + . "" + . _T('icone_suivi_activite') + . "" +// . "\n
 
" +// . icone_horizontale(_T('analyse_xml'), parametre_url(self(),'transformer_xml', 'valider_xml'), 'racine-24.gif', '', false) +// . "
". + . "
\n"; + +/* + // Infos perso + $bandeau .= "\n"; +*/ + + // + // -------- Affichage de droite ---------- + + // Deconnection + $bandeau .= "\n
"; + $bandeau .= ""._T('icone_deconnecter')."".aide("deconnect"); + $bandeau .= "
"; + + $decal = 0; + $decal = $decal + 150; + + $bandeau .= "\n
"; + + // couleurs +// $couleurs = charger_fonction('couleurs', 'inc'); +// $bandeau .= "
"; +// $bandeau .= $couleurs() . "
"; + + // menu + $self = self('&'); + $bandeau .= "\n
" + . lien_change_var (generer_action_auteur('preferer',"display:1", $self),'','', '1,0,18,15', _T('lien_afficher_texte_seul')) + . lien_change_var (generer_action_auteur('preferer',"display:2", $self),'','', '19,0,40,15', _T('lien_afficher_texte_icones')) + . lien_change_var (generer_action_auteur('preferer',"display:3", $self),'','', '41,0,59,15', _T('lien_afficher_icones_seuls')) + . "\n
"; + $bandeau .= "
" + . http_img_pack("choix-layout$spip_lang_rtl".($spip_lang=='he'?'_he':'').".gif", _T('choix_interface'), " style='vertical-align: middle' width='59' height='15' usemap='#map_layout'") + . http_img_pack("rien.gif", "", "width='10' height='1'") + . "
"; + // ecran + if ($spip_ecran == "large") + $bandeau .= "
"._T('info_petit_ecran')."/"._T('info_grand_ecran')."
"; + else + $bandeau .= "
"._T('info_petit_ecran')."/"._T('info_grand_ecran')."
"; + $bandeau .= "
"; + + + $bandeau .= "
"; + $bandeau .= "
\n"; + + + $bandeau .= '
'; + + return $bandeau; +} + +// http://doc.spip.org/@gadget_messagerie +function gadget_messagerie() { + global $connect_statut; + + return "
 
" + . icone_horizontale(_T('lien_nouvea_pense_bete'),generer_action_auteur("editer_message","pb"), "pense-bete.gif",'',false) + . icone_horizontale(_T('lien_nouveau_message'),generer_action_auteur("editer_message","normal"), "message.gif",'',false) + . (($connect_statut != "0minirezo") ? '' : + icone_horizontale(_T('lien_nouvelle_annonce'),generer_action_auteur("editer_message","affich"), "annonce.gif",'',false)); +} + +// http://doc.spip.org/@installer_gadgets +function installer_gadgets($id_rubrique) +{ + return "" + . http_img_pack("tout-site.png", _T('icone_site_entier'), "width='26' height='20'") + . "" + . "" + . http_img_pack("naviguer-site.png", _T('icone_brouteur'), "width='26' height='20'") + ."" + . "" + . http_img_pack("loupe.png", _T('info_rechercher'), "width='26' height='20'") + ."" + + . (($GLOBALS['meta']['messagerie_agenda'] != 'non') + ? http_img_pack("rien.gif", "", "width='10'") + . "" + . http_img_pack("cal-rv.png", _T('icone_agenda'), "width='26' height='20'") + ."" + . "" + . http_img_pack("cal-messagerie.png", _T('icone_messagerie_personnelle'), "width='26' height='20'") + ."" + . "" + . http_img_pack("cal-suivi.png", _T('icone_suivi_activite'), "width='26' height='20'") + . "" + : ''); +} + +// http://doc.spip.org/@repercuter_gadgets +function repercuter_gadgets($id_rubrique) { + + if (!_SPIP_AJAX) return ''; + + // comme on cache fortement ce menu, + // son url change en fonction de sa date de modif + $toutsite = "./?exec=menu_rubriques\\x26date=" . $GLOBALS['meta']['date_calcul_rubriques']; + $navrapide = "./?exec=menu_navigation\\x26id_rubrique=$id_rubrique"; + $agenda = "./?exec=menu_agenda"; + + return + + "\ninit_gadgets('$toutsite','$navrapide','$agenda','" + .str_replace('