Dotclear

Changeset 2533


Ignore:
Timestamp:
08/09/10 14:36:19 (13 years ago)
Author:
philippe
Message:

ColorBox? plugin version 1.4:
*Dotclear 2.2 only
*added credits in help files
*code cleaning

Location:
plugins/colorbox
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • plugins/colorbox/_define.php

    r2470 r2533  
    1515     /* Description*/         "ColorBox like effect on images using jquery ColorBox plugin", 
    1616     /* Author */             "Philippe aka amalgame and Tomtom", 
    17      /* Version */            '1.3.9', 
     17     /* Version */            '1.4', 
    1818     /* Permissions */        'admin' 
    1919); 
  • plugins/colorbox/_install.php

    r2470 r2533  
    2121} 
    2222 
    23 # Settings compatibility test 
    24 if (!version_compare(DC_VERSION,'2.1.7','<=')) { 
    25      $core->blog->settings->addNamespace('colorbox'); 
    26      $s =& $core->blog->settings->colorbox; 
    27 } else { 
    28      $core->blog->settings->setNamespace('colorbox'); 
    29      $s =& $core->blog->settings; 
    30 } 
     23# Settings 
     24$core->blog->settings->addNamespace('colorbox'); 
     25$s =& $core->blog->settings->colorbox; 
    3126 
    3227$opts = array( 
  • plugins/colorbox/_public.php

    r2470 r2533  
    1717     public static function publicHeadContent($core) 
    1818     { 
    19           # Settings compatibility test 
    20           if (!version_compare(DC_VERSION,'2.1.7','<=')) { 
    21                $s =& $core->blog->settings->colorbox; 
    22           } else { 
    23                $core->blog->settings->setNamespace('colorbox'); 
    24                $s =& $core->blog->settings; 
    25           } 
     19          # Settings 
     20           
     21          $s =& $core->blog->settings->colorbox; 
    2622           
    2723          if (!$s->colorbox_enabled) { 
  • plugins/colorbox/index.php

    r2470 r2533  
    1515if (!$core->auth->check('admin',$core->blog->id)) { return; } 
    1616 
    17 # Settings compatibility test 
    18 if (!version_compare(DC_VERSION,'2.1.7','<=')) { 
    19      $s =& $core->blog->settings->colorbox; 
    20 } else { 
    21      $core->blog->settings->setNamespace('colorbox'); 
    22      $s =& $core->blog->settings; 
     17#Lightbox enabled test 
     18 
     19if ($core->plugins->moduleExists('lightbox')) { 
     20     if ($core->blog->settings->lightbox->lightbox_enabled) { 
     21          $core->error->add(__('Lightbox plugin is enabled. Please disable it before using ColorBox.')); 
     22          return; 
     23     } 
    2324} 
     25 
     26#Settings 
     27$s =& $core->blog->settings->colorbox; 
    2428 
    2529# Init var 
     
    121125               } 
    122126          }); 
    123  
    124127     }); 
    125128     </script> 
     
    136139 
    137140# Display messages 
     141 
    138142if (isset($_GET['upd'])) 
    139143{ 
     
    190194 
    191195# Zoom tab 
    192 if ($s->colorbox_position == true) { 
    193      $left = true; 
    194      $right = false; 
    195 } else { 
    196      $left = false; 
    197      $right = true; 
    198 } 
    199196 
    200197echo 
     
    206203               __('Enable zoom icon on thumbnails').'</label></p>'. 
    207204                    '<p style="margin-left:1em;"><label class="classic">'. 
    208                     form::radio(array('colorbox_position'),true,$left). 
     205                    form::radio(array('colorbox_position'),true,$s->colorbox_position). 
    209206                    __('on the left').'</label></p>'. 
    210207                    '<p style="margin-left:1em;"><label class="classic">'. 
    211                     form::radio(array('colorbox_position'),false,$right). 
     208                    form::radio(array('colorbox_position'),false,!$s->colorbox_position). 
    212209                    __('on the right').'</label></p>'. 
    213210                    '<p><label class="classic">'. 
     
    221218 
    222219# Advanced tab 
    223  
    224 if ($s->colorbox_user_files == true) { 
    225      $left = true; 
    226      $right = false; 
    227 } else { 
    228      $left = false; 
    229      $right = true; 
    230 } 
    231220 
    232221$effects = array( 
     
    242231               '<p>'.__('Store personnal CSS and image files in:').'</p>'. 
    243232               '<p><label class="classic">'. 
    244                form::radio(array('colorbox_user_files'),true,$left). 
     233               form::radio(array('colorbox_user_files'),true,$s->colorbox_user_files). 
    245234               __('public folder').'</label></p>'. 
    246235               '<p><label class="classic">'. 
    247                form::radio(array('colorbox_user_files'),false,$right). 
     236               form::radio(array('colorbox_user_files'),false,!$s->colorbox_user_files). 
    248237               __('theme folder').'</label></p>'. 
    249238                
  • plugins/colorbox/locales/en/help/advanced_help.html

    r2469 r2533  
    55  </head> 
    66  <body> 
     7     <p>Based on <a href="http://colorpowered.com/colorbox/">ColorBox</a>, a light-weight customizable lightbox plugin for jQuery.</p> 
    78    <h2>Advanced parameters help</h2> 
    89    <h3>Personnal files</h3> 
  • plugins/colorbox/locales/fr/help/advanced_help.html

    r2469 r2533  
    55  </head> 
    66  <body> 
     7    <p>Basé sur <a href="http://colorpowered.com/colorbox/">ColorBox</a>, une lightbox légère et personnalisable pour jQuery.</p> 
    78    <h2>Paramètres avancés</h2> 
    89    <h3>Fichiers personnels</h3> 
  • plugins/colorbox/locales/fr/main.po

    r2469 r2533  
     1msgid "Lightbox plugin is enabled. Please disable it before using ColorBox." 
     2msgstr "Le plugin Lightbox est activé. Désactivez-le pour utiliser ColorBox." 
     3 
    14msgid "Modal window configuration successfully saved" 
    25msgstr "Configuration de la fenêtre modale effectuée avec succès" 
     
    180183 
    181184msgid "Personnal files" 
     185 
    182186msgstr "Fichiers personnels" 
    183187 
Note: See TracChangeset for help on using the changeset viewer.

Sites map