Dotclear

Changeset 1001


Ignore:
Timestamp:
04/07/09 00:21:17 (14 years ago)
Author:
JcDenis
Message:

eventdata: Add a menu on the events page

Location:
plugins/eventdata
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • plugins/eventdata/README.txt

    r986 r1001  
    376376L'URL de la page public des événements. (S'utilise comme {{tpl:BlogURL}} ) 
    377377 
     378"EventPageNav" 
     379Supporte les attribus communs. 
     380Menu de choix de période d'événement à afficher. (ex: Non débuté, En cours, etc...) 
     381Un attribu supplémantaire est ajouté: "menus", il permet de limiter le menu à des choix prédéfinis parmis les suivants: 
     382 'ongoing','outgoing','notstarted','started','notfinished','finished','all'. Par exemple pour limiter le menu à 2 choix  
     383il faut utiliser {{tpl:EventPageNav menus="notstarted,ongoing"}} ce qui donnera le menu suivant: 
     384"<div id="event_nav"><ul><li><a href="...">Non débuté</a></li><li><a href="...">En cours</a></li></ul></div>" 
     385Si un tri est reconnu la balise "li" prendra la class "active". 
     386 
    378387"EventPeriod" 
    379388Supporte les attribus communs. 
    380389Affiche dans quel periode se trouve l'entrée courante.  
    381390Par exemple si le billet en cours à un événement associé qui est terminé, la period sera "finished" 
    382 Un attribu suplémentaire est ajouté: "strict", si il est présent, une des valeurs "sheduled", "ongoing", "finished" sera retourné,  
     391Un attribu suplémentaire est ajouté: "strict", si il est présent, une des valeurs "scheduled", "ongoing", "finished" sera retourné,  
    383392cela peut servir pour les CSS par exemple. 
    384393 
  • plugins/eventdata/_define.php

    r986 r1001  
    1717     /* Description*/         "Add period to your posts", 
    1818     /* Author */             "JC Denis", 
    19      /* Version */            '0.3.2', 
     19     /* Version */            '0.3.3', 
    2020     /* Permissions */        'usage,contentadmin' 
    2121); 
    22      /* date */          #20090402 
     22     /* date */          #20090407 
    2323?> 
  • plugins/eventdata/_public.php

    r990 r1001  
    1717__('Events'); 
    1818__('Dates of events'); 
    19 __('scheduled'); 
     19__('all'); 
     20__('ongoing'); 
     21__('outgoing'); 
     22__('notstarted'); 
     23__('started'); 
     24__('notfinished'); 
    2025__('finished'); 
    21 __('ongoing'); 
    2226__('From %S to %E'); 
    2327 
     
    4751     $core->tpl->addValue('EventPageTitle',array('eventdataPublic','EventPageTitle')); 
    4852     $core->tpl->addValue('EventPageDescription',array('eventdataPublic','EventPageDescription')); 
     53     $core->tpl->addValue('EventPageNav',array('eventdataPublic','EventPageNav')); 
    4954 
    5055     $core->tpl->addBlock('EntryEventDates',array('eventdataPublic','EntryEventDates')); 
     
    6772     $core->tpl->addValue('EventPageTitle',array('eventdataPublic','EventDisableValue')); 
    6873     $core->tpl->addValue('EventPageDescription',array('eventdataPublic','EventDisableValue')); 
     74     $core->tpl->addValue('EventPageNav',array('eventdataPublic','EventDisableValue')); 
    6975 
    7076     $core->tpl->addBlock('EntryEventDates',array('eventdataPublic','EventDisableBlock')); 
     
    177183          $start = isset($attr['start']) ? '"'.addslashes($attr['start']).'"' : 'null'; 
    178184          $end = isset($attr['end']) ? '"'.addslashes($attr['end']).'"' : 'null'; 
    179           $sort = isset($attr['order']) && strtoupper($attr['order']) == 'ASC' ? 'ASC' : 'DESC'; 
     185          $sort = isset($attr['order']) && strtoupper($attr['order']) == 'ASC' ? '"ASC"' : '"DESC"'; 
    180186 
    181187          return 
     
    322328          else 
    323329               return '<?php echo '.sprintf($f,'$core->blog->settings->event_tpl_desc').'; ?>'; 
     330     } 
     331     # Navigation menu for public page 
     332     public static function EventPageNav($attr) 
     333     { 
     334          global $core,$_ctx; 
     335          $f = $core->tpl->getFilters($attr); 
     336           
     337          $menu = array( 
     338               __('All') => 'all', 
     339               __('Ongoing') => 'ongoing', 
     340               __('Outgoing') => 'outgoing', 
     341               __('Not started') => 'notstarted', 
     342               __('Started') => 'started', 
     343               __('Not finished') => 'notfinished', 
     344               __('Finished') => 'finished' 
     345          ); 
     346 
     347          if (isset($attr['menus'])) { 
     348               $attr_menu = array(); 
     349               $attr_menus = explode(',',$attr['menus']); 
     350               foreach($attr_menus AS $k => $v) { 
     351                    if (in_array($v,$menu)) 
     352                         $attr_menu[$menu[$v]] = $v; 
     353               } 
     354               if (!empty($attr_menu)) 
     355                    $menu = $attr_menu; 
     356          } 
     357          $res = ''; 
     358          foreach($menu AS $k => $v) { 
     359               $res .= $_ctx->post_params['period'] == $v ? '<li class="active">' : '<li>'; 
     360               $res .= '<a href="'.self::EventPageURL('').'/'.$v.'"><?php echo '.sprintf($f,'"'.$k.'"').'; ?></a></li>'; 
     361          } 
     362 
     363          return empty($res) ? '' : '<div id="event_nav"><ul>'.$res.'</ul></div>'; 
    324364     } 
    325365     # Posts list with events (like Entries) 
  • plugins/eventdata/default-templates/eventdata-default/eventdata.css

    r960 r1001  
    2222  background: transparent url(eventstheme/eventsongoing.png) no-repeat 0px 2px; 
    2323} 
    24  
    2524.post-info-co .post-events { 
    2625  line-height: 20px; 
     
    2827  background: transparent url(eventstheme/eventsicon.png) no-repeat 0 0; 
    2928} 
     29#event_nav { 
     30} 
     31#event_nav li { 
     32  display: -moz-inline-box; 
     33  -moz-box-orient: vertical; 
     34  display: inline-block; 
     35  vertical-align: top; 
     36  word-wrap: break; 
     37  height: 100%; 
     38  margin: 0 20px 0 0; 
     39  padding: 0 0 10px 0; 
     40  font-size: 1em; 
     41} 
     42#event_nav li.active a { 
     43} 
     44* html #event_nav li { /* IE6 */ 
     45  display: inline; 
     46} 
     47*+html #event_nav li { /* IE7 */ 
     48  display: inline; 
     49} 
     50#event_nav li a { 
     51} 
     52#event_nav li a:hover, #nav li a:focus { 
     53  text-decoration: none; 
     54} 
  • plugins/eventdata/default-templates/eventdata-default/events.html

    r960 r1001  
    5858  <div id="content-info"> 
    5959    <h2>{{tpl:EventPageTitle encode_html="1"}}</h2> 
     60  {{tpl:EventPageNav}} 
    6061    {{tpl:EventPageDescription}} 
    6162 
     
    6566 
    6667  </div> 
    67    
    6868   
    6969  <tpl:EventEntries> 
  • plugins/eventdata/default-templates/eventdata-noviny/eventdata.css

    r960 r1001  
    11* .post-events { 
    2      margin: 5px; 
    3      padding: 5px; 
    4      border-bottom: 1px solid #e9dfc6; 
     2  margin: 5px; 
     3  padding: 5px; 
     4  border-bottom: 1px solid #e9dfc6; 
    55} 
    66* .post-events h2 { 
    7      font-family: Helvetica,FreeSans,Arial,"Liberation Sans","Nimbus Sans L",sans-serif; 
    8      font-size: 1.4em; 
    9      font-weight: bold; 
    10      color: #8c6f4a; 
     7  font-family: Helvetica,FreeSans,Arial,"Liberation Sans","Nimbus Sans L",sans-serif; 
     8  font-size: 1.4em; 
     9  font-weight: bold; 
     10  color: #8c6f4a; 
    1111} 
    1212* .post-events li { 
     
    2727  background: #fff url(eventstheme/eventsongoing.png) no-repeat 0px 3px; 
    2828} 
     29#event_nav { 
     30  position: relative; 
     31  bottom: -10px; 
     32  left: 0; 
     33  width: 710px; 
     34} 
     35#event_nav li { 
     36  display: -moz-inline-box; 
     37  -moz-box-orient: vertical; 
     38  display: inline-block; 
     39  vertical-align: top; 
     40  word-wrap: break; 
     41  height: 100%; 
     42  margin: 0 20px 0 0; 
     43  padding: 0 0 10px 0; 
     44  font-size: 1em; 
     45  color: #8c6f4a; 
     46} 
     47#event_nav li.active a { 
     48  color: #8c6f4a; 
     49} 
     50* html #event_nav li { /* IE6 */ 
     51  display: inline; 
     52} 
     53*+html #event_nav li { /* IE7 */ 
     54  display: inline; 
     55} 
     56#event_nav li a { 
     57  color: #2e6da3 
     58} 
     59#event_nav li a:hover, #nav li a:focus { 
     60  text-decoration: none; 
     61  color: #998f76; 
     62} 
  • plugins/eventdata/default-templates/eventdata-noviny/events.html

    r960 r1001  
    6161         
    6262        <h2>{{tpl:EventPageTitle encode_html="1"}}</h2> 
     63      {{tpl:EventPageNav}} 
    6364      </div> 
    64        
    6565      <!-- # meta --> 
    6666      <div id="meta" class="grid-s"> 
  • plugins/eventdata/locales/fr/main.po

    r986 r1001  
    1010#: _widgets.php:30 
    1111#: index.php:226 
    12 #: index.php:230 
     12#: index.php:231 
    1313msgid "Events" 
    1414msgstr "Evénements" 
     
    5858msgstr "Dates d'événements" 
    5959 
     60#: _public.php:19 
     61msgid "all" 
     62msgstr "tous" 
     63 
    6064#: _public.php:20 
    61 #: _public.php:289 
     65#: _public.php:294 
     66#: inc/lib.eventdata.list.php:139 
     67msgid "ongoing" 
     68msgstr "en cours" 
     69 
     70#: _public.php:21 
     71msgid "outgoing" 
     72msgstr "pas en cours" 
     73 
     74#: _public.php:22 
     75msgid "notstarted" 
     76msgstr "non débuté" 
     77 
     78#: _public.php:23 
     79msgid "started" 
     80msgstr "débuté" 
     81 
     82#: _public.php:24 
     83msgid "notfinished" 
     84msgstr "non terminé" 
     85 
     86#: _public.php:25 
     87#: _public.php:296 
    6288#: inc/lib.eventdata.list.php:137 
    6389msgid "finished" 
    6490msgstr "terminé" 
    6591 
    66 #: _public.php:21 
    67 #: _public.php:287 
    68 #: inc/lib.eventdata.list.php:139 
    69 msgid "ongoing" 
    70 msgstr "en cours" 
    71  
    72 #: _public.php:22 
    73 #: _public.php:225 
     92#: _public.php:26 
     93#: _public.php:232 
    7494#: _widgets.php:75 
    7595#: _widgets.php:167 
     
    7797msgstr "Du %S au %E" 
    7898 
     99#: _public.php:339 
     100#: _widgets.php:65 
     101#: index.php:152 
     102msgid "Ongoing" 
     103msgstr "En cours" 
     104 
     105#: _public.php:340 
     106#: _widgets.php:66 
     107#: index.php:153 
     108msgid "Outgoing" 
     109msgstr "Pas en cours" 
     110 
     111#: _public.php:341 
     112#: _widgets.php:61 
     113#: index.php:148 
     114msgid "Not started" 
     115msgstr "Non débuté" 
     116 
     117#: _public.php:342 
     118#: _widgets.php:62 
     119#: index.php:149 
     120msgid "Started" 
     121msgstr "Débuté" 
     122 
     123#: _public.php:343 
     124#: _widgets.php:64 
     125#: index.php:151 
     126msgid "Not finished" 
     127msgstr "Non fini" 
     128 
     129#: _public.php:344 
     130#: _widgets.php:63 
     131#: index.php:150 
     132msgid "Finished" 
     133msgstr "Fini" 
     134 
    79135#: _widgets.php:50 
    80136#: index.php:130 
     
    92148 
    93149#: _widgets.php:59 
    94 #: index.php:269 
     150#: index.php:270 
    95151msgid "Period:" 
    96152msgstr "Période :" 
    97  
    98 #: _widgets.php:61 
    99 #: index.php:148 
    100 msgid "Not started" 
    101 msgstr "Non débuté" 
    102  
    103 #: _widgets.php:62 
    104 #: index.php:149 
    105 msgid "Started" 
    106 msgstr "Débuté" 
    107  
    108 #: _widgets.php:63 
    109 #: index.php:150 
    110 msgid "Finished" 
    111 msgstr "Fini" 
    112  
    113 #: _widgets.php:64 
    114 #: index.php:151 
    115 msgid "Not finished" 
    116 msgstr "Non fini" 
    117  
    118 #: _widgets.php:65 
    119 #: index.php:152 
    120 msgid "Ongoing" 
    121 msgstr "En cours" 
    122  
    123 #: _widgets.php:66 
    124 #: index.php:153 
    125 msgid "Outgoing" 
    126 msgstr "Pas en cours" 
    127153 
    128154#: _widgets.php:68 
     
    165191 
    166192#: index.php:28 
    167 #: index.php:604 
     193#: index.php:605 
    168194msgid "About" 
    169195msgstr "À propos" 
     
    178204 
    179205#: index.php:33 
    180 #: index.php:565 
    181 #: index.php:591 
     206#: index.php:566 
     207#: index.php:592 
    182208msgid "Uninstall" 
    183209msgstr "Désinstaller" 
     
    203229msgstr "Thème courant du blog" 
    204230 
    205 #: index.php:251 
     231#: index.php:252 
    206232msgid "This is the list of all entries with event" 
    207233msgstr "Ceci est la liste de tous les billets ayant un événement" 
    208234 
    209 #: index.php:336 
     235#: index.php:337 
    210236msgid "This is a list of all the categories that can be rearranged by dates of events" 
    211237msgstr "Ceci est la liste de toutes les catégories qui peuvent être réordonnées par dates d'événements" 
    212238 
    213 #: index.php:340 
     239#: index.php:341 
    214240msgid "Id" 
    215241msgstr "Id" 
    216242 
    217 #: index.php:341 
     243#: index.php:342 
    218244msgid "Level" 
    219245msgstr "Niveau" 
    220246 
    221 #: index.php:343 
    222 #: index.php:356 
     247#: index.php:344 
     248#: index.php:357 
    223249msgid "Reordered" 
    224250msgstr "Réordonné" 
    225251 
    226 #: index.php:344 
    227 #: index.php:359 
     252#: index.php:345 
     253#: index.php:360 
    228254msgid "Unlisted" 
    229255msgstr "Caché" 
    230256 
    231 #: index.php:356 
    232 #: index.php:359 
     257#: index.php:357 
     258#: index.php:360 
    233259msgid "Normal" 
    234260msgstr "Normal" 
    235261 
    236 #: index.php:367 
     262#: index.php:368 
    237263msgid "Selected categories action:" 
    238264msgstr "Action sur les catégories sélectionnées :" 
    239265 
    240 #: index.php:400 
     266#: index.php:401 
    241267msgid "This is the management of the public page" 
    242268msgstr "Ceci est la gestion de la page publique" 
    243269 
    244 #: index.php:401 
     270#: index.php:402 
    245271msgid "Public page is disable" 
    246272msgstr "La page publique est inactive" 
    247273 
    248 #: index.php:412 
     274#: index.php:413 
    249275msgid "Theme" 
    250276msgstr "Thème" 
    251277 
    252 #: index.php:414 
     278#: index.php:415 
    253279msgid "Current blog theme:" 
    254280msgstr "Thème courant du blog :" 
    255281 
    256 #: index.php:415 
     282#: index.php:416 
    257283msgid "Adapted template exists:" 
    258284msgstr "Existence du modèle adapté :" 
    259285 
    260 #: index.php:415 
    261286#: index.php:416 
    262 #: index.php:430 
     287#: index.php:417 
     288#: index.php:431 
     289#: index.php:469 
     290#: index.php:473 
     291#: index.php:477 
     292msgid "Yes" 
     293msgstr "Oui" 
     294 
     295#: index.php:416 
     296#: index.php:417 
     297#: index.php:431 
    263298#: index.php:468 
    264299#: index.php:472 
    265300#: index.php:476 
    266 msgid "Yes" 
    267 msgstr "Oui" 
    268  
    269 #: index.php:415 
    270 #: index.php:416 
    271 #: index.php:430 
    272 #: index.php:467 
    273 #: index.php:471 
    274 #: index.php:475 
    275301msgid "No" 
    276302msgstr "Non" 
    277303 
    278 #: index.php:416 
     304#: index.php:417 
    279305msgid "Template on current theme exists:" 
    280306msgstr "Existence du modèle dans le thème courant :" 
    281307 
    282 #: index.php:417 
     308#: index.php:418 
    283309msgid "Alternate template:" 
    284310msgstr "Modèle alternatif :" 
    285311 
    286 #: index.php:418 
     312#: index.php:419 
    287313msgid "Public URL:" 
    288314msgstr "Lien publique :" 
    289315 
    290 #: index.php:421 
     316#: index.php:422 
    291317msgid "URL prefix:" 
    292318msgstr "Prefixe du lien :" 
    293319 
    294 #: index.php:425 
     320#: index.php:426 
    295321msgid "Choose predefined page template in case where theme of blog does not have it" 
    296322msgstr "Choisissez un modèle prédéfini au cas où le thème du blog n'en aurait pas" 
    297323 
    298 #: index.php:429 
     324#: index.php:430 
    299325msgid "Disable list of dates of event on an entry" 
    300326msgstr "Désactiver la liste des dates d'événements d'un billet" 
    301327 
    302 #: index.php:435 
    303 #: index.php:501 
     328#: index.php:436 
     329#: index.php:502 
    304330msgid "Save configuration" 
    305331msgstr "Enregistrer la configuration" 
    306332 
    307 #: index.php:461 
     333#: index.php:462 
    308334msgid "Plugin admistration options on this blog" 
    309335msgstr "Administration de l'extension sur ce blog" 
    310336 
    311 #: index.php:466 
     337#: index.php:467 
    312338msgid "Enable plugin" 
    313339msgstr "Activer l'extension" 
    314340 
    315 #: index.php:470 
     341#: index.php:471 
    316342msgid "Plugin icon in Blog menu" 
    317343msgstr "Icone de l'extension dans le menu Blog" 
    318344 
    319 #: index.php:474 
     345#: index.php:475 
    320346msgid "Enable public page" 
    321347msgstr "Activer la page publique" 
    322348 
    323 #: index.php:481 
     349#: index.php:482 
    324350msgid "Manage events dates on entries" 
    325351msgstr "Gèrer les dates des billets" 
    326352 
    327 #: index.php:485 
     353#: index.php:486 
    328354msgid "Manage list of reordered categories" 
    329355msgstr "Gérer la liste des catégories réordonnées" 
    330356 
    331 #: index.php:489 
     357#: index.php:490 
    332358msgid "Manage public page" 
    333359msgstr "Gérer la page publique" 
    334360 
    335 #: index.php:493 
     361#: index.php:494 
    336362msgid "Manage plugin" 
    337363msgstr "Gérer l'extension" 
    338364 
    339 #: index.php:519 
    340 #: index.php:572 
     365#: index.php:520 
     366#: index.php:573 
    341367msgid "You must check warning in order to delete plugin." 
    342368msgstr "Vous devez vérifier la mise en garde en vue de supprimer l'extension" 
    343369 
    344 #: index.php:543 
    345 #: index.php:575 
     370#: index.php:544 
     371#: index.php:576 
    346372msgid "In order to properly uninstall this plugin, you must specify the actions to perform" 
    347373msgstr "Dans le but de désintaller proprement l'extension, vous devez spécifier les actions à effectuer" 
    348374 
    349 #: index.php:545 
     375#: index.php:546 
    350376msgid "Validate" 
    351377msgstr "Valider" 
    352378 
    353 #: index.php:548 
    354 #: index.php:580 
     379#: index.php:549 
     380#: index.php:581 
    355381msgid "You understand that if you delete this plugin, the other plugins that use there table and class will no longer work." 
    356382msgstr "Vous comprenez que si vous supprimez cette extension, les autres extensions qui utilisent ces table et classes ne fonctionneront plus." 
    357383 
    358 #: index.php:550 
     384#: index.php:551 
    359385msgid "Delete plugin files" 
    360386msgstr "Supprimer les fichiers de l'extension" 
    361387 
    362 #: index.php:552 
    363 #: index.php:582 
     388#: index.php:553 
     389#: index.php:583 
    364390msgid "Delete plugin database table" 
    365391msgstr "Supprimer la table de l'extension dans la base de donnée" 
    366392 
    367 #: index.php:554 
    368 #: index.php:584 
     393#: index.php:555 
     394#: index.php:585 
    369395msgid "Delete plugin public templates" 
    370396msgstr "Suprimer les modèles de l'extension" 
    371397 
    372 #: index.php:556 
    373 #: index.php:586 
     398#: index.php:557 
     399#: index.php:587 
    374400msgid "Delete plugin settings" 
    375401msgstr "Supprimer les paramètres de l'extension" 
    376402 
    377 #: index.php:577 
    378 msgid "Uninstall "eventdata" plugin" 
    379 msgstr "Désintaller l'extension "eventdata"" 
    380  
    381 #: index.php:605 
     403#: index.php:606 
    382404msgid "Version:" 
    383405msgstr "Version :" 
    384406 
    385 #: index.php:607 
     407#: index.php:608 
    386408msgid "Support:" 
    387409msgstr "Support :" 
    388410 
    389 #: index.php:613 
     411#: index.php:614 
    390412msgid "Copyrights:" 
    391413msgstr "Droits :" 
Note: See TracChangeset for help on using the changeset viewer.

Sites map