Dotclear

Changeset 970:047d7b4a6ffd


Ignore:
Timestamp:
11/06/12 17:21:21 (13 years ago)
Author:
franck <carnet.franck.paul@…>
Branch:
default
Children:
971:a891f8b86552, 980:308abbb4125b
Message:

Notes' title can be now enclosed in h4 (default), h3 or p HTML tag. Fixes #1246

Files:
3 edited

Legend:

Unmodified
Added
Removed
  • admin/blog_pref.php

    r953 r970  
    8989     $post_url_combo[html::escapeHTML($blog_settings->system->post_url_format)] = html::escapeHTML($blog_settings->system->post_url_format); 
    9090} 
     91 
     92# Note title tag combo 
     93$note_title_tag_combo = array( 
     94     __('H4') => 0, 
     95     __('H3') => 1, 
     96     __('P') => 2 
     97); 
    9198 
    9299# Image title combo 
     
    209216          $blog_settings->system->put('wiki_comments',!empty($_POST['wiki_comments'])); 
    210217          $blog_settings->system->put('enable_xmlrpc',!empty($_POST['enable_xmlrpc'])); 
     218          $blog_settings->system->put('note_title_tag',$_POST['note_title_tag']); 
    211219           
    212220          $blog_settings->system->put('nb_post_per_page',$nb_post_per_page); 
     
    331339     form::combo('blog_timezone',dt::getZones(true,true),html::escapeHTML($blog_settings->system->blog_timezone)). 
    332340     '</label></p>'. 
    333      '</div>'. 
    334       
    335      '<div class="col">'. 
     341 
    336342     '<p><label for="copyright_notice">'.__('Copyright notice:'). 
    337343     form::field('copyright_notice',30,255,html::escapeHTML($blog_settings->system->copyright_notice)). 
    338344     '</label></p>'. 
    339       
     345     '</div>'. 
     346      
     347     '<div class="col">'. 
    340348     '<p><label for="post_url_format">'.__('New post URL format:'). 
    341349     form::combo('post_url_format',$post_url_combo,html::escapeHTML($blog_settings->system->post_url_format)). 
    342350     '</label></p>'. 
    343       
     351 
     352     '<p><label for="note_title_tag">'.__('Note title HTML tag:'). 
     353     form::combo('note_title_tag',$note_title_tag_combo,$blog_settings->system->note_title_tag). 
     354     '</label></p>'. 
     355           
    344356     '<p><label for="enable_xmlrpc" class="classic">'. 
    345357     form::checkbox('enable_xmlrpc','1',$blog_settings->system->enable_xmlrpc). 
  • inc/core/class.dc.blog.php

    r836 r970  
    15981598               $this->core->initWikiPost(); 
    15991599               $this->core->wiki2xhtml->setOpt('note_prefix','pnote-'.$post_id); 
     1600               switch ($this->settings->system->note_title_tag) { 
     1601                    case 1: 
     1602                         $tag = 'h3'; 
     1603                         break; 
     1604                    case 2: 
     1605                         $tag = 'p'; 
     1606                         break; 
     1607                    default: 
     1608                         $tag = 'h4'; 
     1609                         break; 
     1610               } 
     1611               $this->core->wiki2xhtml->setOpt('note_str','<div class="footnotes"><'.$tag.' class="footnotes-title">'. 
     1612                    __('Notes').'</'.$tag.'>%s</div>'); 
     1613               $this->core->wiki2xhtml->setOpt('note_str_single','<div class="footnotes"><'.$tag.' class="footnotes-title">'. 
     1614                    __('Note').'</'.$tag.'>%s</div>'); 
    16001615               if (strpos($lang,'fr') === 0) { 
    16011616                    $this->core->wiki2xhtml->setOpt('active_fr_syntax',1); 
  • locales/fr/main.po

    r968 r970  
    272272msgstr "Format d'URL des nouveaux billets :" 
    273273 
     274msgid "Note title HTML tag:" 
     275msgstr "Balise HTML pour le titre des notes :" 
     276 
     277msgid "Note" 
     278msgstr "Note" 
     279 
     280msgid "Notes" 
     281msgstr "Notes" 
     282 
    274283msgid "Enable XML/RPC interface" 
    275284msgstr "Activer l'interface XML/RPC" 
Note: See TracChangeset for help on using the changeset viewer.

Sites map