Further information on psnGallery2 tags/functions

Out of a post (eg: in index.php)

// Generate tags to display several random pictures from a specific Coppermine album (if -1 : from all albums)
function CPGRndPicture($aid=-1, $count =-1, $nSize=1,$before='',$after='', $activelink=true, $dummy='') // Generate tags to display a full album from a specific Coppermine album (if -1 : from all albums)...
function CPGAlbum($aid, $nCols=4, $nSize=1, $beforeCol="", $afterCol="", $beforeRow="", $afterRow="")

// Get the name of an album
function CPGAlbumName($aid)

// Get the name of a category
function CPGCategoryName($cid)

// Get the number of pictures within an album
function CPGAlbumPicCount($aid)

// Get the album name list of a category
function CPGAlbumListCategory($cid, $count=-1, $nSize=1, $before='', $after='')

// Display a picture (in some modes)
function CPGPicture($pictID, $nSize=1, $before='', $after='', $mode='picture', $dummy=0)

// Display the specific thumbnail associated with an album
function CPGAlbumThumb ($aid, $nSize=1, $before='', $after='')

Within POST

Tag defined Associated function Action

  • <cpg_album> => CPGAlbum($elems[ 0 ], $elems[ 1 ], $elems[ 2 ], $elems[ 3 ], $elems[ 4 ], $elems[ 5 ], $elems[ 6 ]);
  • <cpg_albumcatlist> => CPGAlbumListCategory($elems[ 0 ], $elems[ 1 ], $elems[ 2 ], $elems[ 3 ], $elems[ 4 ]);
  • <cpg_albumname> => CPGAlbumName($elems[ 0 ]) ;
  • <cpg_albumpiccount> => CPGAlbumPicCount($elems[ 0 ]);
  • <cpg_albumthumb> => CPGAlbumThumb($elems[ 0 ], $elems[ 1 ], $elems[ 2 ], $elems[ 3 ], $elems[ 4 ], $elems[ 5 ], $elems[ 6 ]);
  • <cpg_categoryname> => CPGCategoryName($elems[ 0 ]) ;
  • <cpg_gallery> => CPGRndPicture($elems[ 0 ], $elems[ 1 ], $elems[ 2 ], $elems[ 3 ], $elems[ 4 ], $elems[ 5 ], $elems[ 6 ]);
  • <cpg_picture> => CPGPicture($elems[ 0 ], $elems[ 1 ], $elems[ 2 ], $elems[ 3 ], $elems[ 4 ], $elems[ 5 ], $elems[ 6 ]);
  • <gallery> => CPGRndPicture($elems[ 0 ], $elems[ 1 ], $elems[ 2 ], $elems[ 3 ], $elems[ 4 ], $elems[ 5 ], $elems[ 6 ]);

Of course, $elems[ x ] will be replace by the according value:

In other words : <cpg_gallery>1|5|1</cpg_gallery> will become CPGRndPicture(1, 5, 1, ”, ”, ”, ”); and finally :

Another example : <cpg_picture>275|1</cpg_picture> will become CPGPicture(275, 1, ”, ”, ”, ”, ”) and finally :