Dotclear

Changeset 2111


Ignore:
Timestamp:
03/09/10 16:01:08 (14 years ago)
Author:
philippe
Message:

1.3.5 : added user css management option

Location:
plugins/colorbox
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • plugins/colorbox/_define.php

    r2106 r2111  
    1515     /* Description*/         "ColorBox like effect on images using jquery ColorBox plugin", 
    1616     /* Author */             "Philippe aka amalgame and contributors", 
    17      /* Version */            '1.3.4', 
     17     /* Version */            '1.3.5', 
    1818     /* Permissions */        'admin' 
    1919); 
  • plugins/colorbox/_public.php

    r2106 r2111  
    4141          '<style type="text/css">'."\n". 
    4242          '@import url('.$url.'/themes/'.$s->colorbox_theme.'/colorbox_theme.css);'."\n". 
    43           "</style>\n". 
     43          "</style>\n"; 
    4444           
     45          $public_path = $core->blog->public_path; 
     46          $public_url = $core->blog->settings->public_url;        
     47           
     48          $colorbox_user_path = $public_path.'/colorbox/themes/'; 
     49          $colorbox_user_url = $public_url.'/colorbox/themes/'; 
     50           
     51          if (file_exists($colorbox_user_path.$s->colorbox_theme.'/colorbox_user.css')){ 
     52          echo 
     53          '<style type="text/css">'."\n". 
     54          '@import url('.$colorbox_user_url.$s->colorbox_theme.'/colorbox_user.css);'."\n". 
     55          "</style>\n"; 
     56          } 
     57           
     58          echo 
    4559          '<script type="text/javascript" src="'.$url.'/js/jquery.colorbox-min.js"></script>'."\n". 
    4660           
  • plugins/colorbox/locales/en/help/advanced_help.html

    r2086 r2111  
    211211    <h4>Included themes</h4> 
    212212    <p>ColorBox ships with 6 themes to choose its modal window's appearance. Others will be added later.</p> 
    213     <p>Lightbox Classic theme is special : it is designed to look exactly like the former plugin, and has no view counter and no slideshow commands. If however you wish to activate these functions, follow instructions in 
    214       <em>themes/3/colorbox_common.css</em> 
    215       .</p> 
    216     <p></p> 
     213    <p>Lightbox Classic theme is special : it is designed to look exactly like the former plugin, and has no view counter and no slideshow commands.</p> 
    217214    <h4>Modifying themes</h4> 
    218215    <h5>Principle</h5> 
    219     <p>ColorBox modal window can be entirely styled using CSS, and all images modified. Plugin ships with a stylesheet named 
    220       <em>colorbox_common.css</em> 
    221       . It is the one you must not touch !</p> 
    222     <p>In each theme you will find a stylesheet that you may wish to modify, it is named 
    223       <em>colorbox_theme.css</em> 
    224     </p> 
    225     <p>In each theme there is also a directory named 
    226       <em>images</em> 
    227       : in there, you may modify your modal window navigation icons.</p> 
    228     <h5>Structure</h5> 
    229     <p>A theme is made of a numbered directory with the following content:</p> 
    230     <ul> 
    231       <li>a file named 
    232         <em>colorbox_theme.css</em> 
    233         with all ColorBox selectors that you can modify</li> 
    234       <li>a directory named 
    235         <em>images</em> 
    236         containing all images (CSS sprites or icons)</li> 
    237     </ul> 
    238     <h5>CSS</h5> 
    239     <p>You may position all blocks to your liking and style them.</p> 
    240     <p>Important : if you change images linked in the stylesheet, put them in the themes 
    241       <em>images</em> 
    242       folder and link them as follows:</p> 
    243     <pre>background:url(index.php?pf=colorbox/themes/x/images/image_name.png)...</pre> 
    244     <p>where x is the theme number.</p> 
     216    <p>ColorBox modal window can be entirely styled using CSS, and its navigation images modified.</p> 
     217    <p>ColorBox allows to define for each theme a personnal stylesheet, stored in your public folder, and whose rules will overwrite existing theme rules.</p> 
     218    <p>Here is how to do it:</p> 
     219    <h5>Create a personnal Colorbox themes directory</h5> 
     220    <p>First create a directory, at the root of your plugin folder, containing the following hierarchy :</p> 
     221    <pre>colorbox/themes/x/</pre> 
     222    <p>where 
     223      <em>x</em> 
     224      is the number of the theme you wish to modify. In this directory you will store all your modifications on the theme. Repeat this operation and change 
     225      <em>x</em> 
     226      if you wish to modify several themes.</p> 
     227    <h5>Create your stylesheet</h5> 
     228    <p>Add now in directory 
     229      <em>x</em> 
     230      a stylesheet named 
     231      <em>colorbox_user.css</em> 
     232      with 
     233      <strong>only</strong> 
     234      the rules you want to apply 
     235      <strong>instead of</strong> 
     236      theme rules, i.e.</p> 
     237    <pre>#cboxOverlay{background-color:red;}</pre> 
     238    <p>if you only wish to change modal window background color.</p> 
     239    <h5>Add images</h5> 
     240    <p>If you wish to modify modal window navigation graphics, place your images in the personnal directory, and refer to them in <em>colorbox_user.css</em>.</p> 
    245241    <h3>Goodie</h3> 
    246242    <p>ColorBox display more than images, here are some instructions to start playing with:</p> 
  • plugins/colorbox/locales/fr/help/advanced_help.html

    r2086 r2111  
    212212    <h4>Thèmes livrés</h4> 
    213213    <p>ColorBox propose 6 thèmes pour choisir l'apparence de la fenêtre modale. D'autres seront ajoutés par la suite.</p> 
    214     <p>Le thème Lightbox Classic est particulier : il est conçu pour avoir le même aspect visuel que l'ancien plugin d'Olivier Meunier, et ne comporte pas de compteur de vues ni de commandes pour le diaporama. Si vous devez rajouter ces options, modifiez la feuille de style 
    215       <em>themes/3/colorbox_common.css</em> 
    216       en suivant les indications dans les commentaires.</p> 
    217     <p></p> 
     214    <p>Le thème Lightbox Classic est particulier : il est conçu pour avoir le même aspect visuel que l'ancien plugin d'Olivier Meunier, et le compteur de vues ainsi que le diaporama sont masqués.</p> 
    218215    <h4>Modification des thèmes</h4> 
    219216    <h5>Principe</h5> 
    220     <p>La fenêtre modale de ColorBox peut être entièrement stylée en CSS, et les images modifiées. Le plugin embarque une feuille de style nommée 
    221       <em>colorbox_common.css</em> 
    222       . C'est celle qu'il ne faut pas toucher !</p> 
    223     <p>En revanche il y a dans chaque thème une feuille de style que vous pouvez modifier, elle se nomme 
    224       <em>colorbox_theme.css</em> 
    225     </p> 
    226     <p>Dans chaque thème, il y a également un répertoire 
    227       <em>images</em> 
    228       : c'est là que vous pouvez modifier les boutons de navigation de la fenêtre modale</p> 
    229     <h5>Structure</h5> 
    230     <p>Un thème est constitué d'un dossier numéroté comportant la structure suivante :</p> 
    231     <ul> 
    232       <li>un fichier 
    233         <em>colorbox_theme.css</em> 
    234         avec tous les sélecteurs que vous pouvez modifier comme bon vous semble</li> 
    235       <li>un répertoire 
    236         <em>images</em> 
    237         contenant les icônes de navigation (sprites CSS ou icônes)</li> 
    238     </ul> 
    239     <h5>CSS</h5> 
    240     <p>Vous pouvez positionner tous les blocs différemment et les styler à votre guise.</p> 
    241     <p>Attention : si vous changez les images liées par la feuille de style, veillez à les placer dans le répertoire 
    242       <em>images</em> 
    243       du thème et à indiquer leur chemin comme suit :</p> 
    244     <pre>background:url(index.php?pf=colorbox/themes/x/images/nom_de_l_image.png)...</pre> 
    245     <p>où x est le numéro du thème que vous modifiez</p> 
     217    <p>La fenêtre modale de ColorBox peut être entièrement stylée en CSS, et les images modifiées.</p> 
     218    <p>ColorBox permet de définir une feuille de style personnalisée, stockée dans votre répertoire de médias, et dont les règles écraseront les règles de même nom du thème utilisé.</p> 
     219    <p>Voici comment procéder :</p> 
     220    <h5>Créer un répertoires de thèmes personnels</h5> 
     221    <p>Commencez par créer, à la racine de votre répertoire de médias, les répertoires nécessaires pour obtenir l'arborescence suivante :</p> 
     222    <pre>colorbox/themes/x/</pre> 
     223    <p>où 
     224      <em>x</em> 
     225      est le numéro du thème que vous souhaitez modifier. C'est dans ce répertoire que vous stockerez toutes vos modifications sur le thème. Répétez l'opération en changeant 
     226      <em>x</em> 
     227      si vous devez modifier plusieurs thèmes.</p> 
     228    <h5>Créer votre feuille de style</h5> 
     229    <p>Ajoutez maintenant dans le répertoire 
     230      <em>x</em> 
     231      une feuille de style nommée 
     232      <em>colorbox_user.css</em> 
     233      avec 
     234      <strong>seulement</strong> 
     235      les règles que vous voulez voir appliquer 
     236      <strong>à la place</strong> 
     237      de celles du thème, par exemple</p> 
     238    <pre>#cboxOverlay{background-color:red;}</pre> 
     239    <p>si vous ne souhaitez changer que la couleur de fond de la fenêtre modale</p> 
     240    <h5>Modifications des images</h5> 
     241    <p>Si vous voulez modifier les boutons de navigation de la fenêtre modale, placez dans le répertoire du thème personnel les images nécessaires, et faites référence à ces images dans<em>colorbox_user.css</em>.</p> 
    246242    <h3>Goodie</h3> 
    247243    <p>ColorBox peut afficher autre chose que des images, voici quelques indications pour commencer à jouer avec :</p> 
Note: See TracChangeset for help on using the changeset viewer.

Sites map