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 !

test Disclaimer

  • Disclaimer
    • WHILE IDAHOCLINE.INFO MAKES EVERY EFFORT TO PRESENT ACCURATE AND RELIABLE INFORMATION ON THIS SITE, IDAHOCLINE.INFO DOES NOT ENDORSE, APPROVE, OR CERTIFY SUCH INFORMATION, NOR DOES IT GUARANTEE ITS ACCURACY, COMPLETENESS, EFFICACY, OR TIMELINESS. REFERENCE HEREIN TO ANY COMMERCIAL PRODUCT, PROCESS, OR SERVICE DOES NOT CONSTITUTE OR IMPLY ENDORSEMENT OR RECOMMENDATION BY IDAHOCLINE.INFO UNLESS EXPRESSLY STATED.
    • IDAHOCLINE.INFO ASSUMES NO RESPONSIBILITY FOR CONSEQUENCES RESULTING FROM USE OF THE INFORMATION CONTAINED HEREIN OR OBTAINED AT LINKED SITES AND EXPRESSLY DISCLAIMS ALL LIABILITY FOR DAMAGES ARISING OUT OF USE, REFERENCE TO, RELIANCE ON, OR PERFORMANCE OF SUCH INFORMATION.
    • IDAHOCLINE.INFO SPECIFICALLY DISCLAIMS ANY LIABILITY, WHETHER BASED IN CONTRACT, TORT, STRICT LIABILITY OR OTHERWISE, FOR ANY DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL OR SPECIAL DAMAGES ARISING OUT OF IN ANY WAY CONNECTED WITH ACCESS TO OR USE OF THIS WEB SITE OR ANY CONTENT, INFORMATION, MATERIALS OR SERVICES HEREIN.
  • USER RESPONSIBILITIES
    • Any person using this system consents to having their activities on this system monitored and recorded by systems. If monitoring reveals possible evidence of illegal activity, system personnel may provide the evidence from such monitoring to law enforcement officials.
  • LINKS
    • At certain places in this site, links to other Web sites can be accessed. These sites contain information created, published, and maintained by organizations independent of IDAHOCLINE.INFO. Unless specified by IDAHOCLINE.INFO, IDAHOCLINE.INFO does not endorse, approve, certify, or control these external sites, nor any commercial product or service referenced therein, and does not guarantee the accuracy, completeness, efficacy, or timeliness of information located therein.
  • DOWNLOADS
    • THIS MATERIAL IS PROVIDED BY IDAHOCLINE.INFO ‘AS IS’ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL IDAHOCLINE.INFO BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS MATERIAL, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  • ENTIRE AGREEMENT
    • By viewing, visiting or otherwise using this Site, users agree to all of the terms and conditions set forth in this Disclaimer. This Disclaimer constitutes the entire agreement between user and IDAHOCLINE.INFO with respect to the use of this Site and Content. Notwithstanding the foregoing, IDAHOCLINE.INFO reserves the right to modify the Site and/or the Disclaimer at any time and users are deemed to be apprised of and bound by any such modifications. If any provision of this Disclaimer shall be held to be invalid, illegal, or unenforceable for any reason, the validity, legality and enforceability of the remaining provisions shall not in any way be affected or impaired thereby.

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 1.3 new tags

Here are the new tags :

<cpg_mostviewed> which displays the most viewed pictures for an album or overall defined albums :

  • Dscn6666.jpg
    Dscn6669.jpg
    Dscn6655.jpg
    Dscn6369.jpg
    Dscn6660.jpg
    Dscn6370.jpg
    Dscn6659.jpg
    Dscn6363.jpg

<cpg_bestrated> which displays the best rated pictures for an album or overall defined albums :

  • Siggy_de_Feveline.jpg
    fascination.jpg
    Hettie.jpg
    IMG_4276.JPG
    IMG_2888.JPG
    Sac_Berlingot_pour_halloween_copie.jpg
    IMG_2464.JPG
    IMG_2340.JPG

<cpg_lastup> which displays the latest uploaded pictures for an album or overall defined albums :

  • Pour_Popeline.jpg
    Pour_LaSterne.jpg
    La_Sterne~1.jpg
    Pour_Marite_84.jpg
    Sypi~0.jpg
    Marianne.jpg
    Suzie.jpg
    Pour_Autan.jpg

For both tags, the parameters are : albumid|count|nSize|before|after|activelink

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”