Luxbum.net - Script de galerie photo

Changeset 288

Show
Ignore:
Timestamp:
03/09/08 11:46:10 (9 months ago)
Author:
nicolas
Message:

Affichage de la sélection en première page

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/luxbum-0.6/_fonctions/class/luxbumimage.class.php

    r68 r288  
    241241   /** Fonctions pour créer les thumbs / preview */ 
    242242   /**-----------------------------------------------------------------------**/ 
    243     
     243      /** 
     244    * Retourne le lien de la vignette de l'image vers le script qui génére 
     245    * l'image 
     246    * @return Lien de la vignette de l'image vers le script de génération 
     247    */ 
     248   function getIndexLink () { 
     249      if (USE_REWRITE == 'on') { 
     250         $prefix = 'image/'; 
     251      } 
     252      else { 
     253         $prefix = 'image.php?'; 
     254      } 
     255      return $prefix.'index-'.$this->dir.'-'.$this->img; 
     256   } 
     257 
    244258   /** 
    245259    * Retourne le lien de la vignette de l'image vers le script qui génére 
  • branches/luxbum-0.6/_fonctions/index.php

    r275 r288  
    6868} 
    6969 
     70$page->WithMxPath('', 'absolute'); 
     71 
     72// Affichage de la sélection en première page 
     73if (isset($_SESSION['luxbum_selection_size']) && $_SESSION['luxbum_selection_size'] > 0) { 
     74   $i = 0; 
     75   foreach($_SESSION['luxbum'] as $d=>$s){ 
     76      foreach($_SESSION['luxbum'][$d] as $img=>$ok){ 
     77         $tab_selection[$i]['dir'] = $d; 
     78         $tab_selection[$i]['img'] = $img; 
     79         $i++; 
     80      } 
     81   } 
     82   $name = $tab_selection[0]['img']; 
     83   $dir = $tab_selection[0]['dir']; 
     84   $file = new luxBumImage($dir, $name); 
     85 
     86   $niceName = 'Ma sélection'; 
     87   $page->WithMxPath('selection', 'relative'); 
     88   $page->MxText     ('nom',      'Ma sélection'); 
     89   $page->MxAttribut ('alt',      $niceName); 
     90   $page->MxAttribut ('title',    $niceName); 
     91   $page->MxAttribut ('title2',   $niceName); 
     92   $page->MxAttribut ('apercu',   $file->getIndexLink()); 
     93   $page->MxUrl      ('lien',      INDEX_FILE.'?p=selection_list'); 
     94   if (SHOW_SLIDESHOW == 'on') { 
     95      $page->MxText     ('slideshow.slideshow',lien_slideshow ($name)); 
     96   } 
     97   else { 
     98      $page->MxBloc ('slideshow', 'delete'); 
     99   } 
     100   $page->MxText     ('nb_photo', $_SESSION['luxbum_selection_size']); 
     101//   $page->MxText     ('taille',   $gallery->getNiceSize ()); 
     102} 
     103else { 
     104   $page->MxBloc('selection', 'delete'); 
     105} 
    70106 
    71107$page->MxWrite(); 
  • branches/luxbum-0.6/_structure/index.mxt

    r282 r288  
    99    <mx:bloc id="favicon"><link rel="shortcut icon" mXattribut="href:favicon"/></mx:bloc id="favicon"> 
    1010    <mx:bloc id="stylesheet"> 
    11     <link mXattribut="rel:rel;href:href;title:title" type="text/css" /></mx:bloc id="stylesheet"> 
     11      <link mXattribut="rel:rel;href:href;title:title" type="text/css" /></mx:bloc id="stylesheet"> 
    1212  </head> 
    1313 
     
    1616 
    1717    <div id="liste_apercu"> 
     18      <div id="menunav"> 
     19        <ol class="tree"> 
     20          <li>&#187; <a href="index.php"><strong>Accueil</strong></a></li> 
     21        </ol> 
     22      </div> 
    1823      <mx:bloc id="dossiers"> 
    1924        <div class="galerie"> 
     
    2530            <span class="infos"><mx:text id="nb_photo"/> photos pour <mx:text id="taille"/>.</span> 
    2631            <div class="consulter"> 
    27             <ul> 
    28              <li><a mXattribut="href:lien" mXattribut="title:title2">Consulter</a></li> 
    29              <mx:bloc id="slideshow"> 
    30              <li><a href="#" onclick="window.open('<mx:text id="slideshow"/>','Diaporama','width=700,height=545,scrollbars=yes,resizable=yes');">Diaporama</a></li> 
    31              </mx:bloc id="slideshow"> 
    32             </ul> 
    33            </div> 
     32              <ul> 
     33                <li><a mXattribut="href:lien" mXattribut="title:title2">Consulter</a></li> 
     34                <mx:bloc id="slideshow"> 
     35                  <li><a href="#" onclick="window.open('<mx:text id="slideshow"/>','Diaporama','width=700,height=545,scrollbars=yes,resizable=yes');">Diaporama</a></li> 
     36                </mx:bloc id="slideshow"> 
     37              </ul> 
     38            </div> 
    3439          </div> 
    3540        </div> 
    3641      </mx:bloc id="dossiers"> 
    3742      <div class="spacer"></div> 
     43 
     44      <mx:bloc id="selection"> 
     45        <div id="menunav"> 
     46          <ol class="tree"> 
     47            <li>&#187; <a href="index.php"><strong>Ma sélection</strong></a></li> 
     48          </ol> 
     49        </div> 
     50        <div class="galerie"> 
     51          <div class="lg"> 
     52            <a mXattribut="href:lien"><img mXattribut="src:apercu;alt:alt;title:title" /></a> 
     53          </div> 
     54          <div class="ld"> 
     55            <h2><mx:text id="nom"/></h2> 
     56            <span class="infos"><mx:text id="nb_photo"/> photos pour <mx:text id="taille"/>.</span> 
     57            <div class="consulter"> 
     58              <ul> 
     59                <li><a mXattribut="href:lien" mXattribut="title:title2">Consulter</a></li> 
     60                <mx:bloc id="slideshow"> 
     61                  <li><a href="#" onclick="window.open('<mx:text id="slideshow"/>','Diaporama','width=700,height=545,scrollbars=yes,resizable=yes');">Diaporama</a></li> 
     62                </mx:bloc id="slideshow"> 
     63              </ul> 
     64            </div> 
     65          </div> 
     66        </div> 
     67        <div class="spacer"></div> 
     68      </mx:bloc id="selection"> 
     69 
     70 
    3871    </div> 
    3972    <div class="spacer"></div>