Tag Archives: coppermine

psnGallery 2

This plugin allows you to have access to your Coppermine Gallery directly in
WordPress (Version 1.2 or higher).
With this version, all the configuration parameters are stored in a new table.
In fact to make the plugin working, you must create it and insert few records.

Pre Requirement :

– Coppermine Gallery minimum 1.1D must be installed and versio 1.3 to be able to use the “multimedia” files
– WordPress 1.2 minimum

The album list below has been generated by using the following tag :

<cpg_galcatview>12|1</cpg_galcatview>

where the 12 is the category and 1 for thumbnail size.

Hobbies
    Grenouille-2.jpg

  • Animaux, poupées
  • 5 pictures, 279 hits, 11 votes

    Lustre.jpg

  • Abats-jours
  • 9 pictures, 174 hits, 8 votes

    Dscn4393.jpg

  • Accessoires Cuisine
  • 22 pictures, 502 hits, 3 votes

    Vide-Poche.jpg

  • Accessoires Salle de Bain
  • 2 pictures, 103 hits, 3 votes

    Dscn1050.jpg

  • Bijoux
  • 4 pictures, 111 hits, No vote

    Dscn4794.jpg

  • Cartes 3D
  • 4 pictures, 108 hits, 1 vote

    Dscn1361.jpg

  • Cartonnage
  • 7 pictures, 302 hits, 4 votes

    Dscn6201.jpg

  • Chambre de Shani
  • 6 pictures, 176 hits, 1 vote

    Dscn2822.jpg

  • Collage Serviettes
  • 19 pictures, 3820 hits, 20 votes

    Boule-Crantee.jpg

  • Fêtes
  • 18 pictures, 764 hits, 6 votes

    Dscn4767.jpg

  • Marché de Noël 2004
  • 30 pictures, 374 hits, 2 votes

    Dscn4737.jpg

  • Mosaïque
  • 10 pictures, 281 hits, 1 vote

    Senegal2004-0250.jpg

  • Peinture sur Soie
  • 15 pictures, 992 hits, 27 votes

    Revelation.jpg

  • Photos
  • 13 pictures, 22 hits, 1 vote

    Dscn2816.jpg

  • Sacs
  • 6 pictures, 152 hits, 4 votes

    22.jpg

  • Scrapbooking
  • 39 pictures, 1776 hits, 9 votes

 

psnGallery2 fix for dash in the database name !

Well, I was helping Peter to use psnGallery2…And I finally found the issue :

His Coppermine database name was like “database-coppermine” ! So in the code, to be able to handle several databases (one for WordPress and another for Coppermine), the plugin is using this kind of syntax :

select * from database-coppermine->cpg110_config this causes a mySQL Error ! Because the first dash seems to be considered as a special character !

To fix this, I will deliver very soon the release 1.3.2 !

In the meantime, if you have the issue, simply replace in psnGallery2.php (around line 164)

$info['TBLPREFIX'] = $info['DBNAME'].'.'.$info['TBLPREFIX'];
with
$info['TBLPREFIX'] = '`'.$info['DBNAME'].'`.'.$info['TBLPREFIX'];

This will fix the issue !

plugin psnGallery2 version 1.3.1 available for download

The new version of the psnGallery2 has been released !

As announced, the new functionnalities are :

  • Display the last uploaded pictures from a specific Coppermine album
  • Display the most viewed pictures from a specific Coppermine album
  • Display the best rated pictures from a specific Coppermine album

They are available via tags in post and via php functions anywhere else.

The automatic install script will be soon available…

Continue reading plugin psnGallery2 version 1.3.1 available for download

psnGallery2 1.3.1 soon on your site

If I have time, the psnGallery2 version 1.3.1 will be available for download tonight (GMT+2).

It includes few fixes and the 3 new tags described in the previous post.

I have also scheduled for a near future to improve the install/upgrade procedure, it will be based on the WordPress install/upgrade script.

The install functionnalities will be :

  • Create the table “psnGallery” if doesn’t exist and/or update the structure if needed.
  • Look for the Coppermineconfig.inc.php” to extract the Coppermine configuration data
  • Create/Update all required “psnGallery2” parameters

I give no date for this but it could be soon (depending on the free time I will have in the coming days, weeks)

I will keep you posted on the evolution of that script.

psnGallery2 : Syntax clarification : In a Post

Within a post

  • <cpg_album>albumid|nCols|nSize|beforeCol|afterCol|beforeRow|afterRow</cpg_album> : Generate tags to display a full album from a specific Coppermine album (if -1 : from all albums)
  • <cpg_albumcatlist>categoryid|count|nSize|before|after</cpg_albumcatlist> : Get the album name list of a category
  • <cpg_albumname>albumid</cpg_albumname> : Get the name of an album
  • <cpg_albumpiccount>albumid</cpg_albumpiccount> : Get the number of pictures within an album
  • <cpg_albumthumb>$albumid|nSize|before|after</cpg_albumthumb> : Display the specific thumbnail associated with an album
  • <cpg_categoryname>categoryid</cpg_categoryname> : Get the name of a category
  • <cpg_gallery>albumid|count|nSize|before|after|activelink</cpg_gallery> : To display several random pictures from a specific Coppermine album (if -1 : from all albums)
  • <cpg_picture>pictureID|nSize|before|after|mode|dummy</cpg_picture> : Display a picture (in some modes)

Parameters explanation :

  • albumid” and the “pictureid” can be found in the “psnGallery2” Administration page.
  • count” represents the number of pictures to display.
  • nSize” is the size of the picture to display (1=thumbnail, 2=normal size and 3 is the fullsize picture)
  • before” is the string (HTML) to insert before each picture
  • after” is the string (HTML) to insert after each picture
  • categoryid” is the category of the album to display
  • mode” will display different supplemental information on the picture according the mode (EXIF data, statistic, etc…).

psnGallery2 : Syntax clarification : Out of Post

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

  • To display several random pictures from a specific Coppermine album (if -1 : from all albums) : CPGRndPicture($albumid, $count, $nSize,$before,$after, $activelink)
  • Generate tags to display a full album from a specific Coppermine album (if -1 : from all albums)… : CPGAlbum($albumid, $nCols, $nSize, $beforeCol, $afterCol, $beforeRow, $afterRow)
  • Get the name of an album : CPGAlbumName($albumid)
  • Get the name of a category : CPGCategoryName($categoryid)
  • Get the number of pictures within an album : CPGAlbumPicCount($albumid)
  • Get the album name list of a category : CPGAlbumListCategory($categoryid, $count, $nSize, $before, $after)
  • Display a picture (in some modes) : CPGPicture($pictureID, $nSize, $before, $after, $mode, $dummy)
  • Display the specific thumbnail associated with an album : CPGAlbumThumb ($albumid, $nSize, $before, $after)

Parameters explanation :

  • “$albumid” and the “$pictureid” can be found in the “psnGallery2” Administration page.
  • “$count” represents the number of pictures to display.
  • “$nSize” is the size of the picture to display (1=thumbnail, 2=normal size and 3 is the fullsize picture)
  • “$before” is the string (HTML) to insert before each picture
  • “$after” is the string (HTML) to insert after each picture
  • “$categoryid” is the category of the album to display
  • “$mode” will display different supplemental information on the picture according the mode (EXIF data, statistic, etc…).

WPPlugin psnGallery2 1.3.1 coming soon !

The new version of psnGallery2 will be soon out.

List of new features and their statuses :

  • picture id” displayed via mouseover
  • “EXIF info” displayed if present
  • “Most Viewed” function as in Coppermine (overall or for a specific category/album)
  • “Last Uploaded” function as in Coppermine (overall or for a specific category/album)
  • “Best Rated” function as in Coppermine (overall or for a specific category/album)

A demo page will also be created soon to demonstration all the functionnalities of the “psnGallery2” plugin.

I can’t say now when it will be out, I am rather busy at work, at home for the moment but it should not take long to be out ! 🙂

psnGallery 2 Sticky information

What’s that ?

It provides you an “gateway” between your Coppermine Gallery and your WordPress Blog.

A lot of functionnalities for your Blog within a post or outside a post !

How to make it work ?

The main requirements are to have installed :

If those applications are up and running, only few steps are required :
Continue reading psnGallery 2 Sticky information

Why idahocline.com and idahocline.info ?

Well, at first sight both sites are equal… In fact, idahocline.info was created in the hurry due to issue with the webhoster of idahocline.com. But normally, idahocline.info should have been created a little later.

In fact, I planned to create another site dedicated to Web Development with everything related. So let’s say that this site will be soon totally redesigned to be more developper oriented, with different areas, like :

  • CSS/xHTML : Templates / tutorials / links
  • Design : Ideas, discussions about Web Designs
  • PHP/mySQL : Tips and tricks for PHP, mySQL, …
  • WordPress : plugins, tips & tricks, …
  • Showcase : portfolio of several projects done or in progress
  • Testing area : do you really don’t know what it is ? 😉

Normally this site with architecture above will be online soon, probably end of June….

Of course, idahocline.com will stay online but will be more focused on my wife and I.

I am also working on several other WP plugins (with an administration page):

  • psnGeneric v1.0.0 : Random Item: Random Quotes, Books, … based on a table (Totaly generic)
  • psnGallery2 v1.3.0 : Coppermine Gallery (including all supported formats)
  • psnStat v1.0.0 : TFS WebStatistics

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 :