Sommaire/Index complet CPG 1.4.8 Sommaire/Index complet CPG 1.4.8
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

Sommaire/Index complet CPG 1.4.8

Started by Pascal YAP, August 07, 2006, 08:01:06 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Pascal YAP

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)

<?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 by fotofreek

Pascal YAP

#1
Bonjour, afin de préserver les Albums Privé, modifiez  $album_filter comme ci-dessous :

$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