WordPress.org

Ready to get started?Download WordPress

Forums

125

Plugin psnGallery : Coppermine in WordPress (139 posts)

  1. idahocline
    Member
    Posted 10 years ago #

    The new version of psnGallery (integration of Coppermine in WP) is out.
    View it in action at blog.idahocline.com
    Now in every post, you have access to Coppermine...Album, Pictures via simple tags as "<gallery>", "<cpg_album>", "<cpg_thumb>", "<cpg_gallery>"

  2. crow_t_autobot
    Member
    Posted 10 years ago #

    Thank you for the update.
    I got Coppermine running yesterday with the plan on trying your integration designs today. This will hopefully make things a little easier to impliment and use.

  3. idahocline
    Member
    Posted 10 years ago #

    I hope so ! :o)

  4. crow_t_autobot
    Member
    Posted 10 years ago #

    Well, that didn't go well.
    I made the changes to the psnGallery2.php file and uploaded it to my plug-in's directory.
    On the Plugins Management page of my WP admin, it lists the whole code of the psnGallery2.php file, rather than showing a name and description.
    Any ideas?

  5. idahocline
    Member
    Posted 10 years ago #

    what is the name of the file ? psnGallery2.phps ? if yes, rename it as psnGallery2.php

  6. idahocline
    Member
    Posted 10 years ago #

    Are you sure ? I just did as you, a "select all", copy, paste in a text-editor, save it with the name "psnGallery2.php", upload on the site, no issue to activate as plugin.
    I also did a "right-click", "save as" and than upload...no issue !

  7. crow_t_autobot
    Member
    Posted 10 years ago #

    I'll recreate the file and try again.

  8. crow_t_autobot
    Member
    Posted 10 years ago #

    There we go!
    Apparently, when I got the file the first time, it copied more stuff than it was supposed to. This time I opened the code in a new window and copied into a blank text file, then saved the name. The first time, I did a "right-click" and saved the file.
    Weird. But at least it shows up properly now.
    I'll give feedback later as I get things set up.

  9. idahocline
    Member
    Posted 10 years ago #

    Now a zip file is available. To avoid this in the future ;o)

  10. pappergank
    Member
    Posted 10 years ago #

    Thanks Idahocline! This works perfectly and was so nice and easy to install.

  11. Anonymous
    Unregistered
    Posted 10 years ago #

    HI idahocline, I read this on your site:
    <cpg_gallery>albumid|nbimg|size|beforeimg|afterimg</cpg_gallery>
    <cpg_album>albumid|nbcols|size|beforeimg|afterimg|beforerow|afterrow<cpg_album>
    <cpg_thumb>albumid|size</cpg_thumb>

    but I am a newbie to coppermine and I dont know where to find out the album Id...
    and what do I put in beforerow, afterrow, beforeimg and afterimg?
    what sizes are there and how do I specify them?
    thanks

  12. idahocline
    Member
    Posted 10 years ago #

    albumid means the identificator of the album ;o) (you can find it in the table "cpg_album".
    the "size" is 1 => Thumbnail, 2 => normal (intermediate), 3 => fullsize
    before img, afterimg are usually "&ltli>" and "&lt/li>

  13. Anonymous
    Unregistered
    Posted 10 years ago #

    isnt there an easyer way to find out the id without looking into the database?
    so I have to open mysqadmin everytime I want to link an image?
    lets say , in coppermine, I click on an image and in the end of the url says this: displayimage.php?album=5&pos=0
    ok, that means the album id is 5, so far so good, but I thought that the image id is 0 but when I put 0 in the "link image tag" like this: <cpg_thumb>0|1</cpg_thumb> (0= albumid and 1= size) it links to a completey different image. I dont want to have to access mysql everytime...
    is there an easyer way?

  14. idahocline
    Member
    Posted 10 years ago #

    <cpf_thumb>0|1</cpg_thumb> means display the thumbnail of the image defined in Coppermine for the album 0. If no specific image is defined, take a random one.
    To know the image number, well, I see sql admin, euh.... a list box with all the picture from the specified album...yeap....could be possible...I will check...not bad idea....even for the album.....yes....good one....
    Should try that....I'll be back with something in few time....

  15. Anonymous
    Unregistered
    Posted 10 years ago #

    Thanks! that would be great!!! wow!

  16. Anonymous
    Unregistered
    Posted 10 years ago #

    "<cpf_thumb>0|1</cpg_thumb> means display the thumbnail of the image defined in Coppermine for the album 0."
    that means I cannot just decide to display a specific image or maybe two? I can only display the thumbnail of the image defined in Coppermine for a specific album?
    Is there a way to display a CERTAIN image?

  17. idahocline
    Member
    Posted 10 years ago #

    there is no tag yet to display one specific picture BUT if you read the code....
    You will find function CPGPicture($pictID, $nSize=1, $before='

  18. ', $after='
  19. ', $mode='picture', $separator = '—') which is ding what you ask....
    Few others functions exist also as :
    CPGAlbumName($aid)
    CPGCategoryName($cid)
    CPGAlbumPicCount($aid)
    CPGAlbumListCategory($cid, $count=-1, $nSize=1, $before='', $after='')
    If you want I can easily add the related tags (eg: <cpg_picture>, <cpg_albumname>, ...).

  • Anonymous
    Unregistered
    Posted 10 years ago #

    yes please, add the tags. but do I still need to check mysql for the image id?

  • idahocline
    Member
    Posted 10 years ago #

    for the mment, yes. I am thinking...
    How do you see the way ? I mean where do you see the image list ?
    Because within the post itself means hacking the "post.html". Something that I don't want due to compatibility with few other plugins....
    May be a page within the "admin menu"...Where you will be able to view the coppermine album id, picture id, category id with an eventual preview of the selected item.. What do you think ?

  • Anonymous
    Unregistered
    Posted 10 years ago #

    yes, something like the link manager. that used to be a hack also.
    It was at least when I still had b2.

  • idahocline
    Member
    Posted 10 years ago #

    yes, a kind of....

  • avileta
    Member
    Posted 10 years ago #

    Nice plugin but it's not working for me. There is a "/" missing in the generated URL, e.g.
    http://website.com/photos [slash should go here] displayimage.php? etc.
    I supposed the script is assuming that CPG is installed in the root?

  • idahocline
    Member
    Posted 10 years ago #

    nope ! it gets the path to coppermine from the CPG variable : 'ecards_more_pic_target'. Which is defined in the Coppermine Gallery Configuration tab at "Target address for the 'See more pictures' link in e-cards ".
    The value has to be set to the "root" directory of the Coppermine Gallery. And it is true, it must be ended with "/". For release 1.2.1, I will add the check and also few others stuffs.

  • avileta
    Member
    Posted 10 years ago #

    I did figure that one out, and the script works very well. The downside is the URL in displayimage now has two slashes, e.g. 'http://website.com/photos//displayimage.php?etc. Coppermine apparently places the extra '/' by default. Displayimage.php around line 350 seems to be the culprit but I don't know how to modify it to fix it.

  • idahocline
    Member
    Posted 10 years ago #

    the admin part is nearly finished. I have still few check to perform. But normally it version 1.2.1 will be available for Wednesday.....(I hope).
    That release will have :
    - Tags "<cpg_lbumName>", "<cpg_CategoryName>", "<cpg_AlbumPicCount>", "<cpg_AlbumListCategory>"
    - Admin module to view albums and pictures within WordPress (to get the albumid and the pictureid)
    - Few small bugs fixing

  • idahocline
    Member
    Posted 10 years ago #

    few more information on psnCPGAdmin and psnGallery2 at psnCPGAdmin preview (psnGallery2 admin page)
    Few delay...sorry

  • aletheia
    Member
    Posted 10 years ago #

    nice work idaho! Looking forward to your admin update :-)

  • idahocline
    Member
    Posted 10 years ago #

    few more technical info....
    Change overview

  • idahocline
    Member
    Posted 10 years ago #

    The psnGallery 1.2.1 is released ! :o)
    Feel free to get it

  • Anonymous
    Unregistered
    Posted 10 years ago #

    Seems like a nice plugin ... where to download it from buddy?

  • 125

    Topic Closed

    This topic has been closed to new replies.

    About this Topic

    Tags