forum.coppermine-gallery.net

Support => Français (French) => Language Specific Support => cpg1.4.x Français (French) => Topic started by: Pascal YAP on August 07, 2006, 08:01:06 pm

Title: Sommaire/Index complet CPG 1.4.8
Post by: Pascal YAP on August 07, 2006, 08:01:06 pm
Bonjour,

Créez un sommaire général de votre galerie !

Copiez et Coller le code ci-dessous, puis nommez-le "photo-sitemap.php".
Lorsque téléchargé sur votre serveur, appelez
http ://votre-Coppermine/photo-sitemap.php
(Exemple (http://www.pays-dignois.com/galerie/photo-sitemap.php))

Code: [Select]
<?php 
define
('IN_COPPERMINE'true);

require(
'include/init.inc.php');
pageheader(Sommaire-General-du-Site);

// Select all photos
$result cpg_db_query("SELECT a.pid, a.aid, a.title, a.caption, a.keywords, b.title atitle from {$CONFIG['TABLE_PICTURES']} a, {$CONFIG['TABLE_ALBUMS']} b where a.aid = b.aid order by a.aid, a.pid desc");
if (!
mysql_num_rows($result)) cpg_die(ERROR$lang_errors['non_exist_ap']);

$p_aid = -;

// Result to table
starttable("100%"Sommaire_General3);

   while (
$row mysql_fetch_array($result)) 
        { 
                if (
$row[aid] != $p_aid) {
                  echo 
"<tr><td class=\"tableh2_compact\" colspan = \"3\">$row[atitle]</td></tr>" ;
            }
            
// weer geef de data 
            
echo "<tr><td><a href=\"displayimage.php?pos=-$row[pid]\" title=\"$row[title]\">$row[title]</a></td><td>$row[caption]</td><td>$row[keywords]</td></tr>"
       
$p_aid $row[aid] ;
    } ; 
// while
                
endtable();
pagefooter();
?>

PYAP

sujet original (http://forum.coppermine-gallery.net/index.php?topic=4419.0) by fotofreek (http://forum.coppermine-gallery.net/index.php?action=profile;u=3034)
Title: Re: Sommaire/Index complet CPG 1.4.8
Post by: Pascal YAP on August 09, 2006, 04:19:55 pm
Bonjour, afin de préserver les Albums Privé, modifiez  $album_filter comme ci-dessous :
Code: [Select]
$album_filter = '';
if($FORBIDDEN_SET){
$album_filter = ' and ' . str_replace('p.', 'a.', $FORBIDDEN_SET);
}
$result = cpg_db_query("SELECT a.pid, a.aid, a.title, a.caption, a.keywords, b.title atitle from {$CONFIG['TABLE_PICTURES']} a, {$CONFIG['TABLE_ALBUMS']} b where a.aid = b.aid $album_filter order by a.aid, a.pid desc");


PYAP