Dotclear

Changeset 3090:e4c0a9a29852


Ignore:
Timestamp:
09/08/15 09:16:32 (10 years ago)
Author:
Nicolas <nikrou77@…>
Branch:
default
Message:

Users can now add a background text color button using ckeditor

Location:
plugins/dcCKEditor
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • plugins/dcCKEditor/_define.php

    r3056 r3090  
    1616     /* Description*/         "dotclear CKEditor integration", 
    1717     /* Author */             "dotclear Team", 
    18      /* Version */            "1.0.3", 
     18     /* Version */            "1.1.0", 
    1919     array( 
    2020          'permissions' =>    'usage,contentadmin', 
  • plugins/dcCKEditor/_install.php

    r3052 r3090  
    2525$settings->dcckeditor->put('list_buttons', true, 'boolean', 'Add list buttons?', false, true); 
    2626$settings->dcckeditor->put('textcolor_button', false, 'boolean', 'Add text color button?', false, true); 
     27$settings->dcckeditor->put('background_textcolor_button', false, 'boolean', 'Add background text color button?', false, true); 
    2728$settings->dcckeditor->put('cancollapse_button', false, 'boolean', 'Add collapse button?', false, true); 
    2829$settings->dcckeditor->put('format_select', true, 'boolean', 'Add format selection?', false, true); 
  • plugins/dcCKEditor/_post_config.php

    r3056 r3090  
    9696     CKEDITOR.plugins.addExternal('media',dotclear.dcckeditor_plugin_url+'/js/ckeditor-plugins/media/'); 
    9797     CKEDITOR.plugins.addExternal('img',dotclear.dcckeditor_plugin_url+'/js/ckeditor-plugins/img/'); 
     98     <?php if (!empty($dcckeditor_textcolor_button) || !empty($dcckeditor_background_textcolor_button)):?> 
     99     // button add "More Colors..." can be added if colordialog plugin is enabled 
     100     CKEDITOR.config.colorButton_enableMore = true; 
     101     <?php endif;?> 
    98102 
    99103<?php if (!empty($extraPlugins) && count($extraPlugins)>0) { 
     
    120124          // format tags 
    121125<?php if (!empty($dcckeditor_format_tags)):?> 
    122         format_tags: '<?php echo $dcckeditor_format_tags;?>', 
     126          format_tags: '<?php echo $dcckeditor_format_tags;?>', 
    123127<?php else:?> 
    124128          format_tags: 'p;h1;h2;h3;h4;h5;h6;pre;address', 
     
    178182                         'Source' 
    179183<?php if (!empty($dcckeditor_textcolor_button)):?> 
    180                 ,'TextColor' 
     184                         ,'TextColor' 
     185<?php endif;?> 
     186<?php if (!empty($dcckeditor_background_textcolor_button)):?> 
     187                         ,'BGColor' 
    181188<?php endif;?> 
    182189                    ] 
    183190               }, 
    184             { 
    185                 name: 'special', 
    186                 items: [ 
    187                     'Maximize' 
    188                 ] 
    189             }, 
     191               { 
     192                    name: 'special', 
     193                    items: [ 
     194                         'Maximize' 
     195                    ] 
     196               }, 
    190197               <?php // add extra buttons comming from dotclear plugins 
    191198               if (!empty($extraPlugins) && count($extraPlugins)>0) { 
  • plugins/dcCKEditor/inc/_config.php

    r3052 r3090  
    3030               $dcckeditor_textcolor_button = (empty($_POST['dcckeditor_textcolor_button']))?false:true; 
    3131               $core->blog->settings->dcckeditor->put('textcolor_button', $dcckeditor_textcolor_button, 'boolean'); 
     32 
     33               $dcckeditor_background_textcolor_button = (empty($_POST['dcckeditor_background_textcolor_button']))?false:true; 
     34               $core->blog->settings->dcckeditor->put('background_textcolor_button', $dcckeditor_background_textcolor_button, 'boolean'); 
    3235 
    3336               $dcckeditor_cancollapse_button = (empty($_POST['dcckeditor_cancollapse_button']))?false:true; 
  • plugins/dcCKEditor/index.php

    r3052 r3090  
    2020$dcckeditor_list_buttons = $core->blog->settings->dcckeditor->list_buttons; 
    2121$dcckeditor_textcolor_button = $core->blog->settings->dcckeditor->textcolor_button; 
     22$dcckeditor_background_textcolor_button = $core->blog->settings->dcckeditor->background_textcolor_button; 
    2223$dcckeditor_cancollapse_button = $core->blog->settings->dcckeditor->cancollapse_button; 
    2324$dcckeditor_format_select = $core->blog->settings->dcckeditor->format_select; 
  • plugins/dcCKEditor/locales/fr/main.po

    r3055 r3090  
    5050msgstr "Ajouter le bouton pour changer la couleur du texte" 
    5151 
     52#: tpl/index.tpl:37 
     53msgid "Add background text color button" 
     54msgstr "Ajouter le bouton pour changer la couleur de fond du texte" 
     55 
    5256#: tpl/index.tpl:41 
    5357msgid "Add collapse button" 
  • plugins/dcCKEditor/tpl/index.tpl

    r3052 r3090  
    3333       <?php echo form::checkbox('dcckeditor_textcolor_button', 1, $dcckeditor_textcolor_button); ?> 
    3434       <label class="classic" for="dcckeditor_textcolor_button">&nbsp;<?php echo __('Add text color button');?></label> 
     35     </p> 
     36     <p> 
     37       <?php echo form::checkbox('dcckeditor_background_textcolor_button', 1, $dcckeditor_background_textcolor_button); ?> 
     38       <label class="classic" for="dcckeditor_background_textcolor_button">&nbsp;<?php echo __('Add background text color button');?></label> 
    3539     </p> 
    3640     <p> 
Note: See TracChangeset for help on using the changeset viewer.

Sites map