idahocline
Member
Posted 8 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>"
crow_t_autobot
Member
Posted 8 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.
idahocline
Member
Posted 8 years ago #
crow_t_autobot
Member
Posted 8 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?
idahocline
Member
Posted 8 years ago #
what is the name of the file ? psnGallery2.phps ? if yes, rename it as psnGallery2.php
idahocline
Member
Posted 8 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 !
crow_t_autobot
Member
Posted 8 years ago #
I'll recreate the file and try again.
crow_t_autobot
Member
Posted 8 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.
idahocline
Member
Posted 8 years ago #
Now a zip file is available. To avoid this in the future ;o)
pappergank
Member
Posted 8 years ago #
Thanks Idahocline! This works perfectly and was so nice and easy to install.
Anonymous
Unregistered
Posted 8 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
idahocline
Member
Posted 8 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 "<li>" and "</li>
Anonymous
Unregistered
Posted 8 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?
idahocline
Member
Posted 8 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....
Anonymous
Unregistered
Posted 8 years ago #
Thanks! that would be great!!! wow!
Anonymous
Unregistered
Posted 8 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?
idahocline
Member
Posted 8 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='
', $after='
', $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 8 years ago #
yes please, add the tags. but do I still need to check mysql for the image id?
idahocline
Member
Posted 8 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 8 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 8 years ago #
avileta
Member
Posted 8 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 8 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 8 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 8 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 8 years ago #
few more information on psnCPGAdmin and psnGallery2 at psnCPGAdmin preview (psnGallery2 admin page)
Few delay...sorry
aletheia
Member
Posted 8 years ago #
nice work idaho! Looking forward to your admin update :-)
idahocline
Member
Posted 8 years ago #
few more technical info....
Change overview
idahocline
Member
Posted 8 years ago #
The psnGallery 1.2.1 is released ! :o)
Feel free to get it
Anonymous
Unregistered
Posted 8 years ago #
Seems like a nice plugin ... where to download it from buddy?