?????????????? ?????????????? ?????????????? ?????????????? exec/agenda_evenements.php000066600000002062151454412660011665 0ustar00$val) $contexte[$key] = $val; $out .= debut_gauche("agenda",true); $out .= recuperer_fond("prive/navigation/agenda_evenements",$contexte); $out .= debut_droite('agenda',true); $out .= recuperer_fond("prive/contenu/agenda_evenements",$contexte); $out .= fin_gauche('agenda',true); $out .= fin_page(); echo $out; } ?> exec/evenements_edit.php000066600000006774151454412660011411 0ustar00$id_article)) OR !autoriser('modifier','evenement', $id_evenement,null,array('id_article'=>$id_article)))) ) { include_spip('inc/minipres'); echo minipres(_T('agenda:aucun_evenement')); } else evenements_edit($id_evenement, $id_article, $new, 'evenements_edit_config', $row); } function evenements_edit($id_evenement, $id_article, $new, $config_fonc, $row) { $id_evenement = $row['id_evenement']; $commencer_page = charger_fonction('commencer_page', 'inc'); pipeline('exec_init',array('args'=>array('exec'=>'evenements_edit','id_evenement'=>$id_evenement,'id_article'=>$id_article),'data'=>'')); $id_rubrique = sql_getfetsel('id_rubrique','spip_articles','id_article='.intval($id_article)); echo $commencer_page(intval($id_evenement)?_T('agenda:titre_cadre_modifier_evenement'):_T('agenda:titre_cadre_ajouter_evenement'), "naviguer", "evenements", $id_rubrique); echo debut_grand_cadre(true); echo afficher_hierarchie($id_rubrique); echo fin_grand_cadre(true); echo debut_gauche("",true); echo pipeline('affiche_gauche',array('args'=>array('exec'=>'evenements_edit','id_evenement'=>$id_evenement,'id_article'=>$id_article),'data'=>'')); echo creer_colonne_droite("",true); echo pipeline('affiche_droite',array('args'=>array('exec'=>'evenements_edit','id_evenement'=>$id_evenement,'id_article'=>$id_article),'data'=>'')); echo debut_droite("",true); $oups = _request('retour') ? _request('retour') : ($id_article ? generer_url_ecrire("articles","id_article=$id_article") : generer_url_ecrire() ); $contexte = array( 'icone_retour'=>icone_inline(_T('icone_retour'), $oups, _DIR_PLUGIN_AGENDA."img_pack/agenda-24.png", "rien.gif",$GLOBALS['spip_lang_left']), 'redirect'=>_request('retour') ? _request('retour') : generer_url_ecrire('articles'), 'titre'=>$titre, 'new'=>$new?$new:$row['id_evenement'], 'id_article'=>$id_article, 'config_fonc'=>$config_fonc, ); $milieu = recuperer_fond("prive/editer/evenement", $contexte); echo pipeline('affiche_milieu',array('args'=>array('exec'=>'evenements_edit','id_evenement'=>$id_evenement,'id_article'=>$id_article),'data'=>$milieu)); echo fin_gauche(), fin_page(); } ?>balise/calendrier_mini.php000066600000001712151454412660011655 0ustar00 $date, 'id_rubrique' => $id_rubrique, 'id_article' => $id_article, 'id_mot' => $id_mot, 'var_date' => $var_date, 'self' => $url, )); } ?> demo_calendrier_mini.html000066600000014725151454412660011607 0ustar00#CACHE{86400} [(#TITRE|textebrut)][ - (#NOM_SITE_SPIP|textebrut)] [] []
[(#REM) Entete de la page + titre du site ] [(#REM) Fil d'Ariane ]
<:accueil_site:> > [(#TITRE|couper{80})][ > (#TITRE|couper{80})]
[(#REM) Contenu principal : contenu de l'article ]
[(#REM) mini calendrier : 1er arg la date, 2eme le nom de la variable date (optionel : 'date' par defaut) 3eme l'url sur laquelle boucler (optionel : url courante par defaut) ] #CALENDRIER_MINI{#ENV{date},'date',#SELF}
#DEBUT_SURLIGNE [(#LOGO_ARTICLE||image_reduire{200,200})] [

(#SURTITRE)

]

#TITRE

[

(#SOUSTITRE)

] #FIN_SURLIGNE

[(#DATE|nom_jour) ][(#DATE|affdate)][, <:par_auteur:> (#LESAUTEURS)]

[(#REM) Traductions de l'article ]

<:trad_article_traduction:>

    [(#LANG|traduire_nom_langue)]
  • [(#LANG|traduire_nom_langue)]
#DEBUT_SURLIGNE [
(#CHAPO)
]
[

<:voir_en_ligne:> : [(#NOM_SITE|sinon{[(#URL_SITE|couper{80})]})]

] [
(#TEXTE|image_reduire{520,0})
] #FIN_SURLIGNE [(#REM) Portfolio : album d'images ]
#EMBED_DOCUMENT [
(#TITRE)
] [
(#DESCRIPTIF)
]
[

<:info_ps:>

#DEBUT_SURLIGNE(#PS)#FIN_SURLIGNE
] [(#REM) Autres documents joints a l'article ]

<:titre_documents_joints:>

[(#REM) Petition : La petition ayant une PAGINATION il faut absolument lui passer SELF] [ #REM Conserver cet invalideur invisible : (#PETITION|?{'',''}) ] [

<:info_notes:>

#DEBUT_SURLIGNE(#NOTES)#FIN_SURLIGNE
] [(#REM) Forum de l'article ] [

<:repondre_article:>

]
[(#REM) Menu de navigation laterale ]
[(#REM) Pied de page ]
base/agenda_evenements.php000066600000007241151454412660011657 0ustar00 "bigint(21) NOT NULL", "id_article" => "bigint(21) DEFAULT '0' NOT NULL", "date_debut" => "datetime DEFAULT '0000-00-00 00:00:00' NOT NULL", "date_fin" => "datetime DEFAULT '0000-00-00 00:00:00' NOT NULL", "titre" => "text NOT NULL", "descriptif" => "text NOT NULL", "lieu" => "text NOT NULL", "adresse" => "text NOT NULL", "inscription" => "tinyint(1) DEFAULT 0 NOT NULL", "places" => "int(11) DEFAULT 0 NOT NULL", "horaire" => "varchar(3) DEFAULT 'oui' NOT NULL", "id_evenement_source" => "bigint(21) NOT NULL", //"idx" => "ENUM('', '1', 'non', 'oui', 'idx') DEFAULT '' NOT NULL", "maj" => "TIMESTAMP" ); $evenements_key = array( "PRIMARY KEY" => "id_evenement", "KEY date_debut" => "date_debut", "KEY date_fin" => "date_fin", "KEY id_article" => "id_article" ); $tables_principales['spip_evenements'] = array('field' => &$evenements, 'key' => &$evenements_key, 'join'=>array('id_evenement'=>'id_evenement','id_article'=>'id_article')); $tables_principales['spip_rubriques']['field']['agenda'] = 'tinyint(1) DEFAULT 0 NOT NULL'; return $tables_principales; } function agenda_declarer_tables_auxiliaires($tables_auxiliaires){ //-- Table de relations MOTS_EVENEMENTS---------------------- $spip_mots_evenements = array( "id_mot" => "BIGINT (21) DEFAULT '0' NOT NULL", "id_evenement" => "BIGINT (21) DEFAULT '0' NOT NULL"); $spip_mots_evenements_key = array( "PRIMARY KEY" => "id_mot, id_evenement", "KEY id_evenement" => "id_evenement"); $tables_auxiliaires['spip_mots_evenements'] = array( 'field' => &$spip_mots_evenements, 'key' => &$spip_mots_evenements_key); //-- Table des participants ---------------------- $spip_evenements_participants = array( "id_evenement" => "BIGINT (21) DEFAULT '0' NOT NULL", "id_auteur" => "BIGINT (21) DEFAULT '0' NOT NULL", "date" => "datetime DEFAULT '0000-00-00 00:00:00' NOT NULL", "reponse" => "char(3) default '?' NOT NULL", // oui, non, ? ); $spip_evenements_participants_key = array( "PRIMARY KEY" => "id_evenement, id_auteur", "KEY id_auteur" => "id_auteur"); $tables_auxiliaires['spip_evenements_participants'] = array( 'field' => &$spip_evenements_participants, 'key' => &$spip_evenements_participants_key); return $tables_auxiliaires; } ?>base/agenda_upgrade.php000066600000006720151454412660011136 0ustar00"concat(tables_liees,'evenements,')"),"evenements='oui'"); sql_alter("TABLE spip_groupes_mots DROP evenements"); ecrire_meta('agenda_base_version',$current_version=0.18,'non'); } if ($current_version<0.20){ include_spip('base/abstract_sql'); sql_alter("TABLE spip_rubriques ADD agenda tinyint(1) DEFAULT 0 NOT NULL"); ecrire_meta('agenda_base_version',$current_version=0.20,'non'); } if ($current_version<0.21){ include_spip('base/abstract_sql'); sql_alter("TABLE spip_evenements ADD adresse text NOT NULL"); sql_alter("TABLE spip_evenements ADD inscription text NOT NULL"); sql_alter("TABLE spip_evenements ADD places text NOT NULL"); ecrire_meta('agenda_base_version',$current_version=0.21,'non'); } if ($current_version<0.22){ include_spip('base/abstract_sql'); include_spip('base/create'); include_spip('base/auxiliaires'); maj_tables('spip_evenements_participants'); #ecrire_meta('agenda_base_version',$current_version=0.22,'non'); } } } function agenda_vider_tables() { include_spip('base/agenda_evenements'); include_spip('base/abstract_sql'); sql_drop_table("spip_evenements"); sql_drop_table("spip_mots_evenements"); sql_alter("TABLE spip_rubriques DROP COLUMN agenda"); effacer_meta('agenda_base_version'); } function agenda_install($action){ $version_base = $GLOBALS['agenda_base_version']; switch ($action){ case 'test': return (isset($GLOBALS['meta']['agenda_base_version']) AND ($GLOBALS['meta']['agenda_base_version']>=$version_base)); break; case 'install': agenda_verifier_base(); break; case 'uninstall': agenda_vider_tables(); break; } } ?> formulaires/editer_evenement.html000066600000013636151454412660013331 0ustar00
[

(#ENV*{message_ok})

] [

(#ENV*{message_erreur})

] [(#ENV{editable})
[(#REM) declarer les hidden qui declencheront le service du formulaire parametre : url d'action ] #ACTION_FORMULAIRE{#ENV{action}}
  • [ (#ENV**{erreurs}|table_valeur{id_parent}) ]
  • [ (#ENV**{erreurs}|table_valeur{titre}) ]
  • <:agenda:evenement_date:>
    • [ (#ENV**{erreurs}|table_valeur{horaire}) ]
    • [ (#ENV**{erreurs}|table_valeur{date_debut})][ (#ENV**{erreurs}|table_valeur{date_fin}) ]
  • [ (#ENV{repetitions}|non)<:agenda:ajouter_repetition:>
    ][ (#ENV**{erreurs}|table_valeur{repetitions}) ]
    [ (#ENV{repetitions}|non)
    ]
  • [ (#ENV**{erreurs}|table_valeur{descriptif}) ]
  • [(#ENV**{erreurs}|table_valeur{inscription})]
    [ (#ENV**{erreurs}|table_valeur{places}) ]
  • [ (#ENV**{erreurs}|table_valeur{lieu}) ]
  • [ (#ENV**{erreurs}|table_valeur{adresse}) ]
  • [
  • [ (#ENV**{erreurs}|table_valeur{mots}) ](#INCLURE{fond=formulaires/inc-mots_evenements}{name=mots}{id_evenement}|trim)
  • ]
[(#REM) ajouter les saisies supplementaires : extra et autre, a cet endroit ]

#INCLURE{fond=formulaires/inc-editer_evenement_pickers} ]
formulaires/calendrier_mini.html000066600000005553151454412660013132 0ustar00

#TITRE<:icone_calendrier:>

[(#REM) On commence par calculer les evenements qui commencent ou finissent dans le mois courant Ainsi que ceux qui sont a cheval (commencent avant, et finissent apres le mois courant) ] [ (#DATE_DEBUT|Agenda_memo_full{#DATE_FIN,[(#TITRE|addslashes)], #DESCRIPTIF,#LIEU, [(#ENV{self}|parametre_url{#ENV{var_date},[(#DATE_DEBUT|affdate{'Y-m-d'})]})]}) ][ (#DATE_DEBUT|Agenda_memo_full{#DATE_FIN,[(#TITRE|addslashes)], #DESCRIPTIF,#LIEU, [(#ENV{self}|parametre_url{#ENV{var_date},[(#DATE_DEBUT|affdate{'Y-m-d'})]})]}) ] #SET{'borne_debut_mois', (#ENV{date}|Agenda_moisdecal{0,'Y-m-d'})} #SET{'borne_fin_mois', (#ENV{date}|Agenda_moisdecal{1,'Y-m-d'})} = #GET{'borne_fin_mois'}}>[ (#DATE_DEBUT|Agenda_memo_full{#DATE_FIN,[(#TITRE|addslashes)], #DESCRIPTIF,#LIEU, [(#ENV{self}|parametre_url{#ENV{var_date},[(#DATE_DEBUT|affdate{'Y-m-d'})]})]}) ] [(#REM) Puis on les affiche dans un agenda] [(#ENV{date}|agenda_mini)]
[ «][ (#ENV{date}|affdate_mois_annee)][ »]
<:date_jour_2|spip_substr{0,1}|strtoupper:> <:date_jour_3|spip_substr{0,1}|strtoupper:> <:date_jour_4|spip_substr{0,1}|strtoupper:> <:date_jour_5|spip_substr{0,1}|strtoupper:> <:date_jour_6|spip_substr{0,1}|strtoupper:> <:date_jour_7|spip_substr{0,1}|strtoupper:> <:date_jour_1|spip_substr{0,1}|strtoupper:>
 
formulaires/inc-mots_evenements.html000066600000001413151454412660013757 0ustar00[(#REM) Afficher les mots selectionnes ] #SET{pasdemots,1}[ [(#GET{pasdemots}|oui)<:agenda:ajouter_mots_cles:>
] (#INCLURE{fond=formulaires/inc-navigateur-mots_evenements}{ajax}{name}) [(#GET{pasdemots}|oui)
]]formulaires/inc-navigateur-mots_evenements.html000066600000001756151454412660016134 0ustar00[(#REM) MOTS CLES : chaque groupe de mot cle attribuable a un evenement agenda donne un select ]
<:agenda:groupes_mots:> > [(#TITRE|supprimer_tags)]
[

(#PAGINATION)

]
<:agenda:groupes_mots:>
formulaires/inc-editer_evenement_pickers.html000066600000007606151454412660015620 0ustar00 formulaires/participer_evenement.php000066600000007223151454412660014035 0ustar00=$places){ // dans ce cas, le formulaire est editable seulement si l'auteur a deja repondu oui, et peut changer d'avis ! if (!$valeurs['reponse']=='oui'){ $valeurs['editable'] = false; $valeurs['message_ok'] = _T('agenda:evenement_complet'); } } } return $valeurs; } function formulaires_participer_evenement_verifier_dist($id_evenement){ $erreurs = array(); $reponse = _request('reponse'); if (!($reponse=_request('reponse')) OR !in_array($reponse,array('oui','non','?'))) $erreurs['reponse'] = _T('agenda:indiquez_votre_choix'); elseif ($reponse!=='non') { $row = sql_fetsel('places','spip_evenements','id_evenement='.intval($id_evenement)); if ($places = $row['places']){ $ok = sql_countsel('spip_evenements_participants','id_evenement='.intval($id_evenement)." AND reponse='oui'"); $peutetre = sql_countsel('spip_evenements_participants','id_evenement='.intval($id_evenement)." AND reponse='?'"); $total = $ok+ceil(0.5*$peutetre); if ($total>=$places){ // dans ce cas, on ne peut valider que si ca n'ajoute pas un participant ! $valeurs['reponse'] = sql_getfetsel('reponse','spip_evenements_participants','id_evenement='.intval($id_evenement).' AND id_auteur='.intval($GLOBALS['visiteur_session']['id_auteur'])); if ($valeurs['reponse']!=='oui' AND $valeurs['reponse']!=_request('reponse')){ $erreurs['reponse'] = _T('agenda:plus_de_place'); } } } } return $erreurs; } function formulaires_participer_evenement_traiter_dist($id_evenement){ $reponse = _request('reponse'); if (sql_fetsel('reponse','spip_evenements_participants','id_evenement='.intval($id_evenement).' AND id_auteur='.intval($GLOBALS['visiteur_session']['id_auteur']))){ sql_updateq('spip_evenements_participants',array('reponse'=>$reponse),'id_evenement='.intval($id_evenement).' AND id_auteur='.intval($GLOBALS['visiteur_session']['id_auteur'])); } else sql_insertq('spip_evenements_participants',array('id_evenement'=>$id_evenement,'id_auteur'=>$GLOBALS['visiteur_session']['id_auteur'],'reponse'=>$reponse,'date'=>'NOW()')); $retour = array('editable'=>true); if (!$reponse = sql_getfetsel('reponse','spip_evenements_participants','id_evenement='.intval($id_evenement).' AND id_auteur='.intval($GLOBALS['visiteur_session']['id_auteur'])) OR $reponse!=_request('reponse')){ $retour['message_erreur'] = _T('agenda:probleme_technique'); } else { if ($reponse=='oui') $message = _T('agenda:participation_prise_en_compte'); elseif ($reponse=='?') $message = _T('agenda:participation_incertaine_prise_en_compte'); else $message = _T('agenda:absence_prise_en_compte'); } return array('message_ok'=>$message,'editable'=>true); } ?>formulaires/editer_evenement.php000066600000007722151454412660013153 0ustar00 formulaires/participer_evenement.html000066600000003573151454412660014216 0ustar00
[(#ENV{editable}|non) [

(#ENV*{message_ok})

] [

(#ENV*{message_erreur})

] ] [(#ENV{editable})
[(#REM) declarer les hidden qui declencheront le service du formulaire parametre : url d'action ] #ACTION_FORMULAIRE{#ENV{action}}
<:agenda:label_vous_inscrire:> [

(#ENV*{message_ok})

] [

(#ENV*{message_erreur})

]
  • [(#ENV**{erreurs}|table_valeur{reponse})]
[(#REM) ajouter les saisies supplementaires : extra et autre, a cet endroit ]

]
svn.revision000066600000000505151454412660007146 0ustar00 Origine: svn://zone.spip.org/spip-zone/_plugins_/agenda/2_0_0 Revision: 31049 Dernier commit: 2009-08-14 00:14:48 +0200 svn://zone.spip.org/spip-zone/_plugins_/agenda/2_0_0 31049 2009-08-14 00:14:48 +0200 img_pack/datePicker.css000066600000004111151454412660011114 0ustar00table.jCalendar { background: #c0cad4; border-collapse: separate; border-spacing: 2px; } table.jCalendar th { background: #c0cad4; color: #333; font-weight: bold; padding: 3px 5px; text-transform: uppercase; } table.jCalendar td { background: #fff; color: #000; padding: 3px 5px; text-align: center; } table.jCalendar td.other-month { color: #aaa; } table.jCalendar td.today { background: #666; color: #fff; } table.jCalendar td.selected { background: #f66; color: #fff; } table.jCalendar td.selected:hover { background: #f33; color: #fff; } table.jCalendar td:hover, table.jCalendar td.dp-hover { background: #eee; color: #000; } table.jCalendar td.disabled, table.jCalendar td.disabled:hover { background: #e0e5ea; color: #888; } /* For the popup */ /* NOTE - you will probably want to style a.dp-choose-date - see how I did it in demo.css */ div.dp-popup { position: relative; background: #e0e5ea; border: 1px solid #85909a; font-size: 10px; font-family: arial, sans-serif; padding: 2px; line-height: 1.2em; } div#dp-popup { position: absolute; z-index: 199; } div.dp-popup h2 { font-size: 12px; text-align: center; margin: 2px 0; padding: 0; color: #555; } a#dp-close { font-size: 11px; padding: 4px 0; text-align: center; display: block; } a#dp-close:hover { text-decoration: underline; } div.dp-popup a { color: #000; text-decoration: none; padding: 3px 2px 0; } div.dp-popup div.dp-nav-prev { position: absolute; top: 2px; left: 4px; width: 100px; } div.dp-popup div.dp-nav-prev a { float: left; } /* Opera needs the rules to be this specific otherwise it doesn't change the cursor back to pointer after you have disabled and re-enabled a link */ div.dp-popup div.dp-nav-prev a, div.dp-popup div.dp-nav-next a { cursor: pointer; } div.dp-popup div.dp-nav-prev a.disabled, div.dp-popup div.dp-nav-next a.disabled { cursor: default; } div.dp-popup div.dp-nav-next { position: absolute; top: 2px; right: 4px; width: 100px; } div.dp-popup div.dp-nav-next a { float: right; } div.dp-popup a.disabled { cursor: default; color: #aaa; } div.dp-popup td { cursor: pointer; } div.dp-popup td.disabled { cursor: default; }img_pack/agenda-12.png000066600000001134151454412660010476 0ustar00PNG  IHDRabKGDC pHYs B(xtIME 2MIDAT8˕OkQ3o1 af! o .RH#*"L FPh&H_jUiV pj'ӒE1BgX=7^p\Uv\[fnTWf@h6u%wmǵRJ9޼}B8*R*)ez?<<`i9[[ߨjF?7^izd2Oo4I2dc+ R)opi|2eaYi" x]ױg](!87gx8_@)RjgAsdx8WgrAӿj;d.σ{w dWhpW.ybb1c *2-TK5REEkbH*1P(&nv7{on6乏xfss$$I67[O I;w4YI}{*[ݼyj޽{u׭io+P@WB)Tq#yigg׍ԟZ);zZAxSJ?Va $NN\=Cfرc~5FyF#aaXtݐa }mEC$\= zڠjjC]vm27ussKS#UJ@t7zOq'lma ur7s|>młNL뜖 UxU'Uz]p4 П e9m}>Ku_+ t?E"6μB!ܹsKE쀢ʿhuihjm|&AzWO?+* g^tό[4_|9T*5>ȎIR *j-Cwp5H:ym%Oބ$u:A FhZ8d2eGKKk͞a}:Y4.Gؒ$ ~|&:BE9RdJ;3eRزeK|ddr6NdY9ex#_dh_٘H$q|Ԉ  F@7z/`$ȸG\j>@'Zl۱K֝㠩7f-)!QQȪ18=DP-Uw%0X(CǬ ̬P4j qbFd?[fNбh^)"B Hɱ0ld\%BM`"+Kx݋K x5~Q." Nae%@t8׼iI IyLI V/Ppk?DcW%mbi7CLm릳-%;]݈fϙ_$BĔT y؄[07mLi0 2݂fGJ qap$ K܌g&_g,A_ ۷#jq%@MǿjcXQHctPCE`w9vU`߁W pCw?˫;OIL :>=/. {Dm?6gSUx?T8fj8KdыN<Ori!_MB<v 0}z>϶yW) p"ZS~=)̘b@ZMiM 7! N/xUEȞn_KD*vy77O< qmB.^<'7U_~#YYY>rdDp+[!辋.O3KFӓ|,zpy;4Dؤ [+)-׷@I epW'ܜ6~W@NJIRs}z<3 |rl9$-w88eu[R?7+ːk!qCmŋ ^,Ud?/+L IMY S0oP}G5FfV$cD76oP&7Pxѥ}A/ߎ$˕}(Jm!5*ud x%v 3h}VOK(ڗR"3b όw/^=3 u8k1i> |M >Z(+Qz|ِ5֒:#㓊wjVNc޷e!?-!'sbN;k*i UUك{?o6xo7[v;S;%G$QإIENDB`img_pack/triangle-droite.gif000066600000000121151454412660012104 0ustar00GIF89a===JJJqqqFFF!,8|+ȞD`ZcM;img_pack/agenda-48.png000066600000004637151454412660010522 0ustar00PNG  IHDR00WsBIT|d VIDAThXml~fvb'($IU8J mEKTRA*BEEV(MEŎ HA UjHӔW%_|ێܝ܇|3^{ #vX,UU}0a6xͧ~Z3MЧBeiΝu|+%AU8jl۶ GE{{;Qb˖-cٲeP~8vf%<<1<4t-\H&e0 Y,#HL$M`6r\a1h$J&sV/Kr!nmۆmWs/S`Ryayyw|v|0[qRE.c M RM|{%IիO?:>F*ܻzU= x_!;7;#cP_19㺟?@޶vׯ#a}!##~_ޙeAQ*ہp B㦣;:p6g/hEH^*a쬧tM Z}oͽ],^ll;q|K.g!$~>Ξ;06B IDiwwwE InσSO؉ YxHKY!2$IMNKAފp"^M-c 7ntyMT0R$lMp/ J)ݴ ׭*0"&475 IcXwZO}BeuY~SW7 2~Vu]e@ *f|B&M.ss"Nb^ KEV\n~oviIg׋_ B011AЬsKߕ%1_~+=@ .h>hB/}_5:V?oZF73&"7Ųy=ɉcWz_@fBXV@ȷ\d``'@iBXuuuYƬ g\uSi9/6~-#DE'tvv 7n@zzh07666uAB TaeǡQjkCR`}1d^W4 @ w DiǪY\N,(UfaIdѣGyHԗ@v;~UTUUAuu5nA0("C1 'MC,T*awBaȵX#; ͤ]6𘦑rپ}r!MT GQRR0o<@b͛7 BsˀLMSx  E233XbԈea\L1 ֭XҔj;:qdL>ŤG$[ ?)hE4?q; |g,{t):SLitgę8L&]m/z*uH[`WnH4l]F`ޙJxc^H#H]j1u}h=d'%K|{?:Ix7zBd T*0>n0A0\v6‘!kW^࣏k7D Ih*.2uz.I[x&k½PshIH(݅&)1n4j^#TWe4w^4Xa2yh+ pފ^k׬ 4/dL@&) Z0,Ќt{}5o~ 22CwT |ʒhVpwZZ`Â0iX\]e1iif =Q @"]}MX,#Ǥ |IvxB,v9%~V4/*$xXcQ?" E5Gh()pS*0q$)DJPJa"^HI1 QZaL\IZȎKb!f?/냇(U99h 8-U/-yHx)߰n-`fΌ!ܗ7m :lDx.h'҅02zN݉w>3VF̽c.FvF 'm? ={|'7 - v55]z|I4V#1BZs'd2PXf;0'qY/+)}#@1hZJ{QY *b29A5f;c]RUsNE|຺=\Z_ڴuoc + @@$ wvCy,)pg'ǏE(/節{xy"|=qn{gfd@`ڴ`,$ )\*(Z@iti~$@ap!ZGOC( r±uz `ˈFБ r5)Ir)),ޓGs _ױcQ'0Ί_sZbd;XB"'7/B .Sp‚o:qѬ1q{b :7lLz_{ڠ̙[a ?"€/,B/!<^ы:/\?{V|P߻p,c5xTF FGZ6Npz(9 {147/ s_J :c6⋠ˋ/,Ǭ;\Nc­`=9L**NY X܁ir_K"4㠵ĩS[ZZ?.8a޵.[yum[x]$F(TKEh M륕qR~935ͶOB @k~R BȾtuvb$S)fggm v6-4x^aY?B1>7n$ DDH)BJ)„ׅ(ؼϑΤ !`$rPi ״ևKZ㭬zo|WƆ;mĂ9<,oB:^|wXVcLVi{ʕȳ .bG" hc c 1F` R@:,!J]TlDIN@^ P{4@XR@8g`?ODYr)9.9@q.Rc~`/IENDB`img_pack/agenda-non-24.png000066600000003000151454412660011263 0ustar00PNG  IHDRw=tEXtSoftwareAdobe ImageReadyqe<IDATxڴVklU浳;6m-` Fj#%142?Q j$ Ђ%Q)MBCMw)ٝb7;399Ιl9iBUu7f3wu=g$9 e/ҳ{[ȃ8ȲkEeUźx2Lxi:P4Z\p8R}I^`Z q35I$c:6GmK^ĽvԄ-ɤf:duP\RmrrB3VZZ1l`lbDs}̝5:ьI<PvejiL@5\.O ˲Lr<ٌ6Mt߽w`0GF学ic{E4L+!KnWuU5TMu3̓ح(N|}ި@yrYtuuQ^Ykז9Ľ.SS8rfnmiR)Y-  a||Y'# ۋ>a.J DqPIA --(++G0D,;#Q^^m罆TTT8Jdv6IyLpµ,Se/Lo~껀 ձ55sW^~ W>P(l6P VݜDQt 7ul&f\.\ clltu EH$Wq" `&[elsx};cTh/<9Ý@Őy [H[Ie&u[L@}"]][c+<ɲz۶\ 7mq:G;Db_|E0ԴCou58=%IVn= ^IENDB`img_pack/picker-16.gif000066600000000131151454412660010515 0ustar00GIF89afffDDD!,*y`A؋nH>]hYʮzUkwm<(;img_pack/timePicker.css000066600000000663151454412660011145 0ustar00div.time-picker { position: absolute; height: 200px; width:4em; /* needed for IE */ overflow: auto; background: #fff; border: 1px solid #000; z-index: 99; } div.time-picker-12hours { width:6em; /* needed for IE */ } div.time-picker ul { list-style-type: none; margin: 0; padding: 0; } div.time-picker li { padding: 1px; cursor: pointer; } div.time-picker li.selected { background: #316AC5; color: #fff; }img_pack/croix.png000066600000000303151454412660010160 0ustar00PNG  IHDR Vu\gAMA7tEXtSoftwareAdobe ImageReadyqe<UIDATxb?)D@__ ]a͌0Ȋ@ +d花j$݌OIȚiq4 pBIENDB`public/agenda_boucles.php000066600000001534151454412660011505 0ustar00 // function boucle_EVENEMENTS_dist($id_boucle, &$boucles) { $boucle = &$boucles[$id_boucle]; $id_table = $boucle->id_table; if (!isset($boucle->modificateur['criteres']['statut'])) { // Restreindre aux elements publies // uniquement les evenements d'un article publie if (!$GLOBALS['var_preview']) if (!isset($boucle->modificateur['lien']) AND !isset($boucle->modificateur['tout']) AND (!isset($boucle->lien) OR !$boucle->lien) AND (!isset($boucle->tout) OR !$boucle->tout)) { $boucle->from["articles"] = "spip_articles"; $boucle->where[]= array("'='", "'articles.id_article'", "'$id_table.id_article'"); $boucle->where[]= array("'='", "'articles.statut'", "'\"publie\"'"); } } return calculer_boucle($id_boucle, $boucles); } ?>public/criteres_agenda.php000066600000005476151454412660011702 0ustar00param; if (count($params) < 1) erreur_squelette(_T('zbug_info_erreur_squelette'), "{agenda ?} BOUCLE$idb"); $parent = $boucles[$idb]->id_parent; // les valeurs $date et $type doivent etre connus a la compilation // autrement dit ne pas etre des champs $date_deb = array_shift($params); $date_deb = $date_deb[0]->texte; $date_fin = array_shift($params); $date_fin = $date_fin[0]->texte; $type = array_shift($params); $type = $type[0]->texte; $annee = $params ? array_shift($params) : ""; $annee = "\n" . 'sprintf("%04d", ($x = ' . calculer_liste($annee, array(), $boucles, $parent) . ') ? $x : date("Y"))'; $mois = $params ? array_shift($params) : ""; $mois = "\n" . 'sprintf("%02d", ($x = ' . calculer_liste($mois, array(), $boucles, $parent) . ') ? $x : date("m"))'; $jour = $params ? array_shift($params) : ""; $jour = "\n" . 'sprintf("%02d", ($x = ' . calculer_liste($jour, array(), $boucles, $parent) . ') ? $x : date("d"))'; $annee2 = $params ? array_shift($params) : ""; $annee2 = "\n" . 'sprintf("%04d", ($x = ' . calculer_liste($annee2, array(), $boucles, $parent) . ') ? $x : date("Y"))'; $mois2 = $params ? array_shift($params) : ""; $mois2 = "\n" . 'sprintf("%02d", ($x = ' . calculer_liste($mois2, array(), $boucles, $parent) . ') ? $x : date("m"))'; $jour2 = $params ? array_shift($params) : ""; $jour2 = "\n" . 'sprintf("%02d", ($x = ' . calculer_liste($jour2, array(), $boucles, $parent) . ') ? $x : date("d"))'; $boucle = &$boucles[$idb]; $date = $boucle->id_table . ".$date"; if ($type == 'jour') $boucle->where[]= array("'AND'", array("'<='", "'DATE_FORMAT($date_deb, \'%Y%m%d\')'",("$annee . $mois . $jour")), array("'>='", "'DATE_FORMAT($date_fin, \'%Y%m%d\')'",("$annee . $mois . $jour"))); elseif ($type == 'mois') $boucle->where[]= array("'AND'", array("'<='", "'DATE_FORMAT($date_deb, \'%Y%m\')'",("$annee . $mois")), array("'>='", "'DATE_FORMAT($date_fin, \'%Y%m\')'",("$annee . $mois"))); elseif ($type == 'semaine') $boucle->where[]= array("'AND'", array("'>='", "'DATE_FORMAT($date_fin, \'%Y%m%d\')'", ("date_debut_semaine($annee, $mois, $jour)")), array("'<='", "'DATE_FORMAT($date_deb, \'%Y%m%d\')'", ("date_fin_semaine($annee, $mois, $jour)"))); elseif (count($crit->param) > 3) $boucle->where[]= array("'AND'", array("'>='", "'DATE_FORMAT($date_fin, \'%Y%m%d\')'", ("$annee . $mois . $jour")), array("'<='", "'DATE_FORMAT($date_deb, \'%Y%m%d\')'", ("$annee2 . $mois2 . $jour2"))); // sinon on prend tout } ?>style_public_plugin_agenda.html000066600000001457151454412660013030 0ustar00#CACHE{0} [(#REM) Ce squelette definit les styles de l'espace prive Note: l'entete "Vary:" sert a repousser l'entete par defaut "Vary: Cookie,Accept-Encoding", qui est (un peu) genant en cas de "rotation du cookie de session" apres un changement d'IP (effet de clignotement). ATTENTION: il faut absolument le charset sinon Firefox croit que c'est du text/html ! ] #CACHE{3600*100,cache-client} #HTTP_HEADER{Content-Type: text/css; charset=iso-8859-15} #HTTP_HEADER{Vary: Accept-Encoding} #SET{claire,##ENV{couleur_claire,edf3fe}} #SET{foncee,##ENV{couleur_foncee,3874b0}} #SET{left,#ENV{ltr}|choixsiegal{left,left,right}} #SET{right,#ENV{ltr}|choixsiegal{left,right,left}} [(#INCLURE{fond=prive/style_prive_plugin_agenda} {couleur_claire=#GET{claire}} {couleur_foncee=#GET{foncee}} {ltr=#GET{left}})]noisettes/agenda_jour.html000066600000004602151454412660011743 0ustar00[(#DATE_DEBUT|agenda_memo_full{#DATE_FIN,#TITRE,#DESCRIPTIF,#LIEU,#URL_ARTICLE, calendrier-couleur[(#ENV{theme,0}|modulo{14,1})]})][(#DATE|agenda_affiche_full{<:aucun_article:>, 'jour', calendrier-couleur[(#ENV{theme,0}|modulo{14,1})]})][(#TOTAL_BOUCLE|?{' ',''}) ] noisettes/agenda_periode.html000066600000000575151454412660012420 0ustar00[ (#DATE_DEBUT|Agenda_memo_full{#DATE_FIN,#TITRE,#DESCRIPTIF,#LIEU,#URL_ARTICLE, 'calendrier-couleur6'}) ][(#DATE| agenda_affiche_full{<:aucun_article:>, 'periode', 'calendrier-couleur6'} )]noisettes/agenda_mois.html000066600000000465151454412660011736 0ustar00[(#DATE_DEBUT|agenda_memo_full{#DATE_FIN,#TITRE,#DESCRIPTIF,#LIEU,#URL_ARTICLE, calendrier-couleur[(#ID_SECTEUR| modulo{14,1})]})][(#DATE| agenda_affiche_full{<:aucun_article:>, 'mois'} )]noisettes/agenda_semaine.html000066600000000633151454412660012405 0ustar00[(#DATE_DEBUT|agenda_memo_full{#DATE_FIN,#TITRE,#DESCRIPTIF,#LIEU,#URL_ARTICLE, [(#COMPTEUR_BOUCLE| alterner{'calendrier-couleur2', 'calendrier-couleur4'})]})][(#DATE| agenda_affiche_full{<:aucun_article:>, 'semaine', 'calendrier-couleur2','calendrier-couleur4'} )] agenda-ical.html000066600000001660151454412660007576 0ustar00#HTTP_HEADER{Content-type:text/calendar} #CACHE{3600} BEGIN:VCALENDAR VERSION:2.0 X-WR-TIMEZONE:Europe/Paris CALSCALE:GREGORIAN X-WR-CALNAME;VALUE=TEXT:[(#NOM_SITE_SPIP|filtrer_ical)] [X-WR-CALDESC:(#DESCRIPTIF_SITE_SPIP|supprimer_tags|filtrer_ical)] X-WR-RELCALID:[(#URL_SITE_SPIP|filtrer_ical)] BEGIN:VEVENT SUMMARY:[(#TITRE|filtrer_ical)] UID:evenement#ID_EVENEMENT @ [(#URL_SITE_SPIP|filtrer_ical)] [DTSTAMP:(#DATE_DEBUT|date_ical)] [DTSTART:(#DATE_DEBUT|date_ical)] [DTEND:(#DATE_FIN|date_ical)] [LOCATION:(#LIEU|PtoBR|filtrer_ical)] [DESCRIPTION:(#DESCRIPTIF|supprimer_tags|filtrer_ical)] CATEGORIES:[(#TITRE|filtrer_ical)] URL:[(#URL_ARTICLE|parametre_url{id_evenement,#ID_EVENEMENT}|url_absolue|filtrer_ical)] STATUS:CONFIRMED END:VEVENT END:VCALENDARprive/editer/evenement.html000066600000000666151454412660012045 0ustar00[(#REM) Un petit descriptif ne serait pas superflu ]
#ENV**{icone_retour} [

(#ENV{new}|intval|?{<:agenda:titre_cadre_modifier_evenement:>,<:agenda:titre_cadre_ajouter_evenement:>})

] [

(#ENV{new}|intval|?{##ENV{new}})

]
#FORMULAIRE_EDITER_EVENEMENT{#ENV{new},#ENV{id_article},#ENV{redirect},#ENV{lier_trad},#ENV{config_fonc},#ENV{row}}
prive/listes/rubriques-agenda.html000066600000001343151454412660013335 0ustar00#SET{self,#SELF|parametre_url{debut_rubriques,#EVAL{_request('debut_rubriques')}}}

<:agenda:rubriques:>

[(#REM) navigation par rubriques agenda] [

(#PAGINATION{page})

]
  • [(#GET{self}|parametre_url{id_rubrique,''}|aoustrong{<:agenda:toutes_rubriques:>,#ENV{id_rubrique,0}|=={0}})]
  • [(#GET{self}|parametre_url{id_rubrique,#ID_RUBRIQUE}|aoustrong{#TITRE|supprimer_numero{},#ENV{id_rubrique}|=={#ID_RUBRIQUE}})] (<:info_numero_abbreviation:>#ID_RUBRIQUE)
prive/listes/mois-evenements.html000066600000001000151454412660013203 0ustar00#SET{self,#SELF|parametre_url{debut_mois,#EVAL{_request('debut_mois')}}} [(#REM) navigation par mois] [

(#PAGINATION{page})

]
  • [(#GET{self}|parametre_url{date_debut,#DATE_DEBUT|affdate{Y-m-01}}|aoustrong{#DATE_DEBUT|affdate_mois_annee{},#ENV{date_debut,''}|=={#DATE_DEBUT|affdate{Y-m-01}}})]
prive/style_prive_plugin_agenda.html000066600000012040151454412660014012 0ustar00[(#REM) Ce squelette definit les styles de l'espace prive Note: l'entete "Vary:" sert a repousser l'entete par defaut "Vary: Cookie,Accept-Encoding", qui est (un peu) genant en cas de "rotation du cookie de session" apres un changement d'IP (effet de clignotement). ATTENTION: il faut absolument le charset sinon Firefox croit que c'est du text/html ! ] #CACHE{3600*100,cache-client} #HTTP_HEADER{Content-Type: text/css; charset=iso-8859-15} #HTTP_HEADER{Vary: Accept-Encoding} #SET{claire,##ENV{couleur_claire,edf3fe}} #SET{foncee,##ENV{couleur_foncee,3874b0}} #SET{left,#ENV{ltr}|choixsiegal{left,left,right}} #SET{right,#ENV{ltr}|choixsiegal{left,right,left}} #INCLURE{img_pack/datePicker.css} #INCLURE{img_pack/timePicker.css} .pagination a.creer {float:#GET{left};} /* vevent */ li.item div.vevent h3 {margin:0;font-size:1.1em;} li.item div.vevent p {margin:2px 0 0;} li.item div.vevent p.date {font-size: 0.98em; } ul.evenements li.item.court p { display: none; } li.item div.vevent p.category {font-size:0.9em;color:#999;} /* liste des evenements */ .plier_deplier { float: #GET{left}; font-size: 0.9em; } .evenements li.item { padding-left: 130px; } .evenements li.court { border-width: 1px; } .evenements li.item .jour { width: 120px; margin-left: -130px; float: #GET{left}; display: inline; position: relative; overflow: hidden; white-space: nowrap; font-size: 98%; } li.item .repetitions {margin-top:0.5em;font-size:0.9em;} li.court .repetitions {display: none;} li.item .repetitions ul, li.item .repetitions li {display:inline;margin:0;padding:0;} .evenements p.actions {text-align:right;font-size:0.9em;margin:5px 0 0;} /* sur la fiche rubriques */ .naviguer .agenda-statut {float:#GET{left};margin-#GET{right}:5px;} /* sur la fiche article */ .articles .fiche_objet #agenda { border: 1px solid #999;} .articles .fiche_objet #agenda h2.titre { margin: 0; padding: 4px 4px 8px; background: #GET{claire}; font-size: 100%; } .articles .fiche_objet .plier_deplier a:hover { color:#333;} .articles .fiche_objet .evenements { margin-left: 4px; margin-right: 4px; } .articles .fiche_objet .evenements li.item { padding-left: 120px; } .articles .fiche_objet .evenements li.item .jour { width: 110px; margin-left: -120px; } .articles .fiche_objet .evenements span.lien_article {display:none;} /* edition d'un evenement */ .formulaire_editer_evenement .editer_parent {padding-#GET{left}:10px;background:#fff;} .formulaire_editer_evenement .editer_parent label {margin-#GET{left}:0;display:block;float:left;padding:2px 0;} .formulaire_editer_evenement .editer_horaire {padding-top:0;margin-top:0;} .formulaire_editer_evenement .editer_horaire label {margin:0;display:inline;width:auto;float:none;} .formulaire_editer_evenement li.editer_date, .formulaire_editer_evenement li.editer_date li {clear:left;} .formulaire_editer_evenement li.editer_date_debut_fin label { vertical-align: top; } .formulaire_editer_evenement input.date {width:7em;padding-right:20px;} .formulaire_editer_evenement span.afficher_horaire label {float:none;display:inline;padding:0;margin:0;} .formulaire_editer_evenement input.heure {width:4em;} .formulaire_editer_evenement li.editer_date label.heure {display:none;} .formulaire_editer_evenement li.editer_date label {display:inline;float:none;margin:0;} .formulaire_editer_evenement .editer_inscription .choix {display:inline;} .formulaire_editer_evenement .editer_inscription .choix input.text {width:50px;vertical-align:top;} /* le picker */ a.dp-choose-date { display: inline-block; padding: 0; margin: 3px 0 0 -19px; vertical-align: bottom; } #repetitions_picker {float:left;} li.editer_repetitions textarea {float:left;width:110px;height:11em;} div.time-picker {font-size:11px; width:5em; /* needed for IE */} /* selecteur de mots */ .formulaire_editer_evenement li.editer_mots ul#mots_sel {display:block;} .formulaire_editer_evenement li.editer_mots ul#mots_sel li {padding:2px;background:#eee;border:1px solid #999;display:block;float:left;margin:0 4px 3px 0;width:auto;clear:none;font-size:0.9em;} .formulaire_editer_evenement li.editer_mots ul#mots_sel li em {display:none;} .formulaire_editer_evenement li.editer_mots ul#mots_sel li.show {font-weight:bold;} .formulaire_editer_evenement li.editer_mots .mots_chemin {clear:left;margin:1em 0 0.5em 0;border-bottom:1px solid #eee;} .formulaire_editer_evenement li.editer_mots ul.groupes_contenus {clear:left;} .formulaire_editer_evenement li.editer_mots ul.groupes_contenus li {padding:0;margin:0;border:0;clear:none;float:left;width:48%;margin-right:5px;} .formulaire_editer_evenement li.editer_mots ul.groupes_contenus li.groupe a {background:url(triangle-droite.gif) no-repeat center right;padding-right:12px;} .formulaire_editer_evenement li.editer_mots ul.groupes_contenus li.mot a {color:#GET{claire};} .formulaire_editer_evenement li.editer_repetitions div.ajouter_repetitions.cachee #repetitions_picker {display:none;} .formulaire_editer_evenement li.editer_repetitions div.ajouter_repetitions.cachee textarea {margin:0;padding:0;height:1px;visibility:hidden;} /* bug ff : si on le met hidden on ne peut plus saisir dedans apres */prive/navigation/agenda_evenements.html000066600000001274151454412660014406 0ustar00#SET{self,#SELF|parametre_url{id_evenement|date_debut,''}|parametre_url{debut_mois,#EVAL{_request('debut_mois')}}} [(#INCLURE{fond=prive/listes/rubriques-agenda}{ajax}{env}{self=#GET{self}})]prive/contenu/liste-evenements-post.html000066600000006246151454412660014530 0ustar00#SET{self,#SELF|parametre_url{date_debut|id_evenement|debut_agenda,''}}#SET{yena,''}

<:agenda:agenda:> : [(#TOTAL_BOUCLE|agenda_affiche_un_ou_plusieurs{agenda:info_un_evenement,agenda:info_nombre_evenements}|sinon{<:agenda:aucun_evenement:>})]#SET{yena,#TOTAL_BOUCLE|oui}

prive/contenu/agenda_evenements.html000066600000001632151454412660013720 0ustar00[(#REM) Se placer au debut du mois en cours par defaut] #SET{date_debut,#VAL{Y-m-}|date|concat{01}} [(#REM) Si un evenement passe, on commence par le jour de cet evenement] #SET{date_debut,#DATE_DEBUT|affdate{Y-m-d}} #SET{date_debut,#ENV{date}|affdate{Y-m-d}} #SET{date_debut,#ENV{date_debut,#GET{date_debut}}} [(#INCLURE{fond=prive/contenu/liste-evenements-post}{date_debut=#GET{date_debut}}{env}{ajax}) ]prive/contenu/evenements_article.html000066600000000207151454412660014121 0ustar00[(#REM) afficher les evenements de cet article]
genie/agenda_nettoyer_base.php000066600000001745151454412660012531 0ustar00javascript/jquery.datePicker.js000066600000107613151454412660012665 0ustar00/** * Copyright (c) 2007 Kelvin Luck (http://www.kelvinluck.com/) * Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) * and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses. * * $Id: jquery.datePicker.js 3739 2007-10-25 13:55:30Z kelvin.luck $ **/ (function($){ $.fn.extend({ /** * Render a calendar table into any matched elements. * * @param Object s (optional) Customize your calendars. * @option Number month The month to render (NOTE that months are zero based). Default is today's month. * @option Number year The year to render. Default is today's year. * @option Function renderCallback A reference to a function that is called as each cell is rendered and which can add classes and event listeners to the created nodes. Default is no callback. * @option Number showHeader Whether or not to show the header row, possible values are: $.dpConst.SHOW_HEADER_NONE (no header), $.dpConst.SHOW_HEADER_SHORT (first letter of each day) and $.dpConst.SHOW_HEADER_LONG (full name of each day). Default is $.dpConst.SHOW_HEADER_SHORT. * @option String hoverClass The class to attach to each cell when you hover over it (to allow you to use hover effects in IE6 which doesn't support the :hover pseudo-class on elements other than links). Default is dp-hover. Pass false if you don't want a hover class. * @type jQuery * @name renderCalendar * @cat plugins/datePicker * @author Kelvin Luck (http://www.kelvinluck.com/) * * @example $('#calendar-me').renderCalendar({month:0, year:2007}); * @desc Renders a calendar displaying January 2007 into the element with an id of calendar-me. * * @example * var testCallback = function($td, thisDate, month, year) * { * if ($td.is('.current-month') && thisDate.getDay() == 4) { * var d = thisDate.getDate(); * $td.bind( * 'click', * function() * { * alert('You clicked on ' + d + '/' + (Number(month)+1) + '/' + year); * } * ).addClass('thursday'); * } else if (thisDate.getDay() == 5) { * $td.html('Friday the ' + $td.html() + 'th'); * } * } * $('#calendar-me').renderCalendar({month:0, year:2007, renderCallback:testCallback}); * * @desc Renders a calendar displaying January 2007 into the element with an id of calendar-me. Every Thursday in the current month has a class of "thursday" applied to it, is clickable and shows an alert when clicked. Every Friday on the calendar has the number inside replaced with text. **/ renderCalendar : function(s) { var dc = function(a) { return document.createElement(a); }; s = $.extend( { month : null, year : null, renderCallback : null, showHeader : $.dpConst.SHOW_HEADER_SHORT, dpController : null, hoverClass : 'dp-hover' } , s ); if (s.showHeader != $.dpConst.SHOW_HEADER_NONE) { var headRow = $(dc('tr')); for (var i=Date.firstDayOfWeek; i 1) firstDayOffset -= 7; var weeksToDraw = Math.ceil(( (-1*firstDayOffset+1) + currentDate.getDaysInMonth() ) /7); currentDate.addDays(firstDayOffset-1); var doHover = function() { if (s.hoverClass) { $(this).addClass(s.hoverClass); } }; var unHover = function() { if (s.hoverClass) { $(this).removeClass(s.hoverClass); } }; var w = 0; while (w++' + $.dpText.TEXT_CHOOSE_DATE + '') .bind( 'click', function() { $this.dpDisplay(this); this.blur(); return false; } ); $this.after(controller.button); } if (!alreadyExists && $this.is(':text')) { $this .bind( 'dateSelected', function(e, selectedDate, $td) { this.value = selectedDate.asString(); } ).bind( 'change', function() { var d = Date.fromString(this.value); if (d) { controller.setSelected(d, true, true); } } ); if (s.clickInput) { $this.bind( 'click', function() { $this.dpDisplay(); } ); } var d = Date.fromString(this.value); if (this.value != '' && d) { controller.setSelected(d, true, true); } } $this.addClass('dp-applied'); } ) }, /** * Disables or enables this date picker * * @param Boolean s Whether to disable (true) or enable (false) this datePicker * @type jQuery * @name dpSetDisabled * @cat plugins/datePicker * @author Kelvin Luck (http://www.kelvinluck.com/) * * @example $('.date-picker').datePicker(); * $('.date-picker').dpSetDisabled(true); * @desc Prevents this date picker from displaying and adds a class of dp-disabled to it (and it's associated button if it has one) for styling purposes. If the matched element is an input field then it will also set the disabled attribute to stop people directly editing the field. **/ dpSetDisabled : function(s) { return _w.call(this, 'setDisabled', s); }, /** * Updates the first selectable date for any date pickers on any matched elements. * * @param String d A string representing the first selectable date (formatted according to Date.format). * @type jQuery * @name dpSetStartDate * @cat plugins/datePicker * @author Kelvin Luck (http://www.kelvinluck.com/) * * @example $('.date-picker').datePicker(); * $('.date-picker').dpSetStartDate('01/01/2000'); * @desc Creates a date picker associated with all elements with a class of "date-picker" then sets the first selectable date for each of these to the first day of the millenium. **/ dpSetStartDate : function(d) { return _w.call(this, 'setStartDate', d); }, /** * Updates the last selectable date for any date pickers on any matched elements. * * @param String d A string representing the last selectable date (formatted according to Date.format). * @type jQuery * @name dpSetEndDate * @cat plugins/datePicker * @author Kelvin Luck (http://www.kelvinluck.com/) * * @example $('.date-picker').datePicker(); * $('.date-picker').dpSetEndDate('01/01/2010'); * @desc Creates a date picker associated with all elements with a class of "date-picker" then sets the last selectable date for each of these to the first Janurary 2010. **/ dpSetEndDate : function(d) { return _w.call(this, 'setEndDate', d); }, /** * Gets a list of Dates currently selected by this datePicker. This will be an empty array if no dates are currently selected or NULL if there is no datePicker associated with the matched element. * * @type Array * @name dpGetSelected * @cat plugins/datePicker * @author Kelvin Luck (http://www.kelvinluck.com/) * * @example $('.date-picker').datePicker(); * alert($('.date-picker').dpGetSelected()); * @desc Will alert an empty array (as nothing is selected yet) **/ dpGetSelected : function() { var c = _getController(this[0]); if (c) { return c.getSelected(); } return null; }, /** * Selects or deselects a date on any matched element's date pickers. Deselcting is only useful on date pickers where selectMultiple==true. Selecting will only work if the passed date is within the startDate and endDate boundries for a given date picker. * * @param String d A string representing the date you want to select (formatted according to Date.format). * @param Boolean v Whether you want to select (true) or deselect (false) this date. Optional - default = true. * @param Boolean m Whether you want the date picker to open up on the month of this date when it is next opened. Optional - default = true. * @type jQuery * @name dpSetSelected * @cat plugins/datePicker * @author Kelvin Luck (http://www.kelvinluck.com/) * * @example $('.date-picker').datePicker(); * $('.date-picker').dpSetSelected('01/01/2010'); * @desc Creates a date picker associated with all elements with a class of "date-picker" then sets the selected date on these date pickers to the first Janurary 2010. When the date picker is next opened it will display Janurary 2010. **/ dpSetSelected : function(d, v, m) { if (v == undefined) v=true; if (m == undefined) m=true; return _w.call(this, 'setSelected', Date.fromString(d), v, m); }, /** * Sets the month that will be displayed when the date picker is next opened. If the passed month is before startDate then the month containing startDate will be displayed instead. If the passed month is after endDate then the month containing the endDate will be displayed instead. * * @param Number m The month you want the date picker to display. Optional - defaults to the currently displayed month. * @param Number y The year you want the date picker to display. Optional - defaults to the currently displayed year. * @type jQuery * @name dpSetDisplayedMonth * @cat plugins/datePicker * @author Kelvin Luck (http://www.kelvinluck.com/) * * @example $('.date-picker').datePicker(); * $('.date-picker').dpSetDisplayedMonth(10, 2008); * @desc Creates a date picker associated with all elements with a class of "date-picker" then sets the selected date on these date pickers to the first Janurary 2010. When the date picker is next opened it will display Janurary 2010. **/ dpSetDisplayedMonth : function(m, y) { return _w.call(this, 'setDisplayedMonth', Number(m), Number(y)); }, /** * Displays the date picker associated with the matched elements. Since only one date picker can be displayed at once then the date picker associated with the last matched element will be the one that is displayed. * * @param HTMLElement e An element that you want the date picker to pop up relative in position to. Optional - default behaviour is to pop up next to the element associated with this date picker. * @type jQuery * @name dpDisplay * @cat plugins/datePicker * @author Kelvin Luck (http://www.kelvinluck.com/) * * @example $('#date-picker').datePicker(); * $('#date-picker').dpDisplay(); * @desc Creates a date picker associated with the element with an id of date-picker and then causes it to pop up. **/ dpDisplay : function(e) { return _w.call(this, 'display', e); }, /** * Sets a function or array of functions that is called when each TD of the date picker popup is rendered to the page * * @param (Function|Array) a A function or an array of functions that are called when each td is rendered. Each function will receive four arguments; a jquery object wrapping the created TD, a Date object containing the date this TD represents, a number giving the currently rendered month and a number giving the currently rendered year. * @type jQuery * @name dpSetRenderCallback * @cat plugins/datePicker * @author Kelvin Luck (http://www.kelvinluck.com/) * * @example $('#date-picker').datePicker(); * $('#date-picker').dpSetRenderCallback(function($td, thisDate, month, year) * { * // do stuff as each td is rendered dependant on the date in the td and the displayed month and year * }); * @desc Creates a date picker associated with the element with an id of date-picker and then creates a function which is called as each td is rendered when this date picker is displayed. **/ dpSetRenderCallback : function(a) { return _w.call(this, 'setRenderCallback', a); }, /** * Sets the position that the datePicker will pop up (relative to it's associated element) * * @param Number v The vertical alignment of the created date picker to it's associated element. Possible values are $.dpConst.POS_TOP and $.dpConst.POS_BOTTOM * @param Number h The horizontal alignment of the created date picker to it's associated element. Possible values are $.dpConst.POS_LEFT and $.dpConst.POS_RIGHT * @type jQuery * @name dpSetPosition * @cat plugins/datePicker * @author Kelvin Luck (http://www.kelvinluck.com/) * * @example $('#date-picker').datePicker(); * $('#date-picker').dpSetPosition($.dpConst.POS_BOTTOM, $.dpConst.POS_RIGHT); * @desc Creates a date picker associated with the element with an id of date-picker and makes it so that when this date picker pops up it will be bottom and right aligned to the #date-picker element. **/ dpSetPosition : function(v, h) { return _w.call(this, 'setPosition', v, h); }, /** * Sets the offset that the popped up date picker will have from it's default position relative to it's associated element (as set by dpSetPosition) * * @param Number v The vertical offset of the created date picker. * @param Number h The horizontal offset of the created date picker. * @type jQuery * @name dpSetOffset * @cat plugins/datePicker * @author Kelvin Luck (http://www.kelvinluck.com/) * * @example $('#date-picker').datePicker(); * $('#date-picker').dpSetOffset(-20, 200); * @desc Creates a date picker associated with the element with an id of date-picker and makes it so that when this date picker pops up it will be 20 pixels above and 200 pixels to the right of it's default position. **/ dpSetOffset : function(v, h) { return _w.call(this, 'setOffset', v, h); }, /** * Closes the open date picker associated with this element. * * @type jQuery * @name dpClose * @cat plugins/datePicker * @author Kelvin Luck (http://www.kelvinluck.com/) * * @example $('.date-pick') * .datePicker() * .bind( * 'focus', * function() * { * $(this).dpDisplay(); * } * ).bind( * 'blur', * function() * { * $(this).dpClose(); * } * ); * @desc Creates a date picker and makes it appear when the relevant element is focused and disappear when it is blurred. **/ dpClose : function() { return _w.call(this, '_closeCalendar', false, this[0]); }, // private function called on unload to clean up any expandos etc and prevent memory links... _dpDestroy : function() { // TODO - implement this? } }); // private internal function to cut down on the amount of code needed where we forward // dp* methods on the jQuery object on to the relevant DatePicker controllers... var _w = function(f, a1, a2, a3) { return this.each( function() { var c = _getController(this); if (c) { c[f](a1, a2, a3); } } ); }; function DatePicker(ele) { this.ele = ele; // initial values... this.displayedMonth = null; this.displayedYear = null; this.startDate = null; this.endDate = null; this.showYearNavigation = null; this.closeOnSelect = null; this.displayClose = null; this.selectMultiple = null; this.verticalPosition = null; this.horizontalPosition = null; this.verticalOffset = null; this.horizontalOffset = null; this.button = null; this.renderCallback = []; this.selectedDates = {}; this.inline = null; this.context = '#dp-popup'; }; $.extend( DatePicker.prototype, { init : function(s) { this.setStartDate(s.startDate); this.setEndDate(s.endDate); this.setDisplayedMonth(Number(s.month), Number(s.year)); this.setRenderCallback(s.renderCallback); this.showYearNavigation = s.showYearNavigation; this.closeOnSelect = s.closeOnSelect; this.displayClose = s.displayClose; this.selectMultiple = s.selectMultiple; this.verticalPosition = s.verticalPosition; this.horizontalPosition = s.horizontalPosition; this.hoverClass = s.hoverClass; this.setOffset(s.verticalOffset, s.horizontalOffset); this.inline = s.inline; if (this.inline) { this.context = this.ele; this.display(); } }, setStartDate : function(d) { if (d) { this.startDate = Date.fromString(d); } if (!this.startDate) { this.startDate = (new Date()).zeroTime(); } this.setDisplayedMonth(this.displayedMonth, this.displayedYear); }, setEndDate : function(d) { if (d) { this.endDate = Date.fromString(d); } if (!this.endDate) { this.endDate = (new Date('12/31/2999')); // using the JS Date.parse function which expects mm/dd/yyyy } if (this.endDate.getTime() < this.startDate.getTime()) { this.endDate = this.startDate; } this.setDisplayedMonth(this.displayedMonth, this.displayedYear); }, setPosition : function(v, h) { this.verticalPosition = v; this.horizontalPosition = h; }, setOffset : function(v, h) { this.verticalOffset = parseInt(v) || 0; this.horizontalOffset = parseInt(h) || 0; }, setDisabled : function(s) { $e = $(this.ele); $e[s ? 'addClass' : 'removeClass']('dp-disabled'); if (this.button) { $but = $(this.button); $but[s ? 'addClass' : 'removeClass']('dp-disabled'); $but.attr('title', s ? '' : $.dpText.TEXT_CHOOSE_DATE); } if ($e.is(':text')) { $e.attr('disabled', s ? 'disabled' : ''); } }, setDisplayedMonth : function(m, y) { if (this.startDate == undefined || this.endDate == undefined) { return; } var s = new Date(this.startDate.getTime()); s.setDate(1); var e = new Date(this.endDate.getTime()); e.setDate(1); var t; if ((!m && !y) || (isNaN(m) && isNaN(y))) { // no month or year passed - default to current month t = new Date().zeroTime(); t.setDate(1); } else if (isNaN(m)) { // just year passed in - presume we want the displayedMonth t = new Date(y, this.displayedMonth, 1); } else if (isNaN(y)) { // just month passed in - presume we want the displayedYear t = new Date(this.displayedYear, m, 1); } else { // year and month passed in - that's the date we want! t = new Date(y, m, 1) } // check if the desired date is within the range of our defined startDate and endDate if (t.getTime() < s.getTime()) { t = s; } else if (t.getTime() > e.getTime()) { t = e; } this.displayedMonth = t.getMonth(); this.displayedYear = t.getFullYear(); /* Patch Cedric Morin 2008-09-13 pour les controleurs inline */ if (this.inline){ this._clearCalendar(); this._renderCalendar(); } }, setSelected : function(d, v, moveToMonth) { if (this.selectMultiple == false) { this.selectedDates = {}; $('td.selected', this.context).removeClass('selected'); } if (moveToMonth) { this.setDisplayedMonth(d.getMonth(), d.getFullYear()); } this.selectedDates[d.toString()] = v; }, isSelected : function(d) { return this.selectedDates[d.toString()]; }, getSelected : function() { var r = []; for(s in this.selectedDates) { if (this.selectedDates[s] == true) { r.push(Date.parse(s)); } } return r; }, display : function(eleAlignTo) { if ($(this.ele).is('.dp-disabled')) return; eleAlignTo = eleAlignTo || this.ele; var c = this; var $ele = $(eleAlignTo); var eleOffset = $ele.offset(); var $createIn; var attrs; var attrsCalendarHolder; var cssRules; if (c.inline) { $createIn = $(this.ele); attrs = { 'id' : 'calendar-' + this.ele._dpId, 'className' : 'dp-popup dp-popup-inline' }; cssRules = { }; } else { $createIn = $('body'); attrs = { 'id' : 'dp-popup', 'className' : 'dp-popup' }; cssRules = { 'top' : eleOffset.top + c.verticalOffset, 'left' : eleOffset.left + c.horizontalOffset }; var _checkMouse = function(e) { var el = e.target; var cal = $('#dp-popup')[0]; while (true){ if (el == cal) { return true; } else if (el == document) { c._closeCalendar(); return false; } else { el = $(el).parent()[0]; } } }; this._checkMouse = _checkMouse; this._closeCalendar(true); } $createIn .append( $('
') .attr(attrs) .css(cssRules) .append( $('

'), $('
') .append( $('<<') .bind( 'click', function() { return c._displayNewMonth.call(c, this, 0, -1); } ), $('<') .bind( 'click', function() { return c._displayNewMonth.call(c, this, -1, 0); } ) ), $('
') .append( $('>>') .bind( 'click', function() { return c._displayNewMonth.call(c, this, 0, 1); } ), $('>') .bind( 'click', function() { return c._displayNewMonth.call(c, this, 1, 0); } ) ), $('
') .attr('className', 'dp-calendar') ) .bgIframe() ); var $pop = this.inline ? $('.dp-popup', this.context) : $('#dp-popup'); if (this.showYearNavigation == false) { $('.dp-nav-prev-year, .dp-nav-next-year', c.context).css('display', 'none'); } if (this.displayClose) { $pop.append( $('' + $.dpText.TEXT_CLOSE + '') .bind( 'click', function() { c._closeCalendar(); return false; } ) ); } c._renderCalendar(); $(this.ele).trigger('dpDisplayed', $pop); if (!c.inline) { if (this.verticalPosition == $.dpConst.POS_BOTTOM) { $pop.css('top', eleOffset.top + $ele.height() - $pop.height() + c.verticalOffset); } if (this.horizontalPosition == $.dpConst.POS_RIGHT) { $pop.css('left', eleOffset.left + $ele.width() - $pop.width() + c.horizontalOffset); } $(document).bind('mousedown', this._checkMouse); } }, setRenderCallback : function(a) { if (a && typeof(a) == 'function') { a = [a]; } this.renderCallback = this.renderCallback.concat(a); }, cellRender : function ($td, thisDate, month, year) { var c = this.dpController; var d = new Date(thisDate.getTime()); // add our click handlers to deal with it when the days are clicked... $td.bind( 'click', function() { var $this = $(this); if (!$this.is('.disabled')) { c.setSelected(d, !$this.is('.selected') || !c.selectMultiple); var s = c.isSelected(d); $(c.ele).trigger('dateSelected', [d, $td, s]); $(c.ele).trigger('change'); if (c.closeOnSelect) { c._closeCalendar(); } else { $this[s ? 'addClass' : 'removeClass']('selected'); } } } ); if (c.isSelected(d)) { $td.addClass('selected'); } // call any extra renderCallbacks that were passed in for (var i=0; i 20) { $this.addClass('disabled'); } } ); var d = this.startDate.getDate(); $('.dp-calendar td.current-month', this.context).each( function() { var $this = $(this); if (Number($this.text()) < d) { $this.addClass('disabled'); } } ); } else { $('.dp-nav-prev-year', this.context).removeClass('disabled'); $('.dp-nav-prev-month', this.context).removeClass('disabled'); var d = this.startDate.getDate(); if (d > 20) { // check if the startDate is last month as we might need to add some disabled classes... var sd = new Date(this.startDate.getTime()); sd.addMonths(1); if (this.displayedYear == sd.getFullYear() && this.displayedMonth == sd.getMonth()) { $('dp-calendar td.other-month', this.context).each( function() { var $this = $(this); if (Number($this.text()) < d) { $this.addClass('disabled'); } } ); } } } if (this.displayedYear == this.endDate.getFullYear() && this.displayedMonth == this.endDate.getMonth()) { $('.dp-nav-next-year', this.context).addClass('disabled'); $('.dp-nav-next-month', this.context).addClass('disabled'); $('.dp-calendar td.other-month', this.context).each( function() { var $this = $(this); if (Number($this.text()) < 14) { $this.addClass('disabled'); } } ); var d = this.endDate.getDate(); $('.dp-calendar td.current-month', this.context).each( function() { var $this = $(this); if (Number($this.text()) > d) { $this.addClass('disabled'); } } ); } else { $('.dp-nav-next-year', this.context).removeClass('disabled'); $('.dp-nav-next-month', this.context).removeClass('disabled'); var d = this.endDate.getDate(); if (d < 13) { // check if the endDate is next month as we might need to add some disabled classes... var ed = new Date(this.endDate.getTime()); ed.addMonths(-1); if (this.displayedYear == ed.getFullYear() && this.displayedMonth == ed.getMonth()) { $('.dp-calendar td.other-month', this.context).each( function() { var $this = $(this); if (Number($this.text()) > d) { $this.addClass('disabled'); } } ); } } } }, _closeCalendar : function(programatic, ele) { if (!ele || ele == this.ele) { $(document).unbind('mousedown', this._checkMouse); this._clearCalendar(); $('#dp-popup a').unbind(); $('#dp-popup').empty().remove(); if (!programatic) { $(this.ele).trigger('dpClosed', [this.getSelected()]); } } }, // empties the current dp-calendar div and makes sure that all events are unbound // and expandos removed to avoid memory leaks... _clearCalendar : function() { // TODO. $('.dp-calendar td', this.context).unbind(); $('.dp-calendar', this.context).empty(); } } ); // static constants $.dpConst = { SHOW_HEADER_NONE : 0, SHOW_HEADER_SHORT : 1, SHOW_HEADER_LONG : 2, POS_TOP : 0, POS_BOTTOM : 1, POS_LEFT : 0, POS_RIGHT : 1 }; // localisable text $.dpText = { TEXT_PREV_YEAR : 'Previous year', TEXT_PREV_MONTH : 'Previous month', TEXT_NEXT_YEAR : 'Next year', TEXT_NEXT_MONTH : 'Next month', TEXT_CLOSE : 'Close', TEXT_CHOOSE_DATE : 'Choose date' }; // version $.dpVersion = '$Id: jquery.datePicker.js 3739 2007-10-25 13:55:30Z kelvin.luck $'; function _getController(ele) { if (ele._dpId) return $.event._dpCache[ele._dpId]; return false; }; // make it so that no error is thrown if bgIframe plugin isn't included (allows you to use conditional // comments to only include bgIframe where it is needed in IE without breaking this plugin). if ($.fn.bgIframe == undefined) { $.fn.bgIframe = function() {return this; }; }; // clean-up $(window) .bind('unload', function() { var els = $.event._dpCache || []; for (var i in els) { $(els[i].ele)._dpDestroy(); } }); })(jQuery);javascript/mots_evenements.js000066600000002046151454412660012501 0ustar00$(document).ready(function(){ if ($('ul#mots_sel').length) { $('ul#mots_sel li').removeClass('last'); $('ul#mots_sel li:last').addClass('last'); } }); function mot_sel_add(id_mot,titre,name){ if (!$('ul#mots_sel').length) $('div.mots_chemin').parents('li.editer_mots').find('label:first').after("
    "); var sel ='ul#mots_sel input[value='+id_mot+']'; $('ul#mots_sel li.show').removeClass('show'); if ($(sel).length==0){ $('ul#mots_sel li:last').removeClass('last'); $('ul#mots_sel').append('
  • ' +'' +titre +" " +"" +',
  • '); } else { $(sel).parent().addClass('show'); } } function mot_sel_remove(node){ $(node).parent().fadeOut('fast'); $('ul#mots_sel li').removeClass('show'); setTimeout(function(){ $(node).parent().remove(); $('ul#mots_sel li').removeClass('last'); $('ul#mots_sel li:last').addClass('last'); },400); }javascript/dates.js000066600000026372151454412660010376 0ustar00/* * Date prototype extensions. Doesn't depend on any * other code. Doens't overwrite existing methods. * * Adds dayNames, abbrDayNames, monthNames and abbrMonthNames static properties and isLeapYear, * isWeekend, isWeekDay, getDaysInMonth, getDayName, getMonthName, getDayOfYear, getWeekOfYear, * setDayOfYear, addYears, addMonths, addDays, addHours, addMinutes, addSeconds methods * * Copyright (c) 2006 J̦rn Zaefferer and Brandon Aaron (brandon.aaron@gmail.com || http://brandonaaron.net) * * Additional methods and properties added by Kelvin Luck: firstDayOfWeek, dateFormat, zeroTime, asString, fromString - * I've added my name to these methods so you know who to blame if they are broken! * * Dual licensed under the MIT and GPL licenses: * http://www.opensource.org/licenses/mit-license.php * http://www.gnu.org/licenses/gpl.html * */ /** * An Array of day names starting with Sunday. * * @example dayNames[0] * @result 'Sunday' * * @name dayNames * @type Array * @cat Plugins/Methods/Date */ Date.dayNames = ['', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday']; /** * An Array of abbreviated day names starting with Sun. * * @example abbrDayNames[0] * @result 'Sun' * * @name abbrDayNames * @type Array * @cat Plugins/Methods/Date */ Date.abbrDayNames = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat']; /** * An Array of month names starting with Janurary. * * @example monthNames[0] * @result 'January' * * @name monthNames * @type Array * @cat Plugins/Methods/Date */ Date.monthNames = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December']; /** * An Array of abbreviated month names starting with Jan. * * @example abbrMonthNames[0] * @result 'Jan' * * @name monthNames * @type Array * @cat Plugins/Methods/Date */ Date.abbrMonthNames = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']; /** * The first day of the week for this locale. * * @name firstDayOfWeek * @type Number * @cat Plugins/Methods/Date * @author Kelvin Luck */ Date.firstDayOfWeek = 1; /** * The format that string dates should be represented as (e.g. 'dd/mm/yyyy' for UK, 'mm/dd/yyyy' for US, 'yyyy-mm-dd' for Unicode etc). * * @name format * @type String * @cat Plugins/Methods/Date * @author Kelvin Luck */ Date.format = 'dd/mm/yyyy'; //Date.format = 'mm/dd/yyyy'; //Date.format = 'yyyy-mm-dd'; //Date.format = 'dd mmm yy'; /** * The first two numbers in the century to be used when decoding a two digit year. Since a two digit year is ambiguous (and date.setYear * only works with numbers < 99 and so doesn't allow you to set years after 2000) we need to use this to disambiguate the two digit year codes. * * @name format * @type String * @cat Plugins/Methods/Date * @author Kelvin Luck */ Date.fullYearStart = '20'; (function() { /** * Adds a given method under the given name * to the Date prototype if it doesn't * currently exist. * * @private */ function add(name, method) { if( !Date.prototype[name] ) { Date.prototype[name] = method; } }; /** * Checks if the year is a leap year. * * @example var dtm = new Date("01/12/2008"); * dtm.isLeapYear(); * @result true * * @name isLeapYear * @type Boolean * @cat Plugins/Methods/Date */ add("isLeapYear", function() { var y = this.getFullYear(); return (y%4==0 && y%100!=0) || y%400==0; }); /** * Checks if the day is a weekend day (Sat or Sun). * * @example var dtm = new Date("01/12/2008"); * dtm.isWeekend(); * @result false * * @name isWeekend * @type Boolean * @cat Plugins/Methods/Date */ add("isWeekend", function() { return this.getDay()==0 || this.getDay()==6; }); /** * Check if the day is a day of the week (Mon-Fri) * * @example var dtm = new Date("01/12/2008"); * dtm.isWeekDay(); * @result false * * @name isWeekDay * @type Boolean * @cat Plugins/Methods/Date */ add("isWeekDay", function() { return !this.isWeekend(); }); /** * Gets the number of days in the month. * * @example var dtm = new Date("01/12/2008"); * dtm.getDaysInMonth(); * @result 31 * * @name getDaysInMonth * @type Number * @cat Plugins/Methods/Date */ add("getDaysInMonth", function() { return [31,(this.isLeapYear() ? 29:28),31,30,31,30,31,31,30,31,30,31][this.getMonth()]; }); /** * Gets the name of the day. * * @example var dtm = new Date("01/12/2008"); * dtm.getDayName(); * @result 'Saturday' * * @example var dtm = new Date("01/12/2008"); * dtm.getDayName(true); * @result 'Sat' * * @param abbreviated Boolean When set to true the name will be abbreviated. * @name getDayName * @type String * @cat Plugins/Methods/Date */ add("getDayName", function(abbreviated) { return abbreviated ? Date.abbrDayNames[this.getDay()] : Date.dayNames[this.getDay()]; }); /** * Gets the name of the month. * * @example var dtm = new Date("01/12/2008"); * dtm.getMonthName(); * @result 'Janurary' * * @example var dtm = new Date("01/12/2008"); * dtm.getMonthName(true); * @result 'Jan' * * @param abbreviated Boolean When set to true the name will be abbreviated. * @name getDayName * @type String * @cat Plugins/Methods/Date */ add("getMonthName", function(abbreviated) { return abbreviated ? Date.abbrMonthNames[this.getMonth()] : Date.monthNames[this.getMonth()]; }); /** * Get the number of the day of the year. * * @example var dtm = new Date("01/12/2008"); * dtm.getDayOfYear(); * @result 11 * * @name getDayOfYear * @type Number * @cat Plugins/Methods/Date */ add("getDayOfYear", function() { var tmpdtm = new Date("1/1/" + this.getFullYear()); return Math.floor((this.getTime() - tmpdtm.getTime()) / 86400000); }); /** * Get the number of the week of the year. * * @example var dtm = new Date("01/12/2008"); * dtm.getWeekOfYear(); * @result 2 * * @name getWeekOfYear * @type Number * @cat Plugins/Methods/Date */ add("getWeekOfYear", function() { return Math.ceil(this.getDayOfYear() / 7); }); /** * Set the day of the year. * * @example var dtm = new Date("01/12/2008"); * dtm.setDayOfYear(1); * dtm.toString(); * @result 'Tue Jan 01 2008 00:00:00' * * @name setDayOfYear * @type Date * @cat Plugins/Methods/Date */ add("setDayOfYear", function(day) { this.setMonth(0); this.setDate(day); return this; }); /** * Add a number of years to the date object. * * @example var dtm = new Date("01/12/2008"); * dtm.addYears(1); * dtm.toString(); * @result 'Mon Jan 12 2009 00:00:00' * * @name addYears * @type Date * @cat Plugins/Methods/Date */ add("addYears", function(num) { this.setFullYear(this.getFullYear() + num); return this; }); /** * Add a number of months to the date object. * * @example var dtm = new Date("01/12/2008"); * dtm.addMonths(1); * dtm.toString(); * @result 'Tue Feb 12 2008 00:00:00' * * @name addMonths * @type Date * @cat Plugins/Methods/Date */ add("addMonths", function(num) { var tmpdtm = this.getDate(); this.setMonth(this.getMonth() + num); if (tmpdtm > this.getDate()) this.addDays(-this.getDate()); return this; }); /** * Add a number of days to the date object. * * @example var dtm = new Date("01/12/2008"); * dtm.addDays(1); * dtm.toString(); * @result 'Sun Jan 13 2008 00:00:00' * * @name addDays * @type Date * @cat Plugins/Methods/Date */ add("addDays", function(num) { this.setDate(this.getDate() + num); return this; }); /** * Add a number of hours to the date object. * * @example var dtm = new Date("01/12/2008"); * dtm.addHours(24); * dtm.toString(); * @result 'Sun Jan 13 2008 00:00:00' * * @name addHours * @type Date * @cat Plugins/Methods/Date */ add("addHours", function(num) { this.setHours(this.getHours() + num); return this; }); /** * Add a number of minutes to the date object. * * @example var dtm = new Date("01/12/2008"); * dtm.addMinutes(60); * dtm.toString(); * @result 'Sat Jan 12 2008 01:00:00' * * @name addMinutes * @type Date * @cat Plugins/Methods/Date */ add("addMinutes", function(num) { this.setMinutes(this.getMinutes() + num); return this; }); /** * Add a number of seconds to the date object. * * @example var dtm = new Date("01/12/2008"); * dtm.addSeconds(60); * dtm.toString(); * @result 'Sat Jan 12 2008 00:01:00' * * @name addSeconds * @type Date * @cat Plugins/Methods/Date */ add("addSeconds", function(num) { this.setSeconds(this.getSeconds() + num); return this; }); /** * Sets the time component of this Date to zero for cleaner, easier comparison of dates where time is not relevant. * * @example var dtm = new Date(); * dtm.zeroTime(); * dtm.toString(); * @result 'Sat Jan 12 2008 00:01:00' * * @name zeroTime * @type Date * @cat Plugins/Methods/Date * @author Kelvin Luck */ add("zeroTime", function() { this.setMilliseconds(0); this.setSeconds(0); this.setMinutes(0); this.setHours(0); return this; }); /** * Returns a string representation of the date object according to Date.format. * (Date.toString may be used in other places so I purposefully didn't overwrite it) * * @example var dtm = new Date("01/12/2008"); * dtm.asString(); * @result '12/01/2008' // (where Date.format == 'dd/mm/yyyy' * * @name asString * @type Date * @cat Plugins/Methods/Date * @author Kelvin Luck */ add("asString", function() { var r = Date.format; return r .split('yyyy').join(this.getFullYear()) .split('yy').join((this.getFullYear() + '').substring(2)) .split('mmm').join(this.getMonthName(true)) .split('mm').join(_zeroPad(this.getMonth()+1)) .split('dd').join(_zeroPad(this.getDate())); }); /** * Returns a new date object created from the passed String according to Date.format or false if the attempt to do this results in an invalid date object * (We can't simple use Date.parse as it's not aware of locale and I chose not to overwrite it incase it's functionality is being relied on elsewhere) * * @example var dtm = Date.fromString("12/01/2008"); * dtm.toString(); * @result 'Sat Jan 12 2008 00:00:00' // (where Date.format == 'dd/mm/yyyy' * * @name fromString * @type Date * @cat Plugins/Methods/Date * @author Kelvin Luck */ Date.fromString = function(s) { var f = Date.format; var d = new Date('01/01/1977'); var iY = f.indexOf('yyyy'); if (iY > -1) { d.setFullYear(Number(s.substr(iY, 4))); } else { // TODO - this doesn't work very well - are there any rules for what is meant by a two digit year? d.setFullYear(Number(Date.fullYearStart + s.substr(f.indexOf('yy'), 2))); } var iM = f.indexOf('mmm'); if (iM > -1) { var mStr = s.substr(iM, 3); for (var i=0; i'); var $tpList = $('
      '); // Build the list. for(var i = 0; i < times.length; i++) { $tpList.append("
    • " + times[i] + "
    • "); } $tpDiv.append($tpList); // Store element offset. var elmOffset = $(elm).offset(); // Append the timPicker to the body and position it. $tpDiv.appendTo('body').css({'top':elmOffset.top, 'left':elmOffset.left}).hide(); $("li", $tpList).unbind().mouseover(function() { $("li.selected", $tpDiv).removeClass("selected"); // TODO: only needs to run once. $(this).addClass("selected"); }).mousedown(function() { tpOver = true; }).click(function() { setTimeVal(elm, this, $tpDiv, settings); tpOver = false; }); // Store ananymous function in variable since it's used twice. var showPicker = function() { $tpDiv.show(); // Show picker. $tpDiv.mouseover(function() { // Have to use mouseover instead of mousedown because of Opera tpOver = true; }).mouseout(function() { tpOver = false; }); $("li", $tpDiv).removeClass("selected"); // Try to find a time in the list that matches the entered time. var time = this.value ? timeStringToDate(this.value, settings) : startTime; var startMin = startTime.getHours() * 60 + startTime.getMinutes(); var min = (time.getHours() * 60 + time.getMinutes()) - startMin; var steps = Math.round(min / settings.step); var roundTime = normaliseTime(new Date(2001, 0, 0, 0, (steps * settings.step + (startMin)), 0)); roundTime = (startTime < roundTime && roundTime < endTime) ? roundTime : startTime; var $matchedTime = $("li:contains(" + formatTime(roundTime, settings) + ")", $tpDiv); if ($matchedTime.length) { $matchedTime.addClass("selected"); // Scroll to matched time. $tpDiv[0].scrollTop = $matchedTime[0].offsetTop; } }; $(elm).unbind().focus(showPicker).click(showPicker) // Hide timepicker on blur .blur(function() { if (!tpOver && $tpDiv[0].parentNode) { // Don't remove when timePicker is clicked or when already removed $tpDiv.hide(); } }) // Key support .keypress(function(e) { switch (e.keyCode) { case 38: // Up arrow. case 63232: // Safari up arrow. var $selected = $("li.selected", $tpList); var prev = $selected.prev().addClass("selected")[0]; if (prev) { $selected.removeClass("selected"); $tpDiv[0].scrollTop = prev.offsetTop; } return false; break; case 40: // Down arrow. case 63233: // Safari down arrow. var $selected = $("li.selected", $tpList); var next = $selected.length ? $selected.next().addClass("selected")[0] : $("li:first").addClass("selected")[0]; if (next) { $selected.removeClass("selected"); $tpDiv[0].scrollTop = next.offsetTop; } return false; break; case 13: // Enter if (!$tpDiv.is(":hidden")) { var sel = $("li.selected", $tpList)[0]; setTimeVal(elm, sel, $tpDiv, settings); return false; } break; } }); // Helper function to get an inputs current time as Date object. // Returns a Date object. this.getTime = function() { return timeStringToDate(elm.value, settings); }; // Helper function to set a time input. // Takes a Date object. this.setTime = function(time) { elm.value = formatTime(normaliseTime(time), settings); // Trigger element's change events. $(elm).change(); }; }; // End fn; // Plugin defaults. $.fn.timePicker.defaults = { step:30, startTime: new Date(0, 0, 0, 0, 0, 0), endTime: new Date(0, 0, 0, 23, 30, 0), separator: ':', show24Hours: true }; // Private functions. function setTimeVal(elm, sel, $tpDiv, settings) { // Update input field elm.value = $(sel).text(); // Trigger element's change events. $(elm).change(); // Keep focus for all but IE (which doesn't like it) if (!$.browser.msie) { elm.focus(); } // Hide picker $tpDiv.hide(); } function formatTime(time, settings) { var h = time.getHours(); var hours = settings.show24Hours ? h : (((h + 11) % 12) + 1); var minutes = time.getMinutes(); return formatNumber(hours) + settings.separator + formatNumber(minutes) + (settings.show24Hours ? '' : ((h < 12) ? ' AM' : ' PM')); } function formatNumber(value) { return (value < 10 ? '0' : '') + value; } function timeStringToDate(input, settings) { if (input) { var array = input.split(settings.separator); var hours = parseFloat(array[0]); var minutes = parseFloat(array[1]); var time = new Date(0, 0, 0, hours, minutes, 0); return normaliseTime(time); } return null; } /* Normalise time object to a common date. */ function normaliseTime(time) { time.setFullYear(2001); time.setMonth(0); time.setDate(0); return time; } })(jQuery); agenda_autoriser.php000066600000004442151454412660010611 0ustar00inc/agenda_filtres.php000066600000017537151454412660011026 0ustar00"; $dtend = ""; $dtabbr = ""; } $date_debut = strtotime($date_debut); $date_fin = strtotime($date_fin); $d = date("Y-m-d", $date_debut); $f = date("Y-m-d", $date_fin); $h = $horaire=='oui'; $hd = date("H:i",$date_debut); $hf = date("H:i",$date_fin); $au = " " . strtolower(_T('agenda:evenement_date_au')); $du = _T('agenda:evenement_date_du') . " "; $s = ""; if ($d==$f) { // meme jour $s = ucfirst(nom_jour($d,$abbr))." ".affdate_jourcourt($d); if ($h) $s .= " $hd"; $s = "$dtstart$s$dtabbr"; if ($h AND $hd!=$hf) $s .= "-$dtend$hf$dtabbr"; } else if ((date("Y-m",$date_debut))==date("Y-m",$date_fin)) { // meme annee et mois, jours differents if ($h){ $s = $du . $dtstart . affdate_jourcourt($d) . " $hd" . $dtabbr; $s .= $au . $dtend . affdate_jourcourt($f); if ($hd!=$hf) $s .= " $hf"; $s .= $dtabbr; } else { $s = $du . $dtstart . jour($d) . $dtabbr; $s .= $au . $dtend . affdate_jourcourt($f) . $dtabbr; } } else if ((date("Y",$date_debut))==date("Y",$date_fin)) { // meme annee, mois et jours differents $s = $du . $dtstart . affdate_jourcourt($d); if ($h) $s .= " $hd"; $s .= $dtabbr . $au . $dtend . affdate_jourcourt($f); if ($h) $s .= " $hf"; $s .= $dtabbr; } else { // tout different $s = $du . $dtstart . affdate($d); if ($h) $s .= " ".date("(H:i)",$date_debut); $s .= $dtabbr . $au . $dtend. affdate($f); if ($h) $s .= " ".date("(H:i)",$date_fin); $s .= $dtabbr; } return unicode2charset(charset2unicode(strtr($s,$trans_tbl),'')); } function agenda_dateplus($date,$secondes,$format){ $date = strtotime($date)+eval("return $secondes;"); // permet de passer une expression return date($format,$date); } /** * Afficher un message "une truc"/"N trucs" * * @param int $nb * @return string */ function agenda_affiche_un_ou_plusieurs($nb,$chaine_un,$chaine_plusieurs,$var='nb'){ if (!$nb=intval($nb)) return ""; if ($nb>1) return _T($chaine_plusieurs, array($var => $nb)); else return _T($chaine_un); } function agenda_memo_full($date_deb=0, $date_fin=0 , $titre='', $descriptif='', $lieu='', $url='', $cal='') { static $agenda = array(); if (!$date_deb) { $res = $agenda; $agenda=array(); return $res; } $url=str_replace("&","&",$url); $idatedeb = date_ical($date_deb); $idatefin = date_ical($date_fin); $cal = trim($cal); // func_get_args (filtre alterner) rajoute \n !!!! $startday1=explode(' ',$date_deb); $startday1=$startday1['0'].' 00:00:00'; $ts_startday1=strtotime($startday1); $ts_date_fin=strtotime($date_fin); $maxdays=365; while (($ts_startday1<=$ts_date_fin)&&($maxdays-->0)) { $day=date('Y-m-d H:i:s',$ts_startday1); $agenda[$cal][(date_anneemoisjour($day))][] = array( 'CATEGORIES' => $cal, 'DTSTART' => $idatedeb, 'DTEND' => $idatefin, 'DESCRIPTION' => $descriptif, 'SUMMARY' => $titre, 'LOCATION' => $lieu, 'URL' => $url); $ts_startday1 += 26*3600; // le jour suivant : +26 h pour gerer les changements d'heure $ts_startday1 = mktime(0, 0, 0, date("m",$ts_startday1), date("d",$ts_startday1), date("Y",$ts_startday1)); // et remise a zero de l'heure } // toujours retourner vide pour qu'il ne se passe rien return ""; } function agenda_memo_evt_full($date_deb=0, $date_fin=0 , $titre='', $descriptif='', $lieu='', $url='', $cal='') { static $evenements = array(); if (!$date_deb) return $evenements; $url=str_replace("&","&",$url); $idatedeb = date_ical(reset(explode(" ",$date_deb))." 00:00:00"); $idatefin = date_ical(reset(explode(" ",$date_fin))." 00:00:00"); $cal = trim($cal); // func_get_args (filtre alterner) rajoute \n !!!! $startday1=explode(' ',$date_deb); $startday1=$startday1['0'].' 00:00:00'; $ts_startday1=strtotime($startday1); $ts_date_fin=strtotime($date_fin); $maxdays=365; while (($ts_startday1<=$ts_date_fin)&&($maxdays-->0)) { $day=date('Y-m-d H:i:s',$ts_startday1); $evenements[$cal][(date_anneemoisjour($day))][] = array( 'CATEGORIES' => $cal, 'DTSTART' => $idatedeb, 'DTEND' => $idatefin, 'DESCRIPTION' => $descriptif, 'SUMMARY' => $titre, 'LOCATION' => $lieu, 'URL' => $url); $ts_startday1 += 26*3600; // le jour suivant : +26 h pour gerer les changements d'heure $ts_startday1 = mktime(0, 0, 0, date("m",$ts_startday1), date("d",$ts_startday1), date("Y",$ts_startday1)); // et remise a zero de l'heure } // toujours retourner vide pour qu'il ne se passe rien return ""; } function agenda_affiche_full($i) { $args = func_get_args(); $nb = array_shift($args); // nombre d'evenements (on pourrait l'afficher) $sinon = array_shift($args); if (!$nb) return $sinon; $type = array_shift($args); $agenda = agenda_memo_full(0); $evt_avec = array(); foreach (($args ? $args : array_keys($agenda)) as $k) { if (isset($agenda[$k])&&is_array($agenda[$k])) foreach($agenda[$k] as $d => $v) { $evt_avec[$d] = isset($evt_avec[$d]) ? (array_merge($evt_avec[$d], $v)) : $v; } } $evenements = agenda_memo_evt_full(0); $evt_sans = array(); foreach (($args ? $args : array_keys($evenements)) as $k) { if (isset($evenements[$k])&&is_array($evenements[$k])) foreach($evenements[$k] as $d => $v) { $evt_sans[$d] = isset($evt_sans[$d]) ? (array_merge($evt_sans[$d], $v)) : $v; } } if ($type != 'periode') $evt = array($evt_sans, $evt_avec); else { $d = array_keys($evt_avec); $mindate = min($d); $min = substr($mindate,6,2); $max = $min + ((strtotime(max($d)) - strtotime($mindate)) / (3600 * 24)); if ($max < 31) $max = 0; $evt = array($evt_sans, $evt_avec, $min, $max); $type = 'mois'; } include_spip('inc/agenda'); $texte=http_calendrier_init('', $type, '', '', self(), $evt); return $texte; } // decale les mois de la date. // cette fonction peut raboter le jour si le nouveau mois ne les contient pas // exemple 31/01/2007 + 1 mois => 28/02/2007 function agenda_moisdecal($date,$decalage,$format){ include_spip('inc/filtres'); $date_array = recup_date($date); if ($date_array) list($annee, $mois, $jour) = $date_array; if (!$jour) $jour=1; if (!$mois) $mois=1; $mois2 = $mois + $decalage; $date2 = mktime(1, 1, 1, $mois2, $jour, $annee); // mois normalement attendu $mois3 = date('m', mktime(1, 1, 1, $mois2, 1, $annee)); // et si le mois de la nouvelle date a moins de jours... $mois2 = date('m', $date2); if ($mois2 - $mois3) $date2 = mktime(1, 1, 1, $mois2, 0, $annee); return date($format, $date2); } // decale les jours de la date. function agenda_jourdecal($date,$decalage,$format){ include_spip('inc/filtres'); $date_array = recup_date($date); if ($date_array) list($annee, $mois, $jour) = $date_array; if (!$jour) $jour=1; if (!$mois) $mois=1; $jour2 = $jour + $decalage; $date2 = mktime(1, 1, 1, $mois, $jour2, $annee); return date($format, $date2); } ?> inc/agenda_gestion.php000066600000002120151454412660011004 0ustar00_test/test_boucle_evenements.html000066600000000244151454412660013325 0ustar00 #ID_EVENEMENT: plop _test/testagenda.html000066600000001150151454412660010700 0ustar00

      {id_mot}

      • #TITRE
        • #TITRE

      {titre_mot}

      • #TITRE

      {branche}

      • #TITRE
        • #TITRE
      agenda_fonctions.php000066600000010060151454412660010567 0ustar00type_requete; $_date = isset($crit->param[0]) ? calculer_liste($crit->param[0], array(), $boucles, $boucles[$idb]->id_parent) : "'".(isset($GLOBALS['table_date'][$type])?$GLOBALS['table_date'][$type]:"date")."'"; $date = $boucle->id_table. '.' .substr($_date,1,-1); // annuler une eventuelle fusion sur cle primaire ! foreach($boucles[$idb]->group as $k=>$g) if ($g==$boucle->id_table.'.'.$boucle->primary) unset($boucles[$idb]->group[$k]); $boucles[$idb]->group[] = 'DATE_FORMAT('.$boucle->id_table.'.".'.$_date.'.", ' . "'$format')"; $boucles[$idb]->select[] = 'DATE_FORMAT('.$boucle->id_table.'.".'.$_date.'.", ' . "'$format') AS $as"; } function critere_fusion_par_jour($idb, &$boucles, $crit) { agenda_critere_fusion_par_xx('%Y-%m-%d','jour',$idb, $boucles, $crit); } function critere_fusion_par_mois($idb, &$boucles, $crit) { agenda_critere_fusion_par_xx('%Y-%m','mois',$idb, $boucles, $crit); } function critere_fusion_par_annee($idb, &$boucles, $crit) { agenda_critere_fusion_par_xx('%Y','annee',$idb, $boucles, $crit); } function agenda_mini($i) { $args = func_get_args(); $une_date = array_shift($args); // une date comme balise $sinon = array_shift($args); if (!$une_date) return $sinon; $type = 'mini'; $agenda = Agenda_memo_full(0); $evt = array(); foreach (($args ? $args : array_keys($agenda)) as $k) { if (is_array($agenda[$k])) foreach($agenda[$k] as $d => $v) { $evt[$d] = $evt[$d] ? (array_merge($evt[$d], $v)) : $v; } } $la_date = mktime(0, 0, 0, mois($une_date), 1, annee($une_date)); include_spip('inc/agenda'); return http_calendrier_init($la_date, $type, '', '', '', array('', $evt)); } function http_calendrier_mini($annee, $mois, $jour, $echelle, $partie_cal, $script, $ancre, $evt) { list($sansduree, $evenements, $premier_jour, $dernier_jour) = $evt; if ($sansduree) foreach($sansduree as $d => $r) { $evenements[$d] = !$evenements[$d] ? $r : array_merge($evenements[$d], $r); } if (!$premier_jour) $premier_jour = '01'; if (!$dernier_jour) { $dernier_jour = 31; while (!(checkdate($mois,$dernier_jour,$annee))) $dernier_jour--; } // affichage du debut de semaine hors periode $ligne = ''; $debut = date("w",mktime(1,1,1,$mois,$premier_jour,$annee)); for ($i=$debut ? $debut : 7;$i>1;$i--) { $mois_precedent = mktime(1,1,1,$mois-1,1,$annee); $jour_mois_precedent = date('t', $mois_precedent)+2-$i; $ligne .= "\n\t$jour_mois_precedent"; } $total = ''; for ($j=$premier_jour; $j<=$dernier_jour; $j++) { $nom = mktime(1,1,1,$mois,$j,$annee); $jour = date("d",$nom); $jour_semaine = date("w",$nom); $mois_en_cours = date("m",$nom); $annee_en_cours = date("Y",$nom); $amj = date("Y",$nom) . $mois_en_cours . $jour; if ($jour_semaine==1 AND $ligne != '') { $total .= "\n$ligne\n"; $ligne = ''; } $evts = $evenements[$amj]; $class=""; if ($evts) { $nb_elmts= @count($evts); if ($nb_elmts>1){ $evts = "".intval($jour).""; } else{ $evts = "".intval($jour).""; } $class='occupe'; } else { $evts = intval($jour); $class='libre'; } $ligne .= "\n\t" . $evts . "\n\t"; } $jour_mois_suivant=1; // affichage de la fin de semaine hors periode for($j=$jour_semaine ? $jour_semaine : 7; $j<7; $j++) { $ligne .= "\n\t".$jour_mois_suivant++.""; } return $total . ($ligne ? "\n$ligne\n" : ''); } ?> lang/agenda_es.php000066600000003132151454412660010117 0ustar00 'Cancelar', 'activite_editoriale' => 'Actividad editorial', 'ajouter_un_evenement' => 'Añadir un evento a éste artículo', 'texte_agenda' => 'AGENDA', 'titre_cadre_ajouter_evenement' => 'Añadir un evento', 'titre_cadre_modifier_evenement' => 'Modificar un evento', 'item_mots_cles_association_evenements' => 'a los eventos', 'info_un_evenement' => 'un evento,', 'info_nombre_evenements' => '@nb@ eventos,', 'info_evenements' => 'Eventos', 'evenements' => 'Eventos', 'evenement_titre' => 'Título', 'evenement_descriptif' => 'Descripción', 'evenement_lieu' => 'Lugar', 'evenement_date' => 'Fecha', 'evenement_date_de' => 'De ', 'evenement_date_du' => 'Del ', 'evenement_date_a' => 'a las ', 'evenement_date_au' => 'Hasta ', 'evenement_date_a_immediat' => 'a las ', 'evenement_date_debut' => 'Fecha de comienzo', 'evenement_date_fin' => 'Fecha de fin', 'lien_retirer_evenement' => 'Suprimir', 'evenement_horaire' => 'Horario', 'titre_sur_l_agenda' => "Sobre la agenda", 'icone_creer_evenement' => 'Creación de un nuevo evento', 'evenement_repetitions' => 'Repeticiones', 'nb_repetitions' => '@nb@ repeticiones', 'une_repetition' => '1 repetición', 'repetition_de' => "Repetición de", 'nb_mots_clefs' => '@nb@ palabras clave', 'un_mot_clef' => '1 palabra clave', 'sans_titre' => "(con título)", 'evenement_autres_occurences' => "Otras ocurrencias:", 'bouton_supprimer' => "Suprimir", ); ?> lang/agenda_nl.php000066600000003101151454412660010115 0ustar00 'Annuleren', 'activite_editoriale' => 'Hoofdactiviteit', 'ajouter_un_evenement' => 'een gebeurtenis toevoegen aan dit artikel', 'texte_agenda' => 'AGENDA', 'titre_cadre_ajouter_evenement' => 'Een gebeurtenis toevoegen', 'titre_cadre_modifier_evenement' => 'Een gebeurtenis wijzigen', 'item_mots_cles_association_evenements' => 'aan de gebeurtenissen', 'info_un_evenement' => 'een gebeurtenis,', 'info_nombre_evenements' => '@nb@ gebeurtenissen,', 'info_evenements' => 'Gebeurtenissen', 'evenements' => 'Gebeurtenissen', 'evenement_titre' => 'Titel', 'evenement_descriptif' => 'Beschrijvend', 'evenement_lieu' => 'Plaats', 'evenement_date' => 'Date', 'evenement_date_de' => 'Van ', 'evenement_date_du' => 'Van ', 'evenement_date_a' => 'tot ', 'evenement_date_au' => 'Tot ', 'evenement_date_a_immediat' => 'om ', 'evenement_date_debut' => 'Aanvangsdatum', 'evenement_date_fin' => 'Einddatum', 'lien_retirer_evenement' => 'Afschaffen', 'evenement_horaire' => 'Dienstregeling', 'titre_sur_l_agenda' => "Op de agenda", 'icone_creer_evenement' => 'Een nieuwe gebeurtenis creëren', 'evenement_repetitions' => 'Herhalingen', 'nb_repetitions' => '@nb@ herhalingen', 'une_repetition' => '1 herhaling', 'repetition_de' => "Herhaling van", 'nb_mots_clefs' => '@nb@ trefwoorden', 'un_mot_clef' => '1 trefwoord', 'sans_titre' => "(zonder titel)", 'evenement_autres_occurences' => "Andere omstandigheden:", 'bouton_supprimer' => "Afschaffen", ); ?> lang/agenda_en.php000066600000002725151454412660010121 0ustar00 'Escape', 'activite_editoriale' => 'Editorial activity', 'ajouter_un_evenement' => 'add one event to this article', 'texte_agenda' => 'DIARY', 'titre_cadre_ajouter_evenement' => 'Add one event', 'titre_cadre_modifier_evenement' => 'Modify one event', 'item_mots_cles_association_evenements' => 'to those events', 'info_un_evenement' => 'one event', 'info_nombre_evenements' => '@nb@ events', 'info_evenements' => 'Events', 'evenements' => 'Events', 'evenement_titre' => 'Title', 'evenement_descriptif' => 'Description', 'evenement_lieu' => 'Location', 'evenement_date' => 'Date', 'evenement_date_de' => 'From ', 'evenement_date_du' => 'From ', 'evenement_date_a' => 'to ', 'evenement_date_au' => 'To ', 'evenement_date_a_immediat' => 'at ', 'evenement_date_debut' => 'Starting date', 'evenement_date_fin' => 'Ending date', 'lien_retirer_evenement' => 'Deleted ', 'evenement_horaire' => 'Schedule', 'titre_sur_l_agenda' => "On diary", 'icone_creer_evenement' => 'Generate a new event', 'evenement_repetitions' => 'Repetition', 'nb_repetitions' => '@nb@ repetitions', 'une_repetition' => '1 repetition', 'repetition_de' => "Repetition of", 'nb_mots_clefs' => '@nb@ keywords', 'un_mot_clef' => '1 keyword', 'sans_titre' => "(without title)", 'evenement_autres_occurences' => "Other occurences :", 'bouton_supprimer' => "Delete", ); ?>lang/agenda_de.php000066600000003077151454412660010110 0ustar00 'Storno', 'activite_editoriale' => 'editoriale Aktivität', 'ajouter_un_evenement' => 'diesem Artikel ein event hinzufügen', 'texte_agenda' => 'AGENDA', 'titre_cadre_ajouter_evenement' => 'Event hinzufügen', 'titre_cadre_modifier_evenement' => 'Event umändern', 'item_mots_cles_association_evenements' => 'zu den events', 'info_un_evenement' => 'ein event', 'info_nombre_evenements' => '@nb_evenements@ event', 'info_evenements' => 'Event', 'evenements' => 'Event', 'evenement_titre' => 'Titel', 'evenement_descriptif' => 'Beschreibung', 'evenement_lieu' => 'Ort', 'evenement_date' => 'Datum', 'evenement_date_de' => 'Von ', 'evenement_date_du' => 'Vom ', 'evenement_date_a' => 'im ', 'evenement_date_au' => 'bis ', 'evenement_date_a_immediat' => 'zu ', 'evenement_date_debut' => 'Anfangsdatum', 'evenement_date_fin' => 'Enddatum', 'lien_retirer_evenement' => 'Löschen', 'evenement_horaire' => 'Zeitplan', 'titre_sur_l_agenda' => 'Im Agenda', 'icone_creer_evenement' => 'Neue Veranstaltung anlegen', 'evenement_repetitions' => 'Wiederholungen', 'nb_repetitions' => '@nb@ Wiederholungen', 'une_repetition' => '1 Wiederholung', 'repetition_de' => 'Wiederholung von', 'nb_mots_clefs' => '@nb@ Schlagworte', 'un_mot_clef' => '1 Schlagwort', 'sans_titre' => 'ohne Titel', 'evenement_autres_occurences' => 'Autres occurences :', 'bouton_supprimer' => 'Löschen', ); ?> lang/agenda_fr.php000066600000010475151454412660010127 0ustar00 'Votre absence est enregistrée', 'activite_editoriale' => 'Activité Éditoriale', 'afficher_calendrier' => 'Afficher le calendrier', 'ajouter_un_evenement' => 'ajouter un événement à cet article', 'ajouter_repetition' => 'Ajouter des répétitions', 'ajouter_mots_cles' => 'Ajouter des mots-clés', 'agenda' => 'Agenda', 'annee_precedente' => 'anée précédente', 'annee_suivante' => 'année suivante', 'aucun_evenement' => 'aucun événement', 'aucune_rubrique_mode_agenda' => 'Par défaut, toutes les rubriques permettent d\'utiliser les événements. Si vous activez le mode agenda sur une ou plusieurs rubriques, la gestion des événements sera limitée a sa branche.', 'bouton_annuler' => 'Annuler', 'bouton_supprimer' => "Supprimer", 'creer_evenement' => "Créer un événement", 'erreur_article_manquant' => 'Vous devez indiquer un article', 'erreur_article_interdit' => 'Vous n\'avez pas le droit d\'associer cet événement à cet article', 'evenement_article' => 'Associé à l\'article', 'evenement_autres_occurences' => "Autres occurences :", 'evenement_descriptif' => 'Descriptif', 'evenement_horaire' => 'Toute la journée', 'evenement_lieu' => 'Lieu', 'evenement_adresse' => 'Adresse', 'evenement_titre' => 'Titre', 'evenement_date' => 'Date', 'evenement_date_de' => 'De ', 'evenement_date_du' => 'Du ', 'evenement_date_a' => 'à ', 'evenement_date_au' => 'Au ', 'evenement_date_a_immediat' => 'à ', 'evenement_date_debut' => 'Date de début', 'evenement_date_fin' => 'Date de fin', 'evenement_repetitions' => 'Répétitions', 'evenements' => 'Événements', 'evenements_a_venir'=>'À venir', 'evenements_depuis_debut'=>'Tous', 'fermer' => 'fermer', 'groupes_mots'=>'Groupes de mots-clé', 'icone_creer_evenement' => 'Créer un nouvel événement', 'item_mots_cles_association_evenements' => 'aux événements', 'info_un_evenement' => '1 événement', 'info_nombre_evenements' => '@nb@ événements', 'info_aucun_evenement' => 'Aucun événement', 'info_evenements' => 'Événements', 'lien_retirer_evenement' => 'Supprimer', 'label_inscription' => 'Inscription en ligne', 'label_places' => 'Limiter le nombre de places', 'label_reponse_jyparticipe' => 'J\'y serai', 'label_reponse_jyparticipe_peutetre' => 'J\'y serai peut-être', 'label_reponse_jyparticipe_pas' => 'Je n\'y vais pas', 'label_vous_inscrire' => 'Votre participation', 'mois_precedent' => 'mois précédent', 'mois_suivant' => 'mois suivant', 'nb_mots_clefs' => '@nb@ mots-clés', 'nb_repetitions' => '@nb@ répétitions', 'probleme_technique' => 'Un problème technique est survenu. Reessayez plus tard.', 'participation_prise_en_compte' => 'Votre participation est enregistrée', 'participation_incertaine_prise_en_compte' => 'Votre participation éventuelle est enregistrée', 'rubriques' => 'Rubriques Agenda', 'rubrique_dans_une_rubrique_mode_agenda' => 'Cette rubrique permet d\'utiliser les événements car elle est dans une rubrique dont le mode agenda a été activé', 'rubrique_sans_gestion_evenement' => 'Le mode agenda n\'est pas activé pour cette rubrique', 'rubrique_mode_agenda' => 'Le mode agenda est activé pour cette rubrique et sa branche', 'rubrique_activer_agenda' => 'Activer le mode agenda pour cette rubrique', 'rubrique_desactiver_agenda' => 'Desactiver le mode agenda pour cette rubrique', 'sans_titre' => "(sans titre)", 'toutes_rubriques' => 'Toutes', 'texte_agenda' => 'AGENDA', 'titre_sur_l_agenda' => "Sur l'agenda", 'titre_cadre_ajouter_evenement' => 'Ajouter un événement', 'titre_cadre_modifier_evenement' => 'Modifier un événement', 'repetition_de' => "Répétition de", 'un_mot_clef' => '1 mot-clé', 'une_repetition' => '1 répétition', 'voir_evenements_rubrique' => 'Voir les événements de la rubrique', ); ?>plugin.xml000066600000003722151454412660006604 0ustar00 Agenda 2.0 img_pack/agenda-48.png [Cédric MORIN->http://www.yterium.net], [b_b->http://www.spip-contrib.net/b_b], [romy.tetue.net->http://romy.tetue.net] GPL 3 - © 2006-2008 2.0.2 stable Agenda Evénementiel http://www.spip-contrib.net/article2858 agenda_options.php agenda_fonctions.php agenda base/agenda_upgrade.php autoriser agenda_autoriser.php declarer_tables_interfaces base/agenda_evenements.php declarer_tables_principales base/agenda_evenements.php declarer_tables_auxiliaires base/agenda_evenements.php ajouter_onglets agenda_pipelines.php affiche_milieu agenda_pipelines.php editer_contenu_objet agenda_pipelines.php libelle_association_mots agenda_pipelines.php taches_generales_cron agenda_pipelines.php objets_extensibles agenda_pipelines.php img_pack/agenda-24.png agenda:agenda agenda-rss.html000066600000004246151454412660007500 0ustar00[(#HTTP_HEADER{Content-type: text/xml[; charset=(#CHARSET)]})] [Agenda (#NOM_SITE_SPIP|texte_backend)] #URL_SITE_SPIP/ [(#DESCRIPTIF_SITE_SPIP|supprimer_tags|texte_backend)] #LANG SPIP - www.spip.net [ [(#NOM_SITE_SPIP|texte_backend)] (#LOGO_SITE_SPIP||image_reduire{150,150}|extraire_attribut{src}|url_absolue|texte_backend) #URL_SITE_SPIP/ [(#LOGO_SITE_SPIP||image_reduire{150,150}|extraire_attribut{height})] [(#LOGO_SITE_SPIP||image_reduire{150,150}|extraire_attribut{width})] ] [(#TITRE|texte_backend)] [(#URL_ARTICLE|parametre_url{id_evenement,#ID_EVENEMENT}|url_absolue)] [(#URL_ARTICLE|parametre_url{id_evenement,#ID_EVENEMENT}|url_absolue)] #DATE_DEBUT [(#DATE_DEBUT|date_iso)] text/html [(#LANG)] [(#REM) Le bloc qui suit diffuse l'evenement a la mode RSS ] [(#DATE_DEBUT|Agenda_affdate_debut_fin{#DATE_FIN,#HORAIRE}|texte_backend)][ - (#LIEU|PtoBR|texte_backend)] [(#DESCRIPTIF|texte_backend)] [(#REM) Le bloc qui suit diffuse aussi le texte integral de l'evenement, ce qui permet une syndication plus riche (mais plus "lourde"). Fonction desactivable depuis les reglages du site.] [(#CONFIG{syndication_integrale}|=={oui}|?{' ',''}) [(#LOGO_ARTICLE|right||texte_backend)] <div class='rss_texte'> [(#DATE_DEBUT|Agenda_affdate_debut_fin{#DATE_FIN,#HORAIRE}|texte_backend)][ - (#LIEU|PtoBR|texte_backend)] [(#DESCRIPTIF|texte_backend)] </div> ] action/editer_evenement.php000066600000024056151454412660012077 0ustar00 $update_titre, "descriptif" => $update_descriptif, "lieu" => $update_lieu, "horaire" => $horaire, "date_debut" => $update_date_debut, "date_fin" => $update_date_fin, "id_article" => $id_article),"id_evenement=".intval($row['id_evenement'])); agenda_action_revision_evenement_mots($row['id_evenement'], $liste_mots); } else { // il est supprime sql_delete("spip_mots_evenements","id_evenement=".$row['id_evenement']); sql_delete("spip_evenements","id_evenement=".$row['id_evenement']); } } // regarder les repetitions a ajouter foreach($repetitions as $date){ if (!in_array($date,$repetitions_updated)){ $update_date_debut = date('Y-m-d',$date)." ".date('H:i:s',$date_debut); $update_date_fin = date('Y-m-d H:i:s',strtotime($update_date_debut)+$duree); $update_titre = $titre; $update_descriptif = $descriptif; $update_lieu = $lieu; if ($id_evenement_new = agenda_action_insert_evenement($id_article,$id_evenement)) { // mettre a jour l'evenement sql_updateq('spip_evenements', array( "titre" => $update_titre, "descriptif" => $update_descriptif, "lieu" => $update_lieu, "horaire" => $horaire, "date_debut" => $update_date_debut, "date_fin" => $update_date_fin, "id_article" => $id_article),"id_evenement=".intval($id_evenement_new)); agenda_action_revision_evenement_mots($id_evenement_new, $liste_mots); } } } } } function agenda_action_revision_evenement_mots($id_evenement,$liste_mots){ // suppression des mots obsoletes $cond_in = $cond_not_in = ""; if (count($liste_mots)){ $cond_not_in = sql_in('id_mot', join(',',$liste_mots), 'NOT'); $cond_in = sql_in('id_mot', join(',',$liste_mots)); } sql_delete("spip_mots_evenements", "id_evenement=".intval($id_evenement) . ($cond_in?" AND ".$cond_not_in:"")); $liste_deja = array(); if ($cond_in) $liste_deja = sql_allfetsel("id_mot", "spip_mots_evenements", "id_evenement=".intval($id_evenement) . " AND $cond_in"); if (count($liste_deja)) { $cond_not_in = sql_in('id_mot', join(',',array_map('reset',$liste_deja)), 'NOT'); $liste_mots = sql_allfetsel('id_mot','spip_mots',"$cond_in AND $cond_not_in"); $liste_mots = array_map('reset',$liste_mots); } if (count($liste_mots)) { $ins = array(); foreach($liste_mots as $k=>$id_mot) $ins[] = array('id_evenement'=>$id_evenement,'id_mot'=>$id_mot); sql_insertq_multi("spip_mots_evenements", $ins); } } // creer un nouvel evenement function agenda_action_insert_evenement($id_article,$id_evenement_source = 0){ include_spip('inc/autoriser'); if (!autoriser('creerevenementdans','article',$id_article)) return false; // nouvel evenement $id_evenement = sql_insertq("spip_evenements", array("id_evenement_source"=>intval($id_evenement_source), "maj"=>"NOW()", 'id_article'=>intval($id_article))); if (!$id_evenement){ spip_log("agenda action formulaire article : impossible d'ajouter un evenement"); return false; } return $id_evenement; } // Enregistre une revision d'evenement function agenda_action_revision_evenement ($id_evenement, $c=false) { if ($c['id_parent']) { // Si l'article est publie, invalider les caches et demander sa reindexation $t = sql_getfetsel("statut", "spip_articles", "id_article=".intval($c['id_parent'])); if ($t == 'publie') { $invalideur = "id='id_article/$id_article'"; $indexation = true; } } modifier_contenu('evenement', $id_evenement, array( 'nonvide' => array('titre' => _T('info_sans_titre')), 'invalideur' => $invalideur, 'indexation' => $indexation ), $c); return ''; // pas d'erreur } // $c est un array ('statut', 'id_parent' = changement de rubrique) function agenda_action_instituer_evenement($id_evenement, $c) { include_spip('inc/autoriser'); include_spip('inc/modifier'); $row = sql_fetsel("id_article", "spip_evenements", "id_evenement=".intval($id_evenement)); $id_parent = $row['id_article']; $champs = array(); if (!autoriser('modifier', 'article', $id_parent) OR (!autoriser('modifier', 'article', $c['id_parent']))){ spip_log("editer_evenement $id_evenement refus " . join(' ', $c)); return false; } // Verifier que la rubrique demandee existe et est differente // de la rubrique actuelle if ($c['id_parent'] AND $c['id_parent'] != $id_parent AND (sql_fetsel('1', "spip_articles", "id_article=".intval($c['id_parent'])))) { $champs['id_article'] = $c['id_parent']; } // Envoyer aux plugins $champs = pipeline('pre_edition', array( 'args' => array( 'table' => 'spip_evenements', 'id_objet' => $id_evenement ), 'data' => $champs ) ); if (!count($champs)) return; // Envoyer les modifs sur l'evenement et toutes ses repetitons $ids = array_map('reset',sql_allfetsel('id_evenement','spip_evenements','id_evenement_source='.intval($id_evenement))); $ids[] = intval($id_evenement); sql_updateq('spip_evenements',$champs,sql_in('id_evenement',$ids)); // Invalider les caches include_spip('inc/invalideur'); suivre_invalideur("id='id_article/$id_parent'"); suivre_invalideur("id='id_article/".$champs['id_article']."'"); // Pipeline pipeline('post_edition', array( 'args' => array( 'table' => 'spip_evenements', 'id_objet' => $id_evenement ), 'data' => $champs ) ); // Notifications if ($notifications = charger_fonction('notifications', 'inc')) { $notifications('instituerevenement', $id_evenement, array('id_parent' => $champs['id_article'], 'id_parent_ancien' => $id_parent) ); } return ''; // pas d'erreur } function agenda_action_supprime_repetitions($supp_evenement){ $res = sql_select("id_evenement", "spip_evenements", "id_evenement_source=".intval($supp_evenement)); while ($row = sql_fetch($res)){ $id_evenement = $row['id_evenement']; sql_delete("spip_mots_evenements", "id_evenement=".intval($id_evenement)); sql_delete("spip_evenements", "id_evenement=".intval($id_evenement)); } } function agenda_action_supprime_evenement($id_article,$supp_evenement){ $id_evenement = sql_getfetsel("id_evenement", "spip_evenements", array( "id_article=" . intval($id_article), "id_evenement=" . intval($supp_evenement))); if (intval($id_evenement) AND $id_evenement == $supp_evenement){ sql_delete("spip_mots_evenements", "id_evenement=".intval($id_evenement)); sql_delete("spip_evenements", "id_evenement=".intval($id_evenement)); agenda_action_supprime_repetitions($id_evenement); } include_spip('inc/invalideur'); suivre_invalideur("article/$id_article"); $id_evenement = 0; return $id_evenement; } ?>action/supprimer_evenement.php000066600000001050151454412660012636 0ustar00$id_article))){ include_spip("action/editer_evenement"); agenda_action_supprime_evenement($id_article,$id_evenement); } } ?>action/rubrique_activer_agenda.php000066600000000652151454412660013423 0ustar000) sql_updateq('spip_rubriques',array('agenda'=>1),'id_rubrique='.intval($arg)); else sql_updateq('spip_rubriques',array('agenda'=>0),'id_rubrique='.(-intval($arg))); } } ?>ical-agenda.html000066600000001327151454412660007576 0ustar00#HTTP_HEADER{content-type:text/calendar} BEGIN:VCALENDAR CALSCALE:GREGORIAN X-WR-CALNAME;VALUE=TEXT:[(#TITRE|filtrer_ical)] [[(#NOM_SITE_SPIP|filtrer_ical)]] X-WR-RELCALID:#URL_SITE_SPIP BEGIN:VEVENT SUMMARY:[(#TITRE|filtrer_ical)] UID:evenement#ID_EVENEMENT @ #URL_SITE_SPIP DTSTAMP:[(#DATE_DEBUT|date_ical)] DTSTART:[(#DATE_DEBUT|date_ical)] DTEND:[(#DATE_FIN|date_ical)] CATEGORIES:[(#TITRE|filtrer_ical)] DESCRIPTION:[(#DESCRIPTIF|filtrer_ical)]\n[<:lieu:>(#LIEU|filtrer_ical)] STATUS:CONFIRMED END:VEVENT END:VCALENDAR modeles/evenement_vevent.html000066600000001025151454412660012451 0ustar00

      #TITRE

      [

      (#DATE_DEBUT|agenda_affdate_debut_fin{#DATE_FIN,#HORAIRE,'hcal'})

      ] [
      (#DESCRIPTIF)
      ] [

      (#LIEU)[(#ADRESSE|PtoBR)]

      ]

      #TITRE

      agenda_options.php000066600000001514151454412660010264 0ustar00substr(rtrim(_DIR_PLUGIN_AGENDA,'/'),strlen(_DIR_PLUGINS))),false,'enleve'); ecrire_meta('plugin_erreur_activation','Agenda necessite le vrai SPIP-Bonux'); //die('echec:'.md5($contenu).":"._BONUX_CSS_MD5_FORMULAIRES); } } ?>agenda_pipelines.php000066600000011040151454412660010554 0ustar00'; else { if (sql_countsel('spip_rubriques',sql_in('id_rubrique',calcul_hierarchie_in($id_rubrique))." AND agenda=1 AND id_rubrique<>".intval($id_rubrique))){ $res .= _T('agenda:rubrique_dans_une_rubrique_mode_agenda').'
      '; $activer = false; $statut="-ok-48"; $voir = _T('agenda:voir_evenements_rubrique'); } elseif(!$actif) { $res .= _T('agenda:rubrique_sans_gestion_evenement').'
      '; $statut="-non-24"; } if ($actif){ $res .= _T('agenda:rubrique_mode_agenda').'
      '; $statut="-ok-48"; $voir = _T('agenda:voir_evenements_rubrique'); } } if (!$actif){ if($activer){ $res .= ""._T('agenda:rubrique_activer_agenda').''; } } else $res .= ""._T('agenda:rubrique_desactiver_agenda').''; if ($voir) $res .= "

      $voir

      "; if ($res) $flux['data'] .= "
      $res
      "; } if ($exec=='articles'){ $id_article = $flux['args']['id_article']; $afficher = true; // un article avec des evenements a toujours le bloc if (!sql_countsel('spip_evenements','id_article='.intval($id_article))){ // si au moins une rubrique a le flag agenda if (sql_countsel('spip_rubriques','agenda=1')){ // alors il faut le flag agenda dans cette branche ! $afficher = false; include_spip('inc/rubriques'); $in = calcul_hierarchie_in(sql_getfetsel('id_rubrique','spip_articles','id_article='.intval($id_article))); $afficher = sql_countsel('spip_rubriques',sql_in('id_rubrique',$in)." AND agenda=1"); } } if ($afficher) { $contexte = array(); foreach($_GET as $key=>$val) $contexte[$key] = $val; $evenements = recuperer_fond('prive/contenu/evenements_article',$contexte); $flux['data'] .= $evenements; } } return $flux; } function agenda_taches_generales_cron($taches_generales){ $taches_generales['agenda_nettoyer_base'] = 3600*48; return $taches_generales; } function agenda_editer_contenu_objet($flux){ if ($flux['args']['type']=='groupe_mot'){ // ajouter l'input sur les evenements $checked = in_array('evenements',$flux['args']['contexte']['tables_liees']); $checked = $checked?" checked='checked'":''; $input = "
      "; $flux['data'] = str_replace('',"$input\n",$flux['data']); } return $flux; } function agenda_libelle_association_mots($libelles){ $libelles['evenements'] = 'agenda:info_evenements'; return $libelles; } function agenda_objets_extensibles($objets){ return array_merge($objets, array('evenement' => _T('agenda:evenements'))); } ?> agenda.html000066600000002005151454412660006662 0ustar00 <:icone_agenda:> - [(#NOM_SITE_SPIP|textebrut)] [] [(#ENV{type, mois}|agenda_connu)]