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

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

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