forum.coppermine-gallery.net

Support => cpg1.5.x Support => cpg1.5 miscellaneous => Topic started by: lurkalot on June 08, 2010, 11:35:18 pm

Title: CPMfetch for 1.5.6
Post by: lurkalot on June 08, 2010, 11:35:18 pm
Starting this thread as requested,

My question is, can I use CPMfetch with 1.5.6? and apparently it can be used by modding one line of code.

with modifications to just one line of code CPM fetch will work with 1.5.x. I'm already using it on a site of mine.

Start a thread regarding cpmfetch and I'll post the details.

Thanks Phill, I would appreciate your help on this. ;)


Edit by lurkalot - March 2013:

With permission granted by vuud, I am attaching the edited version of CpmFetch to this post. 

Please note: This is the edited version to work with 1.5.xx versions of Coppermine only.

Additional Edit by gmc - March 2015:

Attaching an edited version of CpmFetch V2.1.1 to this post. This is a DEV/Beta version that was never released.
Several of us received a dev copy along the way - and it may help others to have access.
Attached the V2.1.1 release notes so you can determine if you need this release...
cfimageget was significantly changed here to work with CPMFetch V2 - it did not work in the 2.0.0 release.   

Please note: Both attachments are the edited versions to work with 1.5.xx versions of Coppermine only.
There is no need to make the edits referenced in this thread relative to p.owner_name around line 61 of install.php. It has already been done for you in these versions.

Greg (gmc)


Additional edit by ron4mac - June 2017:

Attached updated version (2.0.1) that works with mysqli/PHP7.  Find documentation in the 2.0.0 version.
 
 
Title: Re: CPMfetch for 1.5.6
Post by: Phill Luckhurst on June 08, 2010, 11:44:23 pm
Bear in mind that VUUD is working on a new improved version specifically for the 1.5.x line of Coppermine. This is what I am using now to continue using his excellent tool.

Open install.php and find the line  (around 61 )

Code: [Select]
'cfSQLPictureSelect' => 'p.filepath AS pFilepath, p.filename AS pFilename, p.aid AS pAid, p.filesize AS pFilesize, p.title AS pTitle, p.caption AS pCaption, p.owner_id as pOwnerId, p.ctime AS pCtime, p.hits AS pHits, p.pid AS pPid, p.pic_rating AS pPic_Rating,  p.votes AS pVotes, p.pwidth AS pWidth, p.pheight AS pHeight, p.user1 as pUser1, p.user2 as pUser2, p.user3 as pUser3, p.user4 as pUser4, c.cid as cCid, c.name as cName, c.description as cDescription, c.pos as cPos, c.parent as cParent, c.thumb as cThumb',
and replace with

Code: [Select]
'cfSQLPictureSelect' => 'p.filepath AS pFilepath, p.filename AS pFilename, p.aid AS pAid, p.filesize AS pFilesize, p.title AS pTitle, p.caption AS pCaption, p.owner_name AS pOwner_name, p.owner_id as pOwnerId, p.ctime AS pCtime, p.hits AS pHits, p.pid AS pPid, p.pic_rating AS pPic_Rating,  p.votes AS pVotes, p.pwidth AS pWidth, p.pheight AS pHeight, p.user1 as pUser1, p.user2 as pUser2, p.user3 as pUser3, p.user4 as pUser4, c.cid as cCid, c.name as cName, c.description as cDescription, c.pos as cPos, c.parent as cParent, c.thumb as cThumb',
That is for the benefit of others who may need this tool. Once again you have neglected to post your link. Please try not to forget in future.
Title: Re: CPMfetch for 1.5.6
Post by: lurkalot on June 08, 2010, 11:53:08 pm
Thanks Phill, I'll give that a try, cheers. :)

PS:  My link is permanently in my signature, so I can't forget. ;)

Also forgot to say, would it be a good idea to move these two threads in to 1.5.x support now that it has gone stable?

[cpg1.5.x]: Updates on a next releases of CpmFetch (http://forum.coppermine-gallery.net/index.php/topic,64241.0.html)

[cpg1.5.x]: Open Q&A on the new CpmFetch 1.5 development efforts (http://forum.coppermine-gallery.net/index.php/topic,64286.0.html)
Title: Re: CPMfetch for 1.5.6
Post by: Phill Luckhurst on June 09, 2010, 08:02:37 am
The link in your footer would be fine if it linked to a coppermine driven page and not your homepage. We just do not have time to search for these things.
Title: Re: CPMfetch for 1.5.6
Post by: lurkalot on June 09, 2010, 08:26:34 am
No problem, I'll change it. ;)
Title: Re: CPMfetch for 1.5.6
Post by: lurkalot on June 09, 2010, 11:18:57 pm
Bear in mind that VUUD is working on a new improved version specifically for the 1.5.x line of Coppermine. This is what I am using now to continue using his excellent tool.

Open install.php and find the line  (around 61 )

Code: [Select]
'cfSQLPictureSelect' => 'p.filepath AS pFilepath, p.filename AS pFilename, p.aid AS pAid, p.filesize AS pFilesize, p.title AS pTitle, p.caption AS pCaption, p.owner_id as pOwnerId, p.ctime AS pCtime, p.hits AS pHits, p.pid AS pPid, p.pic_rating AS pPic_Rating,  p.votes AS pVotes, p.pwidth AS pWidth, p.pheight AS pHeight, p.user1 as pUser1, p.user2 as pUser2, p.user3 as pUser3, p.user4 as pUser4, c.cid as cCid, c.name as cName, c.description as cDescription, c.pos as cPos, c.parent as cParent, c.thumb as cThumb',
and replace with

Code: [Select]
'cfSQLPictureSelect' => 'p.filepath AS pFilepath, p.filename AS pFilename, p.aid AS pAid, p.filesize AS pFilesize, p.title AS pTitle, p.caption AS pCaption, p.owner_name AS pOwner_name, p.owner_id as pOwnerId, p.ctime AS pCtime, p.hits AS pHits, p.pid AS pPid, p.pic_rating AS pPic_Rating,  p.votes AS pVotes, p.pwidth AS pWidth, p.pheight AS pHeight, p.user1 as pUser1, p.user2 as pUser2, p.user3 as pUser3, p.user4 as pUser4, c.cid as cCid, c.name as cName, c.description as cDescription, c.pos as cPos, c.parent as cParent, c.thumb as cThumb',
That is for the benefit of others who may need this tool. Once again you have neglected to post your link. Please try not to forget in future.

Phill, Can you check these lines of code you posted, I think you have them the wrong way around.  I edited the file as described and then installed.  It installed but no images were showing.  I then replaced the code with the one in your top line and all works fine.

Link to test site, www.cctestsite.info

Thanks for your help. ;)
Title: Re: CPMfetch for 1.5.6
Post by: François Keller on June 10, 2010, 07:02:41 am
I can confirm this. It's the first code that you must put into the install.php file
Title: Re: CPMfetch for 1.5.6
Post by: lurkalot on June 10, 2010, 11:34:46 pm
I can confirm this. It's the first code that you must put into the install.php file

Thanks François. ;)
Title: Re: CPMfetch for 1.5.6
Post by: vuud on June 14, 2010, 06:51:29 am
Bear in mind that VUUD is working on a new improved version specifically for the 1.5.x line of Coppermine.

Hello,

Things continue to progress on the new release... sadly it is a complete change of everything I did, so it is taking longer than expected.

That and gardening season has hit and I bit off more than I can chew.  I am going to eek out some more time nightly to get some code done each day.

Vuud
Title: Re: CPMfetch for 1.5.6
Post by: bossspears on June 24, 2010, 10:01:52 pm
Phill, Can you check these lines of code you posted, I think you have them the wrong way around.  I edited the file as described and then installed.  It installed but no images were showing.  I then replaced the code with the one in your top line and all works fine.

Link to test site, www.cctestsite.info

Thanks for your help. ;)

Cool great!!, thanks for this
Title: Re: CPMfetch for 1.5.6
Post by: bossspears on June 24, 2010, 10:04:22 pm
Bear in mind that VUUD is working on a new improved version specifically for the 1.5.x line of Coppermine. This is what I am using now to continue using his excellent tool.

Open install.php and find the line  (around 61 )

Code: [Select]
'cfSQLPictureSelect' => 'p.filepath AS pFilepath, p.filename AS pFilename, p.aid AS pAid, p.filesize AS pFilesize, p.title AS pTitle, p.caption AS pCaption, p.owner_id as pOwnerId, p.ctime AS pCtime, p.hits AS pHits, p.pid AS pPid, p.pic_rating AS pPic_Rating,  p.votes AS pVotes, p.pwidth AS pWidth, p.pheight AS pHeight, p.user1 as pUser1, p.user2 as pUser2, p.user3 as pUser3, p.user4 as pUser4, c.cid as cCid, c.name as cName, c.description as cDescription, c.pos as cPos, c.parent as cParent, c.thumb as cThumb',
and replace with

Code: [Select]
'cfSQLPictureSelect' => 'p.filepath AS pFilepath, p.filename AS pFilename, p.aid AS pAid, p.filesize AS pFilesize, p.title AS pTitle, p.caption AS pCaption, p.owner_name AS pOwner_name, p.owner_id as pOwnerId, p.ctime AS pCtime, p.hits AS pHits, p.pid AS pPid, p.pic_rating AS pPic_Rating,  p.votes AS pVotes, p.pwidth AS pWidth, p.pheight AS pHeight, p.user1 as pUser1, p.user2 as pUser2, p.user3 as pUser3, p.user4 as pUser4, c.cid as cCid, c.name as cName, c.description as cDescription, c.pos as cPos, c.parent as cParent, c.thumb as cThumb',
That is for the benefit of others who may need this tool. Once again you have neglected to post your link. Please try not to forget in future.

Sorry was this
Title: Re: CPMfetch for 1.5.6
Post by: lurkalot on July 04, 2010, 01:31:03 pm
Don't know if I should start a new thread, but this is still on the same subject.

Phill, do you also have to change the code to pull the owner name and the comment count? to make it work in 1.5.6.

This is what it shows at the moment, Image title (ok), Owner name(not working), Amount of views(ok), Amount of comments(not working).

Hoverfly
Image By pOwner_name
3 Views
Comments pComCount

Link  http://cctestsite.info/
Title: Re: CPMfetch for 1.5.6
Post by: lurkalot on July 04, 2010, 01:51:02 pm
This is the code I'm using in a PHP block,

Code: [Select]
echo '<div id="cpmfetch">';chdir("../gallery/cpmfetch/");
include "cpmfetch.php"; $objCpm = new cpm();
$options = array("subtitle" => "<center>{{pTitle}} <br> <center> <FONT color=#1A5EFF size=2>Image By</FONT></STRONG> {{pOwner_name}} <br>{{pHits}} Views <center> <FONT color=#3399FF size=2>Comments</FONT></STRONG> {{pComCount}} </center>");
$objCpm->cpm_viewLastAddedMedia(3,4,$options);$objCpm->cpm_close();chdir("../../");
echo '<a href="http://cctestsite.info/gallery/thumbnails.php?album=lastup&cat=0?action=gallery"><u><b>View more latest images</b></u></a>';
if ($context['user']['is_logged'])

if ($context['user']['is_logged'])
{
$thecat = 10000 + $context['user']['id'];
echo ' •
<a href="http://cctestsite.info/gallery/index.php?cat='. $thecat .'" alt="My Gallery"><u><b>My Gallery</b></u></a>';
}
Title: Re: CPMfetch for 1.5.6
Post by: debraguk on July 21, 2010, 10:53:41 am
can someone please re-upload the code changes in install.php I'm just seeing scroll bars
Title: Re: CPMfetch for 1.5.6
Post by: Phill Luckhurst on July 21, 2010, 08:35:58 pm
Use another browser, IE8 does the scroll bar thing not displaying the code correctly.
Title: Re: CPMfetch for 1.5.6
Post by: lordxtina on August 19, 2010, 10:23:44 am
Bear in mind that VUUD is working on a new improved version specifically for the 1.5.x line of Coppermine. This is what I am using now to continue using his excellent tool.

Open install.php and find the line  (around 61 )

Code: [Select]
'cfSQLPictureSelect' => 'p.filepath AS pFilepath, p.filename AS pFilename, p.aid AS pAid, p.filesize AS pFilesize, p.title AS pTitle, p.caption AS pCaption, p.owner_id as pOwnerId, p.ctime AS pCtime, p.hits AS pHits, p.pid AS pPid, p.pic_rating AS pPic_Rating,  p.votes AS pVotes, p.pwidth AS pWidth, p.pheight AS pHeight, p.user1 as pUser1, p.user2 as pUser2, p.user3 as pUser3, p.user4 as pUser4, c.cid as cCid, c.name as cName, c.description as cDescription, c.pos as cPos, c.parent as cParent, c.thumb as cThumb',
and replace with

Code: [Select]
'cfSQLPictureSelect' => 'p.filepath AS pFilepath, p.filename AS pFilename, p.aid AS pAid, p.filesize AS pFilesize, p.title AS pTitle, p.caption AS pCaption, p.owner_name AS pOwner_name, p.owner_id as pOwnerId, p.ctime AS pCtime, p.hits AS pHits, p.pid AS pPid, p.pic_rating AS pPic_Rating,  p.votes AS pVotes, p.pwidth AS pWidth, p.pheight AS pHeight, p.user1 as pUser1, p.user2 as pUser2, p.user3 as pUser3, p.user4 as pUser4, c.cid as cCid, c.name as cName, c.description as cDescription, c.pos as cPos, c.parent as cParent, c.thumb as cThumb',
That is for the benefit of others who may need this tool. Once again you have neglected to post your link. Please try not to forget in future.

I did this, re-run install.php but still getting errors.

Quote
Unknown column 'p.owner_name' in 'field list'

SELECT p.filepath AS pFilepath, p.filename AS pFilename, p.aid AS pAid, p.filesize AS pFilesize, p.title AS pTitle, p.caption AS pCaption, p.owner_name AS pOwner_name, p.owner_id as pOwnerId, p.ctime AS pCtime, p.hits AS pHits, p.pid AS pPid, p.pic_rating AS pPic_Rating, p.votes AS pVotes, p.pwidth AS pWidth, p.pheight AS pHeight, p.user1 as pUser1, p.user2 as pUser2, p.user3 as pUser3, p.user4 as pUser4, c.cid as cCid, c.name as cName, c.description as cDescription, c.pos as cPos, c.parent as cParent, c.thumb as cThumb, u.user_lastvisit AS uUser_lastvisit,u.user_regdate AS uUser_regdate,u.user_email AS uUser_email,u.user_profile1 AS uUser_profile1,u.user_profile2 AS uUser_profile2,u.user_profile3 AS uUser_profile3,u.user_profile4 AS uUser_profile4,u.user_profile5 AS uUser_profile5,u.user_profile6 AS uUser_profile6, a.aid AS aAid, a.title AS aTitle, a.description AS aDescription, a.visibility as aVisibility, a.pos as aPos, a.category as aCategory, a.thumb as aThumb, a.keyword as aKeyword FROM cpg_pictures AS p LEFT JOIN cpg_users AS u ON p.owner_id = u.user_id LEFT JOIN cpg_albums AS a ON p.aid = a.aid LEFT JOIN cpg_categories AS c ON a.category = c.cid WHERE 1 AND p.approved='YES' AND ((a.visibility = 0 OR a.visibility IS NULL) AND (a.alb_password IS NULL OR a.alb_password = "")) ORDER BY p.ctime DESC LIMIT 0,3

Warning: mysql_fetch_assoc() expects parameter 1 to be resource, boolean given in /home/enchongd/public_html/photos/cpmfetch/cpmfetch_dao.php on line 1260

Warning: mysql_free_result() expects parameter 1 to be resource, boolean given in /home/enchongd/public_html/photos/cpmfetch/cpmfetch_dao.php on line 1264

Site links:

http://www.enchongdeeworld.com
http://www.enchongdeeworld.com/photos
http://www.enchongdeeworld.com/photos/cpmfetch

Can you please help me figure out what's wrong? Thanks. :)
Title: Re: CPMfetch for 1.5.6
Post by: lordxtina on August 19, 2010, 11:06:05 am
NVM, it's working now. I had to uninstall the CPMFetch (by deleting the folder). Re-uploaded then changed the code.

From:
Quote
'cfSQLPictureSelect' => 'p.filepath AS pFilepath, p.filename AS pFilename, p.aid AS pAid, p.filesize AS pFilesize, p.title AS pTitle, p.caption AS pCaption, p.owner_name AS pOwner_name, p.owner_id as pOwnerId, p.ctime AS pCtime, p.hits AS pHits, p.pid AS pPid, p.pic_rating AS pPic_Rating,  p.votes AS pVotes, p.pwidth AS pWidth, p.pheight AS pHeight, p.user1 as pUser1, p.user2 as pUser2, p.user3 as pUser3, p.user4 as pUser4, c.cid as cCid, c.name as cName, c.description as cDescription, c.pos as cPos, c.parent as cParent, c.thumb as cThumb',

To:

Quote
'cfSQLPictureSelect' => 'p.filepath AS pFilepath, p.filename AS pFilename, p.aid AS pAid, p.filesize AS pFilesize, p.title AS pTitle, p.caption AS pCaption, p.owner_id as pOwnerId, p.ctime AS pCtime, p.hits AS pHits, p.pid AS pPid, p.pic_rating AS pPic_Rating,  p.votes AS pVotes, p.pwidth AS pWidth, p.pheight AS pHeight, p.user1 as pUser1, p.user2 as pUser2, p.user3 as pUser3, p.user4 as pUser4, c.cid as cCid, c.name as cName, c.description as cDescription, c.pos as cPos, c.parent as cParent, c.thumb as cThumb',

I hope that helps some people. :p
Title: Re: CPMfetch for 1.5.6
Post by: torgasm on September 04, 2010, 09:58:37 pm
I keep getting this error still.

Quote
Warning: split() [function.split]: It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/Chicago' for 'CDT/-5.0/DST' instead in /home/cpharris/public_html/photos/cpmfetch/install.php on line 312
Title: Re: CPMfetch for 1.5.6
Post by: torgasm on September 04, 2010, 10:23:02 pm
I keep getting this error still.


I took the p.owner table out which worked when I did it on another site of mine, but then I'm still getting the error that's telling me it's there still.

[quoteUnknown column 'p.owner_name' in 'field list'
SELECT p.filepath AS pFilepath, p.filename AS pFilename, p.aid AS pAid, p.filesize AS pFilesize, p.title AS pTitle, p.caption AS pCaption, p.owner_name AS pOwner_name, p.owner_id as pOwnerId, p.ctime AS pCtime, p.hits AS pHits, p.pid AS pPid, p.pic_rating AS pPic_Rating, p.votes AS pVotes, p.pwidth AS pWidth, p.pheight AS pHeight, p.user1 as pUser1, p.user2 as pUser2, p.user3 as pUser3, p.user4 as pUser4, c.cid as cCid, c.name as cName, c.description as cDescription, c.pos as cPos, c.parent as cParent, c.thumb as cThumb, u.user_lastvisit AS uUser_lastvisit,u.user_regdate AS uUser_regdate,u.user_email AS uUser_email,u.user_profile1 AS uUser_profile1,u.user_profile2 AS uUser_profile2,u.user_profile3 AS uUser_profile3,u.user_profile4 AS uUser_profile4,u.user_profile5 AS uUser_profile5,u.user_profile6 AS uUser_profile6, a.aid AS aAid, a.title AS aTitle, a.description AS aDescription, a.visibility as aVisibility, a.pos as aPos, a.category as aCategory, a.thumb as aThumb, a.keyword as aKeyword FROM cpg_pictures AS p LEFT JOIN cpg_users AS u ON p.owner_id = u.user_id LEFT JOIN cpg_albums AS a ON p.aid = a.aid LEFT JOIN cpg_categories AS c ON a.category = c.cid WHERE 1 AND p.approved='YES' AND ((a.visibility = 0 OR a.visibility IS NULL) AND (a.alb_password IS NULL OR a.alb_password = "")) ORDER BY p.ctime DESC LIMIT 0,4


Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /home/tokiopix/public_html/cpmfetch/cpmfetch_dao.php on line 1260

Warning: mysql_free_result(): supplied argument is not a valid MySQL result resource in /home/tokiopix/public_html/cpmfetch/cpmfetch_dao.php on line 1264[/quote]

Title: Re: CPMfetch for 1.5.6
Post by: torgasm on September 05, 2010, 12:06:51 am
Ooops. Forgot my link.

http://tokiopix.com/cpmfetch/install.php
Title: Re: CPMfetch for 1.5.6
Post by: Liinus on September 21, 2010, 10:03:01 pm
Hi! thanks for this! I could install the CPM! thank you!!! Now I have a new problem!! http://chloebridgesdaily.fandeluxe.org/ this is my web! Check on the sidebar, it says "Ultimas Fotos" How can I make, to only view 3 images??
Title: Re: CPMfetch for 1.5.6
Post by: Jeff Bailey on September 21, 2010, 10:22:13 pm
it the code where it has a 1, 4 ... change it to a 3
http://cpmfetch.fistfullofcode.com/docs/stable_basic/index.html
Title: Re: CPMfetch for 1.5.6
Post by: Liinus on September 21, 2010, 11:18:48 pm
it the code where it has a 1, 4 ... change it to a 3
http://cpmfetch.fistfullofcode.com/docs/stable_basic/index.html

Thank you very much!!! this forum is the best =D :D :D
Title: Re: CPMfetch for 1.5.6
Post by: lurkalot on November 07, 2010, 10:32:24 pm
Anyone worked out how to get the "owners name" and "comment count" to work with 1.5.8?

I have cpmfetch working (as per 1st page of this topic) and pulling thumbs into a php block on my home page, but I've had to edit the code.  Now it shows image title, and number of views only.

This is the code I used with 1.4.27 which showed, Image title, Owner name, Number of views, and Number of comments

Code: [Select]
echo '<div id="cpmfetch">';chdir("../gallery/cpmfetch/");include "cpmfetch.php"; $objCpm = new cpm();$options = array("imageheight"=>"80","subtitle" => "<center>{{pTitle}} <br> <center> <FONT color=#1A5EFF size=2>Image By</FONT></STRONG> {{pOwner_name}} <br>{{pHits}} Views <center> <FONT color=#3399FF size=2>Comments</FONT></STRONG> {{pComCount}} </center>");$objCpm->cpm_viewLastAddedMedia(4,4,$options);$objCpm->cpm_close();chdir("../../");echo '<a href="http://cameracraniums.com/gallery/thumbnails.php?album=lastup&cat=0?action=gallery"><u><b>View more latest images</b></u></a>';
if ($context['user']['is_logged'])

if ($context['user']['is_logged'])
{
$thecat = 10000 + $context['user']['id'];
echo ' •
<a href="http://cameracraniums.com/gallery/index.php?cat='. $thecat .'" alt="My Gallery"><u><b>My Gallery</b></u></a>';
}

And this is what I use for 1.5.8,

Code: [Select]
echo '<div id="cpmfetch">';chdir("../gallery/cpmfetch/");include "cpmfetch.php"; $objCpm = new cpm();$options = array("subtitle" => "<center>{{pTitle}} <br>{{pHits}} Views <center> </center>");$objCpm->cpm_viewLastAddedMedia(4,4,$options);$objCpm->cpm_close();chdir("../../");echo '<a href="http://cameracraniums.com/gallery/thumbnails.php?album=lastup&cat=0?action=gallery"><u><b>View more latest images</b></u></a>';
if ($context['user']['is_logged'])

if ($context['user']['is_logged'])
{
$thecat = 10000 + $context['user']['id'];
echo ' •
<a href="http://cameracraniums.com/gallery/index.php?cat='. $thecat .'" alt="My Gallery"><u><b>My Gallery</b></u></a>';
}

Link in signature.
Title: Re: CPMfetch for 1.5.6
Post by: wutacrock on December 11, 2010, 08:33:05 am
I'm totally lost here. I just installed CPMfetch, but totally lost where to put these code you guys are posting. Right now it's not showing up on my gallery.
Title: Re: CPMfetch for 1.5.6
Post by: johnhanna on December 28, 2010, 04:19:30 am
Bear in mind that VUUD is working on a new improved version specifically for the 1.5.x line of Coppermine. This is what I am using now to continue using his excellent tool.

Open install.php and find the line  (around 61 )

Code: [Select]
'cfSQLPictureSelect' => 'p.filepath AS pFilepath, p.filename AS pFilename, p.aid AS pAid, p.filesize AS pFilesize, p.title AS pTitle, p.caption AS pCaption, p.owner_id as pOwnerId, p.ctime AS pCtime, p.hits AS pHits, p.pid AS pPid, p.pic_rating AS pPic_Rating,  p.votes AS pVotes, p.pwidth AS pWidth, p.pheight AS pHeight, p.user1 as pUser1, p.user2 as pUser2, p.user3 as pUser3, p.user4 as pUser4, c.cid as cCid, c.name as cName, c.description as cDescription, c.pos as cPos, c.parent as cParent, c.thumb as cThumb',
and replace with

Code: [Select]
'cfSQLPictureSelect' => 'p.filepath AS pFilepath, p.filename AS pFilename, p.aid AS pAid, p.filesize AS pFilesize, p.title AS pTitle, p.caption AS pCaption, p.owner_name AS pOwner_name, p.owner_id as pOwnerId, p.ctime AS pCtime, p.hits AS pHits, p.pid AS pPid, p.pic_rating AS pPic_Rating,  p.votes AS pVotes, p.pwidth AS pWidth, p.pheight AS pHeight, p.user1 as pUser1, p.user2 as pUser2, p.user3 as pUser3, p.user4 as pUser4, c.cid as cCid, c.name as cName, c.description as cDescription, c.pos as cPos, c.parent as cParent, c.thumb as cThumb',
That is for the benefit of others who may need this tool. Once again you have neglected to post your link. Please try not to forget in future.

sorry, dumb question.... what install.php is it that needs to be modified. I looked at the install.php in the root of cpg but didn't see anything that remotely resembled this around line 61.  I also looked for install.php under modules/mod_cpmfetch.

Your assistance is greatly appreciated.
Title: Re: CPMfetch for 1.5.6
Post by: lurkalot on December 28, 2010, 10:57:37 am
Download the cpmfetch plugin, and unzip it on your pc.  Inside you'll see a cpmfetch folder, inside that you'll see the install.php file.  That's the one you need to edit.  Then upload just that cpmfetch folder (with its contents) to your server in the coppermine directory.
Title: Re: CPMfetch for 1.5.6
Post by: johnhanna on December 28, 2010, 06:28:58 pm
Download the cpmfetch plugin, and unzip it on your pc.  Inside you'll see a cpmfetch folder, inside that you'll see the install.php file.  That's the one you need to edit.  Then upload just that cpmfetch folder (with its contents) to your server in the coppermine directory.

Okay, I am missing something here.... I downloaded the CpmFetch Image Plugin from http://extensions.lhmr.org/index.php?option=com_rokdownloads&view=folder&Itemid=57. (http://extensions.lhmr.org/index.php?option=com_rokdownloads&view=folder&Itemid=57.) and extracted the files onto my hard drive as you instructed.  When I view the contents of the extracted files, I see a single folder named "cpmfetch.plugin", when I look inside that folder I am unable to find a file titled install.php anywhere.

Let me explain what I have setup and am trying to accomplish.  I have Joomla 1.5.20 installed for a website that I administer, I have been using CPG for a few years now and have just upgraded it to v 1.5.8.  I would like to be able to autimatically display a few of the most recent photos in a module on the site.  The site is located at http://nonamejustfriends.com/ (http://nonamejustfriends.com/)

Thank you for your help thus far!  :)
Title: Re: CPMfetch for 1.5.6
Post by: lurkalot on December 28, 2010, 06:59:16 pm
If you read the readme file in the module you downloaded you'll see that is is a module for joomla.  It says you also need the cpmfetch version 2.0 installed, and that's the plugin we're talking about in this thread.  ;)

You can find it attached at the bottom of this post.  http://forum.coppermine-gallery.net/index.php/topic,35450.0.html
Title: Re: CPMfetch for 1.5.6
Post by: Phill Luckhurst on December 28, 2010, 07:37:47 pm
Also, update your Coppermine and your Joomla as they are both a little behind.

As lurkalot already stated, get cpmfetch working first then the Joomla plugin will work. I have it running on one of my sites - www.windsurf.me.uk
Title: Re: CPMfetch for 1.5.6
Post by: vuud on March 22, 2011, 02:04:23 am

Please note Fistfullofcode is down and shall remain that way.  I will be brining the cpmfetch site up on my new domain in the next few days.
Title: Re: CPMfetch for 1.5.6
Post by: lurkalot on March 22, 2011, 08:28:14 am
Cool, thanks Vuud. (big thumbs up smiley)
Title: Re: CPMfetch for 1.5.6
Post by: eris667 on July 08, 2011, 12:06:47 am
Thank You !!!!

Mike
http://www.strm.us/
http://www.strm.us/cpg15x/index.php
Title: Re: CPMfetch for 1.5.6
Post by: macmiller on July 19, 2011, 02:17:46 pm
Quote
Anyone worked out how to get the "owners name" and "comment count" to work with 1.5.8?

I have cpmfetch working (as per 1st page of this topic) and pulling thumbs into a php block on my home page, but I've had to edit the code.  Now it shows image title, and number of views only.

I just downloaded and installed cpmfetch 2.0 and made the change to the install.php and it is working... but having the same problem has noted above owners name/comment count.  Anyone get this part working?
Title: Re: CPMfetch for 1.5.6
Post by: caddis on September 04, 2011, 05:07:08 pm
Hello,

it works fine for me, but can i center the Picture in a Block?

cu
Rolf
Title: Re: CPMfetch for 1.5.6
Post by: vlado85 on December 11, 2011, 03:54:28 pm
hm I have problem:

Quote
Unknown column 'p.owner_name' in 'field list'

SELECT p.filepath AS pFilepath, p.filename AS pFilename, p.aid AS pAid, p.filesize AS pFilesize, p.title AS pTitle, p.caption AS pCaption, p.owner_name AS pOwner_name, p.owner_id as pOwnerId, p.ctime AS pCtime, p.hits AS pHits, p.pid AS pPid, p.pic_rating AS pPic_Rating, p.votes AS pVotes, p.pwidth AS pWidth, p.pheight AS pHeight, p.user1 as pUser1, p.user2 as pUser2, p.user3 as pUser3, p.user4 as pUser4, c.cid as cCid, c.name as cName, c.description as cDescription, c.pos as cPos, c.parent as cParent, c.thumb as cThumb, a.aid AS aAid, a.title AS aTitle, a.description AS aDescription, a.visibility as aVisibility, a.pos as aPos, a.category as aCategory, a.thumb as aThumb, a.keyword as aKeyword FROM cpg14x_pictures AS p LEFT JOIN cpg14x_albums AS a ON p.aid = a.aid LEFT JOIN cpg14x_categories AS c ON a.category = c.cid WHERE 1 AND p.approved='YES' AND ((a.visibility = 0 OR a.visibility IS NULL) AND (a.alb_password IS NULL OR a.alb_password = "")) ORDER BY p.ctime DESC LIMIT 0,4

Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /home/mysite/public_html/cpg/cpmfetch/cpmfetch_dao.php on line 1260

Warning: mysql_free_result(): supplied argument is not a valid MySQL result resource in /home/mysite/public_html/cpg/cpmfetch/cpmfetch_dao.php on line 1264

I read this thread, but I dont know where is problem?

Mehdi bridge
Joomla 1.5.24
Coppermine 1.5.16
cpmfetch 2.0
Title: Re: CPMfetch for 1.5.6
Post by: vlado85 on December 11, 2011, 04:03:37 pm
Ok now it is work.

I do this, open install.php,

and change line 61

Quote
'cfSQLPictureSelect' => 'p.filepath AS pFilepath, p.filename AS pFilename, p.aid AS pAid, p.filesize AS pFilesize, p.title AS pTitle, p.caption AS pCaption, p.owner_name AS pOwner_name, p.owner_id as pOwnerId, p.ctime AS pCtime, p.hits AS pHits, p.pid AS pPid, p.pic_rating AS pPic_Rating,  p.votes AS pVotes, p.pwidth AS pWidth, p.pheight AS pHeight, p.user1 as pUser1, p.user2 as pUser2, p.user3 as pUser3, p.user4 as pUser4, c.cid as cCid, c.name as cName, c.description as cDescription, c.pos as cPos, c.parent as cParent, c.thumb as cThumb',

to

Quote
'cfSQLPictureSelect' => 'p.filepath AS pFilepath, p.filename AS pFilename, p.aid AS pAid, p.filesize AS pFilesize, p.title AS pTitle, p.caption AS pCaption, p.owner_id as pOwnerId, p.ctime AS pCtime, p.hits AS pHits, p.pid AS pPid, p.pic_rating AS pPic_Rating,  p.votes AS pVotes, p.pwidth AS pWidth, p.pheight AS pHeight, p.user1 as pUser1, p.user2 as pUser2, p.user3 as pUser3, p.user4 as pUser4, c.cid as cCid, c.name as cName, c.description as cDescription, c.pos as cPos, c.parent as cParent, c.thumb as cThumb',

It is work.

Thanks
Title: Re: CPMfetch for 1.5.6
Post by: secret-charms on June 08, 2012, 11:38:29 pm
The install went fine after I change the code in the install.php, but now I'm getting this:

These images were found and displayed by using the following PHP code:
Quote
<?php
  include "./cpmfetch.php";
  $objCpm = new cpm("./cpmfetch_config.php");
  $objCpm->cpm_viewLastAddedMedia(1,4);
  $objCpm->cpm_close();
?>
Please note: Unless you are running this code from the same directory as the cpmfetch_config.php file, you need to alter that path so it can be found. The same goes for the include statement.

For example, if you want to add these images into your home page and your cpmfetch directory is inside your gallery directory (which is named gallery) it would look more like this:

Quote
<?php
  include "./gallery/cpmfetch/cpmfetch.php";
  $objCpm = new cpm("./gallery/cpmfetch/cpmfetch_config.php");
  $objCpm->cpm_viewLastAddedMedia(1,4);
  $objCpm->cpm_close();
?>

So where do I change it so it's picking up images right. Cause my cpmfetch is the gallery folder like recommended. This is the warning I'm getting on the main page of my site under recent pictures (but the code in that file (line 44) is the same as the second code. So I'm confused. :/

Quote
Warning: include_once(./gallery/cpmfetch/cpmfetch.php) [function.include-once]: failed to open stream: No such file or directory in /home/candyswa/public_html/gallery/recentpix.php on line 44

Sorry if this is really dumb, I'm really new at this and I have no idea how my cmpfetch even got broke, it was original working.
Title: Re: CPMfetch for 1.5.6
Post by: Αndré on June 14, 2012, 12:02:11 pm
Use
Code: [Select]
<?php
  
include "./cpmfetch/cpmfetch.php";
  
$objCpm = new cpm("./cpmfetch/cpmfetch_config.php");
  
$objCpm->cpm_viewLastAddedMedia(1,4);
  
$objCpm->cpm_close();
?>
Title: Re: CPMfetch for 1.5.6
Post by: eita on June 25, 2012, 10:49:06 pm
I wonder if someone can tell me the next step now in order to use cpmfetch. What I have:
*The coppermine gallery in http://mydomain/testgallery/
*An SMF board with Simple Portal at http://mydomain/smftest/
No bridging is done.

I have made the changes in cpmfetch>install.php according to the instruction in this thread, and uploaded the folder cpmfetch with all its content to the testgallery folder. Run the installer and pictures from the gallery was shown in a screen with installationrelated information, no errors.

But how to use it when I want to show the pictures in either the forum itself or a portal block? Most of all I want to use it in a portal block, and have tried to insert the different examples shown above in this thread in a custom block for php codes. I adjusted this to my folder name, maybe not to be done? 

Code: [Select]
<?php
  
include "./testgallery/cpmfetch/cpmfetch.php";
  
$objCpm = new cpm("./testgallery/cpmfetch/cpmfetch_config.php");
  
$objCpm->cpm_viewLastAddedMedia(1,4);
  
$objCpm->cpm_close();
?>

I also tried these two with no luck.
Code: [Select]
<?php
  
include "./cpmfetch.php";
  
$objCpm = new cpm("./cpmfetch_config.php");
  
$objCpm->cpm_viewLastAddedMedia(1,4);
  
$objCpm->cpm_close();
?>

Code: [Select]
<?php
  
include "./cpmfetch/cpmfetch.php";
  
$objCpm = new cpm("./cpmfetch/cpmfetch_config.php");
  
$objCpm->cpm_viewLastAddedMedia(1,4);
  
$objCpm->cpm_close();
?>

But maybe I need to do something very different or simply have missed some part of the instruction in the threads about cmpfetch? I am absolutely a newbie.

Any ideas, please?
Title: Re: CPMfetch for 1.5.6
Post by: lurkalot on June 25, 2012, 11:17:17 pm
eita,  if you're using a php block in your portal then you won't need the

<?php  at the beginning

And the ?> at the end of your code.

You could try the code I use in a Tinyportal php block, it's the second one in this post http://forum.coppermine-gallery.net/index.php/topic,65412.msg336985.html#msg336985

You'll need to change the url's etc to match yours instead of mine. ;)
Title: Re: CPMfetch for 1.5.6
Post by: eita on June 25, 2012, 11:34:11 pm
That was quick reply, lurkalot  :), thanks a lot. But I'm probablys still doing something wrong, bexause when I tried the mentioned codes I got these errors:

The first (shown in my post):
Code: [Select]
Syntax error in block code. Please check the code.
The other two (shown in my post) both gave the same error message:
Code: [Select]
Fatal error: Class 'cpm' not found in /home/eita932/public_html/smftest/Sources/PortalBlocks.php(3561) : eval()'d code on line 2
Title: Re: CPMfetch for 1.5.6
Post by: eita on June 27, 2012, 11:14:43 pm
That was it, lurkalot  ;D - it was perfect.
Thank you a billion times!
Title: Re: CPMfetch for 1.5.6
Post by: lurkalot on June 29, 2012, 12:36:25 am
That was it, lurkalot  ;D - it was perfect.
Thank you a billion times!

No problem.  By the way, as your using SMF, and Simpleportal, do your thumbnails align to the left in your block?  if so ad this to your index.css file in each theme you use. 

Code: [Select]
#cpmfetch table {
    width: 100%;
}

#cpmfetch td {
    width: 25%;
}

#cpmfetch {
    text-align: center;
}
Title: Re: CPMfetch for 1.5.6
Post by: eita on June 29, 2012, 02:02:43 am
Yes, they align to the left. No big deal, but even better if they are in the center. I sure will try your solution  ;).

Simpleportal is my choice, no doubt about it. (Using the SMF default theme) it even created a scrollbar when I tested to move a block containing several thumbnails to the left side blocks. Different with the core theme..that expanded to fit the number of images no matter of it was two or more.. But that's not about your great code.

One more thing you might be able to help me with, if you would be so kind? I changed your code to show random insted of latest pictures. Have no idea about how things should be done, just tested...and it worked great. But when looking closer to the code I see one more thing that probably should be changed. I just have no idea what to change it into.

Code: [Select]
echo '<div id="cpmfetch">';chdir("../cpg15x/cpmfetch/");include "cpmfetch.php"; $objCpm = new cpm();$options = array("subtitle" => "<center>{{pTitle}} <br>{{pHits}} Views <center> </center>");$objCpm->cpm_viewRandomMedia(1,4,$options);$objCpm->cpm_close();chdir("../../");echo '<a href="http://bestregion.net/cpg15x/thumbnails.php?album=lastup&cat=0?action=gallery"><u><b>View more random images</b></u></a>';
if ($context['user']['is_logged'])

if ($context['user']['is_logged'])
{
$thecat = 10000 + $context['user']['id'];
echo ' •
<a href="http://bestregion.net/cpg15x/index.php?cat='. $thecat .'" alt="My Gallery"><u><b>My Gallery</b></u></a>';
}

My question is if this (bold) should be changed? Just ask because for me as total stranger to coding might look as short for "latest uploaded/updated":
/thumbnails.php?album=lastup&cat=0?action=gallery"><u><b>View more random images</b></u></a>'

Just asking  :) 
Title: Re: CPMfetch for 1.5.6
Post by: eita on June 29, 2012, 02:20:39 am
One more thing to mention: the code works just as good on bridged as on not bridged Coppermine/SMF. If someone wonder.
Title: Re: CPMfetch for 1.5.6
Post by: Αndré on June 29, 2012, 08:43:46 am
Code: [Select]
thumbnails.php?album=lastuphas to be changed to
Code: [Select]
thumbnails.php?album=randomto access the "random" meta album.
Title: Re: CPMfetch for 1.5.6
Post by: lurkalot on June 29, 2012, 08:55:19 am

My question is if this (bold) should be changed? Just ask because for me as total stranger to coding might look as short for "latest uploaded/updated":
/thumbnails.php?album=lastup&cat=0?action=gallery"><u><b>View more random images</b></u></a>'

Just asking  :)

That bit of code was added just to give the block a bit more functionality, As I was pulling the latest gallery images to my front page, I thought it would be useful to have a show more latest images link.  You are set to random, so you could replace "lastup" in that line to "random" if you wish.
Title: Re: CPMfetch for 1.5.6
Post by: eita on June 29, 2012, 12:29:58 pm
Thank you, André and lurakot. I will change that bit of the code as soon as I'm back at my own computer. Even if it's working great as it is I suppose it will prevent trouble at some point to do so.
Great help and support, people, and please excuse such silly questions. It's great to receive help even if one don't know anything about coding.
I salut you!
Title: Re: CPMfetch for 1.5.6
Post by: ian_m on March 10, 2013, 01:19:15 am
Can someone give me some info to help get me started with CPMfetch.

I am using coppermine 1.5.22 andthe only download of CPMfetch that I can find is 1.63

This thread starts with changing the 1 line of code in install.php however in my download that files contains no php just the following

Code: [Select]
/**
 *  RELEASE VERSION: 1.6.3
 *
 * This is the installation program for CpmFetch. 
 *
 * Usage:  Call this file from a web browser and follow the instructions
 *
 */

I had a scan here http://sourceforge.net/projects/coppermine/files/Plugins/1.5.x/ and cant find it and have been unable to locate downloads in any other treads. Its late and I might be overlooking the obvious so sorry if I am but can someone point me to a download for 1.5.22 or the older one that has the one line of code that requires changing for the newer coppermine.

Many thanks

Ian
Title: Re: CPMfetch for 1.5.6
Post by: lurkalot on March 10, 2013, 09:43:55 am

I am using coppermine 1.5.22 andthe only download of CPMfetch that I can find is 1.63


Ian. The edited version of CpmFetch 2.0.0 is attached to the bottom of the very first post in this thread. Here (http://forum.coppermine-gallery.net/index.php/topic,65412.msg324838.html#msg324838)
Title: Re: CPMfetch for 1.5.6
Post by: ian_m on March 10, 2013, 11:06:22 pm
A haa I was having a blind moment thanks for that.

I must say the docs are really impressive, the only thing is on the download it might be worth updating that line 61 with the working code for 1.5

Thanks again and sorry for my post I just seemed to be over looking it somehow.

Cheers

Ian
Title: Re: CPMfetch for 1.5.6
Post by: lurkalot on March 10, 2013, 11:32:22 pm
A haa I was having a blind moment thanks for that.

I must say the docs are really impressive, the only thing is on the download it might be worth updating that line 61 with the working code for 1.5

Thanks again and sorry for my post I just seemed to be over looking it somehow.

Cheers

Ian

Ian, not your fault, I added it after you posted. Actually the file should already have the edit for 1.5.x  I edited it before I uploaded it.  Please make sure you got the file from the first post in this topic, not the file I pointed to earlier today.
Title: Re: CPMfetch for 1.5.6
Post by: ian_m on March 11, 2013, 12:18:02 am
I think I downloaded the file about 5 mins after your post last night however more than an hour has past since I downloaded so cant remember now.
Good news that whatever download I have is working fine I am only using for something very simple when I get more time I might add the Jquery nivo slider to get some cool fade effects but I really only want get a most recent uploads to show on a sidebar.

For info this is in fact being called from a snippet on the MODx framework which runs the site I am using coppermine for the site gallery as I have found most of the MODx images scripts to much hassle to get things how I want them.

Thanks again

Ian
Title: Re: CPMfetch for 1.5.6
Post by: gmc on March 19, 2013, 03:58:58 am
Trying to run CPMFetch against a Gallery at version 1.5.22.
I downloaded the newest file (from first post in this thread), uploaded the cpmfetch folder and ran the install.
The install worked and displayed photos as expected.
The cfig_random.php script however doesn't appear to be working - attempts to run it result in the error (image):
"The image "http://greggallery.gmcdesign.com/cpmfetch/cfig_random.php" cannot be displayed because it contains errors."
The response should be the display of a random image from the gallery suitable for use in a IMG tag...

Tried setting debug in cpmfetch_config.php:
// Toggles debug mode on / off - put inline as HTML comments
  $config_overrides['cfDebugMode'] = 'true';
but as this is only expected to ruturn a jpg image - no diagnostics are visible...

The cpmfetch_config.php that I had working with an old 1.4.x gallery indicated:
$CONFIG_WRITTEN_VERSION="2.1.1";

The current cpmfetch_config.php downloaded and installed with 1.5.22 gallery indicates:
$CONFIG_WRITTEN_VERSION="2.0.0";

cfig_random.php includes cfimaget.php - which contains (at 2.0.0):
// This one you need to adjust unless your galler is at http://www.youname.com/photos
// If you installed right to the root of your web site, just use a /
// TODO This should be path to config file
//  $urltocpm = "/photos/";
$pathToConfigFile = "";
It appears the 'todo' was done - and now no update is needed?

the 2.1.1 version contained these comments leading me to believe "" is he correct value (cfimageget.php is in the same folder):
// This is the relative path to the cpmfetch_config.php file
// If this script is in the same directory as the cpmfetch.php file, you should be able
// to leave it blank
$pathToConfigFile = "";

I can dig deeper into this - but wanted to see if I was missing something obvious...  or if there is a known problem in this area (didn't see any other hits on the board searching...)
My primary use of cpmfetch is via variations of the cfig_random.php script in image tags to pull random images meeting certain category or album criteria...

Gallery info:
My gallery is at http://greggallery.gmcdesign.com  running Version 1.5.22
Plugins: minicms and shopcpg
Mods: cpmfetch
You can view the error using:
http://greggallery.gmcdesign.com/cpmfetch/cfig_random.php
A working version (V2.1.1 of CPMFetch against an old gallery (1.4.x) waiting for an upgrade...):
http://skygallery.gmcdesign.com/cpmfetch/cfig_random.php

Thanks for the help!
Greg
Title: Re: CPMfetch for 1.5.6
Post by: gmc on March 21, 2013, 06:12:01 am
Well... think I solved my problem... I went back to what I was running with the 1.4.x galleries - which appears to be a higher version of CPMFETCH than what is available here - 2.1.1 vs 2.0.0.
I did need to change line 61 of install.php to change the reference to p.owner_name as described in earlier post - and then all was well again.

I'll look for my original download of 2.1.1 in case someone else needs it.

Greg
Title: Re: CPMfetch for 1.5.6
Post by: lurkalot on March 21, 2013, 08:01:22 am
Well... think I solved my problem... I went back to what I was running with the 1.4.x galleries - which appears to be a higher version of CPMFETCH than what is available here - 2.1.1 vs 2.0.0.
I did need to change line 61 of install.php to change the reference to p.owner_name as described in earlier post - and then all was well again.

I'll look for my original download of 2.1.1 in case someone else needs it.

Greg

2.0.0 was the latest stable release, I think you must have a development release.
Title: Re: CPMfetch for 1.5.6
Post by: gmc on March 21, 2013, 01:31:23 pm
Appears so... I found the original zip - and it was named copperminefetch-2.1.1-dev.zip.  Looks like I downloaded it in 2009 - would have only been to fix a problem I was having... I will play with dev versions in my 'sandbox' - but I had implemented this across my sites in the same timeframe as upgrades to 1.4.21.

If you would like a copy of the zip - let me know...
A quick 'size' compare shows about 2500 byte increase in cpmfetch.php; 2500 byte increase in cpmfetch_dao.php; 400 byte decrease in cfimageget.php.

It does need the same one line change in install.php that version 2.0.0 required to work with 1.5.x.

Greg
Title: Re: CPMfetch for 1.5.6
Post by: gmc on March 21, 2013, 01:47:57 pm
And from the 2.1.1 changelog - specifically had changes to cfimageget (included in cfig_random.php) to support cpmfetch v2...

Changes to cfimageget

2007-06-20 05:43  wbchmura

  * .: Fixes to make it compatible with cpmfetch 2.x. Also added in
    normal as alias to int, cat as an alias to category.

Attaching the release notes in case others have issues with 2.0.0...
Greg
Title: Re: CPMfetch for 1.5.6
Post by: kwalsh on May 20, 2013, 01:26:25 am
Hi guys

installed this a few times in the past so im not sure why im having trouble with it.

My gallery thumbs are too big for the space i want them to show up on my main page. I tried to use the resize code but they are not resizing and i dont understand why!

Heres the code i currently have:

Code: [Select]
<?php
  
include "./gallery/cpmfetch/cpmfetch.php";
  
$objCpm = new cpm("./gallery/cpmfetch/cpmfetch_config.php");
  
$options = array('windowtarget' => '_blank',"imageheight"=>'30',"imagewidth"=>'30');
  
$objCpm->cpm_viewLastAddedMedia(1,4);
  
$objCpm->cpm_close();
?>

the thumbs at the moments are 120 pixels which are way too big for what i need, i need at least half that size.
Title: Re: CPMfetch for 1.5.6
Post by: kwalsh on May 20, 2013, 11:08:41 am
After much thinking, i think its my div tables that are surrounding it. Anyone good at coding can confirm/fix please?

Code: [Select]
<div style="position:absolute; left:157px; top:568px; width:651px;">
Hi guys

installed this a few times in the past so im not sure why im having trouble with it.

My gallery thumbs are too big for the space i want them to show up on my main page. I tried to use the resize code but they are not resizing and i dont understand why!

Heres the code i currently have:

Code: [Select]
<?php
  
include "./gallery/cpmfetch/cpmfetch.php";
  
$objCpm = new cpm("./gallery/cpmfetch/cpmfetch_config.php");
  
$options = array('windowtarget' => '_blank',"imageheight"=>'30',"imagewidth"=>'30');
  
$objCpm->cpm_viewLastAddedMedia(1,4);
  
$objCpm->cpm_close();
?>

the thumbs at the moments are 120 pixels which are way too big for what i need, i need at least half that size.
Title: Re: CPMfetch for 1.5.6
Post by: Αndré on May 21, 2013, 11:36:01 am
A link to the affected page would be really helpful.
Title: Re: CPMfetch for 1.5.6
Post by: forbesy on August 27, 2013, 08:43:17 am
A quick question ;

I've got CPMFetch running nicely, displaying six random images from the gallery on my (myBB 1.6) forum, (all bridging working fine) but how do I tweak the information that is displayed below each picture?  I'm sure that there's just a line I need to change somewhere - essentially, all I want displayed is the image title (not description, owner name etc, number of views, etc).  I'm a bit of a newb to this PHP game - I've had a look through the cpmfetch.php file, but can't see anything obvious that needs to be changed.

Any help grateully appreciated!

Matt
Southsea UK

Forum - http://fhd-forums.orgfree.com/forums/index.php
CPGallery - http://fhd-forums.orgfree.com/gallery/index.php


Title: Re: CPMfetch for 1.5.6
Post by: Αndré on August 27, 2013, 09:19:51 am
Is this topic already solved, as I cannot see any information below your pictures? I don't know this plugin well, so there's maybe some option like "show meta data blow pictures on/off", which you currently use.
Title: Re: CPMfetch for 1.5.6
Post by: astrasuite on September 19, 2013, 01:07:20 am
That's a tough one it seems, at least for me.  I think you will have to modify function createTable in cpmfetch.php to add the title under each table TR created ...

I prefer to have no titles under thumbnails, but open the larger image in Lightbox, and the title will be there ... example below where I use cpmfetch in Wordpress, fetching images from my coppermine gallery

http://www.astrasuite.com/astrablog/palmer-audio-2-5-turntable-gallery/


A quick question ;

I've got CPMFetch running nicely, displaying six random images from the gallery on my (myBB 1.6) forum, (all bridging working fine) but how do I tweak the information that is displayed below each picture?  I'm sure that there's just a line I need to change somewhere - essentially, all I want displayed is the image title (not description, owner name etc, number of views, etc).  I'm a bit of a newb to this PHP game - I've had a look through the cpmfetch.php file, but can't see anything obvious that needs to be changed.

Any help grateully appreciated!

Matt
Southsea UK

Forum - http://fhd-forums.orgfree.com/forums/index.php
CPGallery - http://fhd-forums.orgfree.com/gallery/index.php
Title: Re: CPMfetch for 1.5.6
Post by: astrasuite on September 22, 2013, 02:42:01 pm
While migrating my Wordpress Nextgen images to Coppermine, to be called by cpmfetch instead, I just realized I do have some rare occasions where having a title under thumbs is good. 

I use cpg1.5.24, cpmfetch 2.1.1, using the function cpm_viewLastAddedMediaFrom.  The cpmfetch subtitle option does not seem to work. 

For those with the same configuration, I modified the function htmlTagTD under cpmfetch.php (jcr are my comments) :


Code: [Select]
function htmlTagTD($contents, $row) {
$htmlOut = '<td';

if (array_key_exists('cellstyle',$this->styleHash))
$htmlOut .= " {$this->styleHash['cellstyle']}";

// jcr - added check if row is null to avoid PHP warnings by server - $row != "" and
if ($row != "" and array_key_exists('cpmCellCssId',$row)) $htmlOut .= " id='{$row['cpmCellCssId']}'";


$htmlOut .= $this->getOptionAttributes("cellattributes");

//jcr - cancel this out and expand it -  $htmlOut .= '>' . $contents . '</td>' . "\n";

//jcr - add title below thumb if requested - i.e. 'showtitle' is in options
if ((array_key_exists('showtitle',$this->optionHash)) and (array_key_exists('cpmAlttag',$row))) {
$htmlOut .= '>' . $contents . "\n" . $row['cpmAlttag'] . '</td>' . "\n";
} else {
$htmlOut .= '>' . $contents . '</td>' . "\n";
}

return $htmlOut;

/*
$htmlOut = '<td';
if (array_key_exists('cellstyle',$this->styleHash)) $htmlOut .= " {$this->styleHash['cellstyle']}";
if ($extraAttributes != "") $htmlOut .= " " . $extraAttributes;
$htmlOut .= $this->getOptionAttributes("cellattributes");
$htmlOut .= '>' . $contents . '</td>' . "\n";
return $htmlOut;
*/


}

I then call from my wordpress post as shown below.  This calls 2 albums, the second album is the one where I want titles under the thumb.  I just pass "showtitle" => "true" as part of the options array, as well as a css style to center it.

The result is at -> http://www.astrasuite.com/astrablog/absolare-gallery/

Code: [Select]

  include "../client-system-albums/cpmfetch/cpmfetch.php";
  $objCpm = new cpm("../client-system-albums/cpmfetch/cpmfetch_config.php");
  $objCpm->cpm_unlock_private(true);
  $options=array(imagesize => "thumb", imagelink => "large", imagewidth => "128", imageheight => "128", windowtarget => "_blank", "alttag" => "{{pTitle}}", "tablestyle" => "center-css-table");
  $objCpm->cpm_viewLastAddedMediaFrom ("album=152",20,5,$options);
  echo '<div class="clr"></div>';
  echo "<p>&nbsp;</p>";
  echo "<p>&nbsp;</p>";
  echo "<p>&nbsp;</p>";
  echo "<div class='h2h1-custom7'><h2>Absolare Leather Options</h2></div>";
  $options=array(imagesize => "thumb", imagelink => "large", imagewidth => "128", imageheight => "128", windowtarget => "_blank", "alttag" => "{{pTitle}}", "tablestyle" => "center-css-table", "showtitle" => "true", "cellstyle" => "center-text");
  $objCpm->cpm_viewLastAddedMediaFrom ("album=153",20,5,$options);
  $objCpm->cpm_close();
Title: Re: CPMfetch for 1.5.6
Post by: basyephoto on May 31, 2014, 12:26:04 am
First thanks for this, I have a need to support external random photos from my website.  I installed this and it appears to be working fine, however I am seeing the last uploaded instead of the random files.  I see some posted the same thing, and I also see what to find and replace, but I am not sure what file you are talking about?  I can not find that code in the config or cpmfetch file. 

http://centralgarrisonphotos.com/cpmfetch/install.php

There is my install which works fine, to link to form an outside site would the following code work?

<?php
  include "http://centralgarrisonphotos.com/cpmfetch/cpmfetch.php";
  $objCpm = new cpm("http://centralgarrisonphotos.com/cpmfetch/cpmfetch_config.php");
  $objCpm->cpm_viewLastAddedMedia(1,1);
  $objCpm->cpm_close();
?>

<?php
  include "http://centralgarrisonphotos.com/cpmfetch/cpmfetch.php";
  $objCpm = new cpm("http://centralgarrisonphotos.com/cpmfetch/cpmfetch_config.php");
  $objCpm->cpm_viewRandomMedia(1,1):
  $objCpm->cpm_close();
?>

Can I just change the third line to display random images?  I also want to display just one image, so I am assuming this is correct to display?
Title: Re: CPMfetch for 1.5.6
Post by: Αndré on June 16, 2014, 12:23:35 pm
Code: [Select]
$objCpm->cpm_viewRandomMediathat method needs to be supported by the CPMFetch object. As I never used CPMFetch, I don't know if it will work. Maybe someone else can check or test that.
Title: Re: CPMfetch for 1.5.6
Post by: gmc on June 17, 2014, 04:44:26 am
Sorry I missed this thread somehow...  Thanks for 'bumping' it André

Yes - I would expect the code you cited to work... The first example will show the last added file, and the second random (which of course sometimes will be the last added...) Each of your examples will display a single image (1 row by 1 column).

It's only necessary to include cpmfetch.php once... the code will be reused. You can either delete one include - or change to include_once and let php determine if its been loaded already.

This is an extract of code I use with $rows, $columns, $options set prior.  $options can be omitted or be an empty array if not used.
Code: [Select]
      include_once "$cpg_rel/cpmfetch/cpmfetch.php";
      $objCpm = new cpm("$cpg_rel/cpmfetch/cpmfetch_config.php");
      $objCpm->cpm_viewRandomMedia($rows, $columns, $options);
      $objCpm->cpm_close();

You can see this code in use at http://www.skymasters.org - the random photos down the right column and across the bottom are both served by cpmfetch using the code above...
Title: Re: CPMfetch for 1.5.6
Post by: debuk on August 09, 2014, 05:39:18 pm
I am slightly confused with cpmfectch.

I have the following php code

<?php
  include "./gallery/cpmfetch/cpmfetch.php";
  $objCpm = new cpm("./gallery/cpmfetch/cpmfetch_config.php");
$options = array('windowtarget' => '_blank',"imagewidth"=>"60", "imagelength"=>"60","tablestyle" => "cpmfetch");
  $objCpm->cpm_viewLastAddedMedia(4,1);
  $objCpm->cpm_close();
?>

My issue is with the $options part. Have I added it incorrectly? When clicking an image it takes you to the gallery on the same page not a blank/new one and the images aren't resizing either.

Now I'm trying to style the images and have a css file named cpmfetch.css located in the cpmfetch directory. How do I link to this file, at present I have  "tablestyle" => "cpmfetch"  but I'm assuming that is totally wrong.

The website is danicapatrick.uk (http://danicapatrick.uk)
Title: Re: CPMfetch for 1.5.6
Post by: debuk on August 09, 2014, 05:42:51 pm
UPDATE: I have now added the $options in the code and have the images resized etc it is just the style sheet that I can't link to.
Title: Re: CPMfetch for 1.5.6
Post by: debuk on August 09, 2014, 06:13:43 pm
So I've realised that "tablestyle" => "cpmfetch" is calling up a classname from a stylesheet, so where do I add my css?

I wish you had the option to edit previous posts  :-[
Title: Re: CPMfetch for 1.5.6
Post by: gmc on August 10, 2014, 12:03:26 am
Since CPMFetch is invoked outside of Coppermine - you will need to edit the relevant style sheet used on the page you are displaying the pics...

Looking at the source for page danicapatrick.uk - I see many <link rel='stylesheet' ...> tags...
The desired CSS source can be added to any of these - or in a new file that is included.
(or any other mechanism wordpress (what it appears to be) allows for adding CSS code.)

Greg
Title: Re: CPMfetch for 1.5.6
Post by: netb on March 11, 2015, 03:15:34 pm
Which is the latest version? I decided to try this and it looks really cool but the forum is bloated with topics and as I have seen some users are using the cpmfetch 2.1.1 of which I can't find a download link anywhere. Only version 2.0 in the first post and gmc talks about 2.1.1 but no links.
Title: Re: CPMfetch for 1.5.6
Post by: gmc on March 14, 2015, 11:46:20 pm
V2.0.0 is the latest 'stable' release - and many are using that on their sites...
V2.1.1 is a development release that was never completed or officially released.
At least one item addressed there is for cfimageget - used to display CPG images on external sites (where there is no access to include the cpmfetch code). cfimageget.php is placed in an <img src=...> tag - and the script returns an image the browser will display. This did not work properly in 2.0.0.

I have now attached the V2.1.1 code to the first post, and separately the release notes (also included in the zip) - so you can see the changes and determine which version to use.
Remember 2.1.1 is a dev/beta release... I have been using it for years across my sites - but your mileage may vary... I certainly don't use all the available features in my installations.

Greg
http://greggallery.gmcdesign.com (http://greggallery.gmcdesign.com)
Title: Re: CPMfetch for 1.5.6
Post by: panhead on May 25, 2015, 09:19:05 pm
I am using phpBB and like to include cpmfetch in the index.php. Does anyone know where to put the code in index.php?
Title: Re: CPMfetch for 1.5.6
Post by: Phill Luckhurst on May 26, 2015, 12:15:19 am
That depends so much on the design of the page and where exactly you want to put the images. I think that is a question better asked on the phpBB forums as they will know their code better than we do.
Title: Re: CPMfetch for 1.5.6
Post by: panhead on May 26, 2015, 08:14:00 am
OK, will do.
Title: Re: CPMfetch for 1.5.6
Post by: zebios on November 22, 2016, 06:24:14 am
Hello,

it works fine for me, but can i center the Picture in a Block?
Title: Re: CPMfetch for 1.5.6
Post by: gmc on November 22, 2016, 01:25:20 pm
Hello,

it works fine for me, but can i center the Picture in a Block?
You didn't say what software you are using for your 'Block'.. I assume either a portal or CMS...

My response above still applies:
Since CPMFetch is invoked outside of Coppermine - you will need to edit the relevant style sheet used on the page you are displaying the pics...
How it appears on your page will be controlled by that page's CSS...
Title: Re: CPMfetch for 1.5.6
Post by: madaxeman on December 10, 2016, 04:53:26 pm
Thought this might be helpful to someone ... I'd been getting the following error message in my installation:
Strict Standards: Only variables should be assigned by reference in /pathtogallery/cpmfetch/cpmfetch.php on line 573
I managed to make it go away by including this line
Quote
error_reporting(E_ALL & ~E_STRICT & ~E_NOTICE);
after
Quote
<?php include "../gallery/cpmfetch/cpmfetch.php";
on the first instance of cpmfetch on the page.
Title: Re: CPMfetch for 1.5.6
Post by: debraguk on April 25, 2017, 05:12:57 pm
Current issues :(

Code: [Select]
Strict Standards: Declaration of cpm::debugPrint() should be compatible with cpm_dao::debugPrint() in /home/runninga/danica-patrick.co.uk/gallery/cpmfetch/cpmfetch.php on line 50
Code: [Select]
Warning: mysql_connect(): Headers and client library minor version mismatch. Headers:50633 Library:50552 in /home/runninga/danica-patrick.co.uk/gallery/cpmfetch/cpmfetch_dao.php on line 1196
Code: [Select]
Warning: mysql_connect(): Headers and client library minor version mismatch. Headers:50633 Library:50552 in /home/runninga/danica-patrick.co.uk/gallery/cpmfetch/install.php on line 236
debug info:

Code: [Select]
CpmFetch Install Script version 2.0.0
do=install
path=
force=true
Command install issued to script
* * BEGIN SERVER SETTINGS * *
SERVER HTTP_ACCEPT: text/html,application/xhtml+xml,application/xml;q=0.9,image/
webp,*/*;q=0.8
SERVER HTTP_ACCEPT_ENCODING: gzip, deflate, sdch
SERVER HTTP_ACCEPT_LANGUAGE: en-US,en;q=0.8
SERVER HTTP_CONNECTION: keep-alive
SERVER HTTP_COOKIE: 6c766cc85b647a61e007c9ccec825642=5682cb1e213cd02836d9729933c
39b66; PHPSESSID=5db5ee5bc0da308490e9d28c1089ffe3; cpg15x_data=YTozOntzOjI6IklEI
jtzOjMyOiI5OGZiYjdkZWIyMGMwNjVhODY2NzA5MWE0N2Y2NzY3YiI7czoyOiJhbSI7aToxO3M6NDoib
GFuZyI7czo3OiJlbmdsaXNoIjt9
SERVER HTTP_HOST: danica-patrick.co.uk
SERVER HTTP_REFERER: http://danica-patrick.co.uk/gallery/cpmfetch/install.php
SERVER HTTP_USER_AGENT: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/53
7.36 (KHTML, like Gecko) Chrome/57.0.2987.133 Safari/537.36
SERVER HTTP_UPGRADE_INSECURE_REQUESTS: 1
SERVER DOCUMENT_ROOT: /home/runninga/danica-patrick.co.uk
SERVER REMOTE_ADDR: 81.99.65.121
SERVER REMOTE_PORT: 61867
SERVER SERVER_ADDR: 185.116.212.70
SERVER SERVER_NAME: danica-patrick.co.uk
SERVER SERVER_ADMIN: webmaster@danica-patrick.runningandstrength.com
SERVER SERVER_PORT: 80
SERVER REQUEST_URI: /gallery/cpmfetch/install.php?do=install&force=true
SERVER SCRIPT_FILENAME: /home/runninga/danica-patrick.co.uk/gallery/cpmfetch/ins
tall.php
SERVER QUERY_STRING: do=install&force=true
SERVER SCRIPT_URI: http://danica-patrick.co.uk/gallery/cpmfetch/install.php
SERVER SCRIPT_URL: /gallery/cpmfetch/install.php
SERVER SCRIPT_NAME: /gallery/cpmfetch/install.php
SERVER SERVER_PROTOCOL: HTTP/1.1
SERVER SERVER_SOFTWARE: LiteSpeed
SERVER REQUEST_METHOD: GET
SERVER X-LSCACHE: 1
SERVER PHP_SELF: /gallery/cpmfetch/install.php
SERVER REQUEST_TIME_FLOAT: 1493132849.16
SERVER REQUEST_TIME: 1493132849
SERVER argv: Array
SERVER argc: 1
* * END SERVER SETTINGS * *
Found config file at ../include/config.inc.php
Found init file at ../include/init.inc.php
force set, skipping version checks
Opening config file at ../include/config.inc.php
Retrieving config from database
* * BEGIN CPG CONFIG TABLE * *
CONFIG: admin_activation: 0
CONFIG: albums_per_page: 12
CONFIG: album_list_cols: 1
CONFIG: album_sort_order: pa
CONFIG: album_uploads_default: NO
CONFIG: alb_desc_thumb: 1
CONFIG: alb_list_thumb_size: 50
CONFIG: allowed_doc_types: doc/txt/rtf/pdf/xls/pps/ppt/zip/gz/mdb
CONFIG: allowed_img_types: jpeg/jpg/png/gif
CONFIG: allowed_mov_types: asf/asx/mpg/mpeg/wmv/swf/avi/mov
CONFIG: allowed_snd_types: mp3/midi/mid/wma/wav/ogg
CONFIG: allow_duplicate_emails_addr: 0
CONFIG: allow_email_change: 0
CONFIG: allow_guests_enter_file_details: 0
CONFIG: allow_memberlist: 0
CONFIG: allow_private_albums: 1
CONFIG: allow_unlogged_access: 3
CONFIG: allow_user_account_delete: 0
CONFIG: allow_user_album_keyword: 0
CONFIG: allow_user_edit_after_cat_close: 0
CONFIG: allow_user_move_album: 0
CONFIG: allow_user_registration: 0
CONFIG: allow_user_upload_choice: 1
CONFIG: auto_resize: 1
CONFIG: batch_add_hide_existing_files: 0
CONFIG: batch_proc_limit: 2
CONFIG: bridge_enable: 0
CONFIG: browse_batch_add: 1
CONFIG: browse_by_date: 0
CONFIG: caption_in_thumbview: 1
CONFIG: categories_alpha_sort: 0
CONFIG: charset: utf-8
CONFIG: clickable_keyword_search: 1
CONFIG: comments_anon_pfx: Guest_
CONFIG: comments_per_page: 20
CONFIG: comments_sort_descending: 0
CONFIG: comment_akismet_api_key:
CONFIG: comment_akismet_counter: 0
CONFIG: comment_akismet_enable: 0
CONFIG: comment_akismet_group: 0
CONFIG: comment_approval: 0
CONFIG: comment_captcha: 1
CONFIG: comment_placeholder: 1
CONFIG: comment_promote_registration: 0
CONFIG: comment_user_edit: 1
CONFIG: contact_form_guest_email_field: 2
CONFIG: contact_form_guest_enable: 0
CONFIG: contact_form_guest_name_field: 2
CONFIG: contact_form_registered_enable: 1
CONFIG: contact_form_sender_email: 1
CONFIG: contact_form_subject_content: Coppermine gallery contact form
CONFIG: contact_form_subject_field: 0
CONFIG: cookies_need_consent: 0
CONFIG: cookie_name: cpg15x
CONFIG: cookie_path: /
CONFIG: count_admin_hits: 0
CONFIG: count_album_hits: 1
CONFIG: count_file_hits: 1
CONFIG: custom_footer_path:
CONFIG: custom_header_path:
CONFIG: custom_lnk_name:
CONFIG: custom_lnk_url:
CONFIG: custom_sortorder_thumbs: 1
CONFIG: debug_mode: 0
CONFIG: debug_notice: 0
CONFIG: default_dir_mode: 0755
CONFIG: default_file_mode: 0644
CONFIG: default_sort_order: na
CONFIG: disable_comment_flood_protect: 0
CONFIG: display_comment_approval_only: 0
CONFIG: display_comment_count: 0
CONFIG: display_coppermine_news: 0
CONFIG: display_filename: 0
CONFIG: display_film_strip: 1
CONFIG: display_pic_info: 0
CONFIG: display_redirection_page: 0
CONFIG: display_reset_boxes_in_config: 0
CONFIG: display_sidebar_guest: 1
CONFIG: display_sidebar_user: 1
CONFIG: display_stats_on_index: 1
CONFIG: display_thumbnail_rating: 0
CONFIG: display_thumbs_batch_add: 1
CONFIG: display_uploader: 0
CONFIG: display_xp_publish_link: 0
CONFIG: ecards_more_pic_target: http://www.danicapatrick.uk/gallery/
CONFIG: ecard_flash: 0
CONFIG: editpics_ignore_newer_than: 0
CONFIG: email_comment_notification: 0
CONFIG: enable_encrypted_alb_passwords: 1
CONFIG: enable_encrypted_passwords: 1
CONFIG: enable_help: 1
CONFIG: enable_menu_icons: 2
CONFIG: enable_plugins: 1
CONFIG: enable_smilies: 1
CONFIG: enable_thumb_watermark: 1
CONFIG: enable_unsharp: 0
CONFIG: enable_watermark: 0
CONFIG: enable_zipdownload: 0
CONFIG: filter_bad_words: 0
CONFIG: first_level: 0
CONFIG: forbiden_fname_char: $/\\:*?"'<>|` &#@
CONFIG: form_token_lifetime: 900
CONFIG: fullpath: albums/
CONFIG: fullsize_padding_x: 5
CONFIG: fullsize_padding_y: 3
CONFIG: gallery_admin_email: debrag@danicapatrick.uk
CONFIG: gallery_description: Welcome to the Danica Patrick UK gallery where you
will find photos from various projects Danica has done.
CONFIG: gallery_name: Gallery
CONFIG: global_registration_pw:
CONFIG: guest_token_cleanup: 1433454599
CONFIG: hit_details: 0
CONFIG: home_target: index.php
CONFIG: impath:
CONFIG: im_options: -antialias
CONFIG: jpeg_qual: 80
CONFIG: keep_votes_time: 30
CONFIG: keyword_separator: ;
CONFIG: lang: english
CONFIG: language_autodetect: 1
CONFIG: link_last_upload: 0
CONFIG: link_pic_count: 1
CONFIG: login_expiry: 10
CONFIG: login_method: username
CONFIG: login_threshold: 5
CONFIG: log_ecards: 0
CONFIG: log_mode: 0
CONFIG: main_page_layout: breadcrumb/catlist/alblist/random,2/lastup,2
CONFIG: main_table_width: 85%
CONFIG: make_intermediate: 1
CONFIG: max_com_lines: 10
CONFIG: max_com_size: 512
CONFIG: max_com_wlength: 38
CONFIG: max_film_strip_items: 5
CONFIG: max_img_desc_length: 512
CONFIG: max_tabs: 12
CONFIG: max_upl_size: 1024
CONFIG: max_upl_width_height: 2048
CONFIG: media_autostart: 1
CONFIG: min_votes_for_rating: 1
CONFIG: normal_pfx: normal_
CONFIG: offline: 0
CONFIG: old_style_rating: 0
CONFIG: only_empty_albums: 0
CONFIG: orig_pfx: orig_
CONFIG: performance_page_generation_time: 0
CONFIG: performance_page_query_count: 0
CONFIG: performance_page_query_time: 0
CONFIG: performance_timestamp: 0
CONFIG: personal_album_on_registration: 0
CONFIG: picinfo_movie_download_link: 1
CONFIG: picture_table_width: 100%
CONFIG: picture_use: thumb
CONFIG: picture_width: 400
CONFIG: purge_expired_bans: 1
CONFIG: rate_own_files: 0
CONFIG: rating_stars_amount: 5
CONFIG: read_exif_data: 0
CONFIG: read_iptc_data: 0
CONFIG: reduce_watermark: 0
CONFIG: registration_captcha: 0
CONFIG: reg_notify_admin_email: 0
CONFIG: reg_requires_valid_email: 1
CONFIG: report_post: 0
CONFIG: session_cleanup: 1493027867
CONFIG: show_bbcode_help: 1
CONFIG: show_private: 0
CONFIG: show_which_exif: |0|0|0|0|0|0|0|0|1|0|1|1|0|0|0|0|0|0|0|0|0|0|0|1|0|0|0|
1|0|0|0|1|1|0|0|0|0|1|0|0|0|1|0|0|1|1|0|0|0|0|0|1|0|1|1
CONFIG: silly_safe_mode: 0
CONFIG: site_token: b5bec738cb93c9dfd710db0f0ee8169c
CONFIG: slideshow_hits: 1
CONFIG: slideshow_interval: 5000
CONFIG: smtp_host:
CONFIG: smtp_password:
CONFIG: smtp_username:
CONFIG: subcat_level: 1
CONFIG: tabs_dropdown: 1
CONFIG: theme: water_drop
CONFIG: thumbcols: 4
CONFIG: thumbnail_to_fullsize: 0
CONFIG: thumbrows: 3
CONFIG: thumb_height: 100
CONFIG: thumb_method: im
CONFIG: thumb_pfx: thumb_
CONFIG: thumb_use: ex
CONFIG: thumb_width: 100
CONFIG: time_offset: 0
CONFIG: transparent_overlay: 0
CONFIG: unsharp_amount: 120
CONFIG: unsharp_radius: 0.5
CONFIG: unsharp_threshold: 3
CONFIG: upload_create_album_directory: 0
CONFIG: upload_mechanism: swfupload
CONFIG: upl_notify_admin_email: 0
CONFIG: userpics: userpics/
CONFIG: users_can_edit_pics: 0
CONFIG: user_field1_name:
CONFIG: user_field2_name:
CONFIG: user_field3_name:
CONFIG: user_field4_name:
CONFIG: user_manager_hide_file_stats: 0
CONFIG: user_profile1_name: Location
CONFIG: user_profile2_name: Interests
CONFIG: user_profile3_name: Website
CONFIG: user_profile4_name: Occupation
CONFIG: user_profile5_name:
CONFIG: user_profile6_name: Biography
CONFIG: user_registration_disclaimer: 1
CONFIG: views_in_thumbview: 1
CONFIG: vote_details: 0
CONFIG: watermark_file: images/watermark.png
CONFIG: watermark_transparency: 40
CONFIG: watermark_transparency_featherx: 0
CONFIG: watermark_transparency_feathery: 0
CONFIG: where_put_watermark: southeast
CONFIG: which_files_to_watermark: both
* * END CPG CONFIG TABLE * *
* * BEGIN CPG BRIDGE TABLE * *
BRIDGE: cookie_prefix:
BRIDGE: full_forum_url:
BRIDGE: recovery_logon_failures: 0
BRIDGE: recovery_logon_timestamp:
BRIDGE: relative_path_to_config_file:
BRIDGE: short_name:
BRIDGE: use_post_based_groups:
* * END CPG BRIDGE TABLE * *
Closed database connection
Opening init file at ../include/init.inc.php
Reading init file at ../include/init.inc.php
InitFile: CPG Version 1.5.40
Closing init file
* * Generating Dynamic Defaults * *
filesystem_path_to_cpg:/home/runninga/danica-patrick.co.uk/gallery/
domain_name:danica-patrick.co.uk
cpg_album_url:http://www.danicapatrick.uk/gallery/albums/
cpg_url:http://www.danicapatrick.uk/gallery/
* * Assigning bridged settings * *
Bridge_enable: 0
Bridge_short_name:
Bridging is not enabled in CPG
Opening cpmfetch config file: cpmfetch_config.php
Writing cpmfetch config file cpmfetch_config.php
Completed writing config file
Producing output screen and exiting




Title: Re: CPMfetch for 1.5.6
Post by: Phill Luckhurst on April 26, 2017, 11:53:31 am
What version of coppermine are you trying to install this too? What is your PHP version? We require a bit more information.

Also please be aware that Vuud, who developed this plugin, has not visited this site in quite some time.
Title: Re: Re: CPMfetch for 1.5.6
Post by: debraguk on April 26, 2017, 02:26:56 pm
What version of coppermine are you trying to install this too? What is your PHP version? We require a bit more information.

Also please be aware that Vuud, who developed this plugin, has not visited this site in quite some time.

I have coppermine version 1.5.46 and php version 5.4.45
Title: Re: CPMfetch for 1.5.6
Post by: Phill Luckhurst on April 26, 2017, 02:37:34 pm
It seems your problems are currently more than just an issue with cpmfetch. I suggest you start a thread in the support section to get your gallery working first - http://danica-patrick.co.uk/gallery/
Title: Re: Re: CPMfetch for 1.5.6
Post by: debraguk on April 26, 2017, 02:50:52 pm
Great my gallery was working a short while a go. Will have to try to fix that now! - Fixed!!!


I have coppermine version 1.5.46 and php version 5.4.45

I can use php versions 5.5, 5.6, 7.0

I get the following errors when using any of these versions
Code: [Select]
Strict Standards: Declaration of cpm::debugPrint() should be compatible with cpm_dao::debugPrint() in /home/runninga/danica-patrick.co.uk/gallery/cpmfetch/cpmfetch.php on line 50

Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /home/runninga/danica-patrick.co.uk/gallery/cpmfetch/cpmfetch_dao.php on line 1277

Warning: mysql_connect(): Headers and client library minor version mismatch. Headers:50634 Library:50552 in /home/runninga/danica-patrick.co.uk/gallery/cpmfetch/cpmfetch_dao.php on line 1277


Strict Standards: Only variables should be assigned by reference in /home/runninga/danica-patrick.co.uk/gallery/cpmfetch/cpmfetch.php on line 419

If I use cmpfetch version 2.0 install.php doesn't load
Title: Re: CPMfetch for 1.5.6
Post by: debraguk on April 26, 2017, 03:08:04 pm
images are showing on my main home page but along with the following error:

Code: [Select]
Warning: mysql_connect(): Headers and client library minor version mismatch. Headers:50633 Library:50552 in /home/runninga/danica-patrick.co.uk/wp-content/plugins/wp-cpg-widget/cpg_database.php on line 158
Is it basically saying that cmpfetch is working and it's a server issue now?
Title: Re: CPMfetch for 1.5.6
Post by: debraguk on April 26, 2017, 03:53:09 pm
right I appear to still be getting errors :(

On my home page the wordpress app appears fine but when using the code in a php widget it get broken images :(

How do I add space/border between images? is that in the php code or an added style sheet.
Title: Re: CPMfetch for 1.5.6
Post by: Phill Luckhurst on April 26, 2017, 06:00:19 pm
Please start a new thread for your specific problems as these do not appear to be related to this plugin.
Title: Re: CPMfetch for 1.5.6
Post by: lurkalot on May 29, 2017, 10:00:33 am
Recently moved host for all my sites, and have using cpmfetch 2.0 0 from the first post in this topic since it was posted.  Now using a Higher php version I've noticed my error log filling up  I think anything running php 5.4 and up will now run into problems with this cpmfetch add on because of deprecated code.  Here's the error generated on every page load,

8192: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead
File: /home/cxxxxxxx/public_html/gallery/cpmfetch/cpmfetch_dao.php
Line: 1196

I'm assuming version 2.1.1 will have the same problem.
Title: Re: CPMfetch for 1.5.6
Post by: Phill Luckhurst on May 29, 2017, 04:52:33 pm
It will, we need to change calls to mysqli instead.
Title: Re: CPMfetch for 1.5.6
Post by: ron4mac on May 29, 2017, 07:08:57 pm
If there is evidence that it is in use a lot out there, I would be willing to take on updating it for PHP 7 (as well as CPG 1.6).
Title: Re: Re: CPMfetch for 1.5.6
Post by: gmc on May 29, 2017, 08:51:12 pm
If there is evidence that it is in use a lot out there, I would be willing to take on updating it for PHP 7 (as well as CPG 1.6).
I believe it is still in active use... I know I use it a lot.

It isn't a standard plugin - and really can't be (as far as I can tell) as its intent is to be called from outside CPG (from same or different website/subdomain) to display CPG pictures... The author (not me) intentionally used his own db access methods and doesn't rely on any CPG functions being present.  It uses the CPG database but beyond that is standalone code.  Because of that it is likely '1.6 compatible' - and would be PHP 7 compatible if changed from mysql to mysqli calls.

If you are going to tackle this - start with version 2.1.1 in first thread. It fixed some issues with 'off site access'. If not it is on my list to get to when I find some time...

Recently moved host for all my sites, and have using cpmfetch 2.0 0 from the first post in this topic since it was posted.  Now using a Higher php version I've noticed my error log filling up  I think anything running php 5.4 and up will now run into problems with this cpmfetch add on because of deprecated code.  Here's the error generated on every page load,

8192: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead
File: /home/cxxxxxxx/public_html/gallery/cpmfetch/cpmfetch_dao.php
Line: 1196

I'm assuming version 2.1.1 will have the same problem.
Lurkalot - changing your error reporting to no notices should stop the logs from filling... Anytime there is a deprecated function you will start to get these.  I'd expect the same from CPG 1.5 - as it uses mysql calls as well.  (Maybe CPMFETCH is changing the error reporting?  I'd have to look closer...)
Title: Re: CPMfetch for 1.5.6
Post by: Phill Luckhurst on May 29, 2017, 09:28:44 pm
Cpmfetch is well used by many. Sadly, the author, Vuud, had little time on his hands.

It was written a long time ago, for CPG1.3 iirc. It has its own forum and at one time there were extensions using it in Joomlart, Wordpress, Drupal, PHPbb and more. With minor changes it has worked with all versions since. Vuud planned and started a complete re-write, starting from scratch but it never got finished. He felt the code was a long way from where he wanted it, and wanted to do things with newer methods.
Title: Re: CPMfetch for 1.5.6
Post by: ron4mac on May 30, 2017, 12:41:01 am
Okay .. I'll dedicate some time in the very near future to update it to modern PHP/CPG.
Title: Re: CPMfetch for 1.5.6
Post by: ron4mac on May 31, 2017, 12:54:41 am
Okay .. I'll dedicate some time in the very near future to update it to modern PHP/CPG.

Find updated version (2.2) above in original post.
Title: Re: Re: CPMfetch for 1.5.6
Post by: lurkalot on May 31, 2017, 01:31:36 am
Find updated version (2.2) above in original post.

Ron, that was quick, thank you so much for doing this.  Just added it on my test site and it works perfectly, no more errors. I'm not running php 7 yet, but the depreciated errors I was getting with php 5.6.30 have gone. I'll add it to my main site tomorrow.  8)

Edit:  Just noticed with this version, the number of views and the title's are missing from the thumbs. and clicking on a thumbnail  takes me to the album instead of the image.
Title: Re: CPMfetch for 1.5.6
Post by: ron4mac on May 31, 2017, 02:38:04 am
Just noticed with this version, the number of views and the title's are missing from the thumbs. and clicking on a thumbnail  takes me to the album instead of the image.
I did nothing to change how it functions. Perhaps there were differences in function between 2.0.0 and 2.1.1?
Title: Re: CPMfetch for 1.5.6
Post by: gmc on May 31, 2017, 02:43:13 am
Change log for 2.1.1 (also in first post) shows:
Quote
2007-04-17 22:31  wbchmura

   * .: Added in support for linking to albums, categories, image
     sizes. Also added in css_id template options
Would have to look - but I'm sure he maintained the ability to use as you were...

The major change in 2.1.1 was to cfimageget - which plain didn't work in 2.1.0.
Title: Re: CPMfetch for 1.5.6
Post by: lurkalot on May 31, 2017, 09:01:20 am
Thanks.  Not sure if I needed to change my code for 2.1.1  I assumed it would work the same way as the stable release but with added features. Or maybe that's why I stuck with 2.0.0 because it worked as I liked, I can't remember.

When I installed the fixed version last night the images were on my page, and depreciated errors gone so thought it was all good until I clicked on one of the images.  Hits are not displaying, Neither are the titles, and it goes to album rather than image page.

Code I'm using at the moment is,

Code: [Select]
echo '<div id="cpmfetch">';chdir("../gallery/cpmfetch/");include "cpmfetch.php";
$objCpm = new cpm();$options = array("subtitle" => "<center>{{pTitle}} <br>{{pHits}} Views  </center>");
$objCpm->cpm_viewLastAddedMedia(4,4,$options);
$objCpm->cpm_close();chdir("../../");
echo '<br><a href="http://cctestsite.info/gallery/thumbnails.php?album=lastup&cat=0?action=gallery"><u><b>View more latest images</b></u></a>';
if ($context['user']['is_logged'])

if ($context['user']['is_logged'])
{
$thecat = 10000 + $context['user']['id'];
echo '  * <a href="http://cctestsite.info/gallery/index.php?cat='. $thecat .'" alt="My Gallery"><u><b>My Gallery</b></u></a>';
}
echo '</div>';
Title: Re: CPMfetch for 1.5.6
Post by: ron4mac on May 31, 2017, 01:13:03 pm
Looking into it .......
Title: Re: CPMfetch for 1.5.6
Post by: ron4mac on May 31, 2017, 02:51:23 pm
Well ... it seems the 'subtitle' feature was not completed/implemented after some other structure changes in 2.1.1.

Where to go from here?  It wasn't my intent to get involved in the functionality/features of CPMfetch .. only to make it compatible with modern PHP, etc.  In looking over 2.0.0 and 2.1.1 ... they both need a LOT of work.
Title: Re: CPMfetch for 1.5.6
Post by: gmc on May 31, 2017, 04:00:20 pm
How extensive were the changes to 2.1.1 to make it compatible with PHP7/CPG 1.6?
Maybe we do a 2.0.1 and a 2.1.2 - one from each - until someone has time to put more work into it??

Been on my list to look at - but time has been scarce for me.
Title: Re: CPMfetch for 1.5.6
Post by: ron4mac on May 31, 2017, 06:06:22 pm
How extensive were the changes to 2.1.1 to make it compatible with PHP7/CPG 1.6?
Maybe we do a 2.0.1 and a 2.1.2 - one from each - until someone has time to put more work into it??
I won't be involved with two versions. I'll add 'subtitle' support to the version I already updated (2.2).
Title: Re: CPMfetch for 1.5.6
Post by: lurkalot on May 31, 2017, 06:51:05 pm
Well ... it seems the 'subtitle' feature was not completed/implemented after some other structure changes in 2.1.1.

Where to go from here?  It wasn't my intent to get involved in the functionality/features of CPMfetch .. only to make it compatible with modern PHP, etc.  In looking over 2.0.0 and 2.1.1 ... they both need a LOT of work.

The functionality was fine in 2.0.0, it was just the depreciated errors that were causing concern. In my opinion 2.0.0 should have been the one updated to fix the depreciated errors, as this was the finished / stable release.  2.1.1 was a WIP which wasn't finished as far as I can see. That's one of the reasons I asked vuud if we could modify and release cpmfetch 2.0.0 for coppermine 1.5.x to which he agreed.

I have no idea what the difference is between the two versions, or whether they should behave in the same way. all I know is 2.1.1 doesn't workproperly, and 2.0.0 does, apart from those depreciated errors.
Title: Re: CPMfetch for 1.5.6
Post by: Phill Luckhurst on May 31, 2017, 07:30:55 pm
Iirc, it still needed a lot of work to finish.
Title: Re: CPMfetch for 1.5.6
Post by: ron4mac on June 02, 2017, 01:50:32 am
In my opinion 2.0.0 should have been the one updated

Find version 2.0.1 in original post.
( removed 2.2 )
Title: Re: Re: CPMfetch for 1.5.6
Post by: lurkalot on June 02, 2017, 09:56:08 am
Find version 2.0.1 in original post.
( removed 2.2 )

Excellent, works nicely, no errors so far.  thank you.   
Title: Re: CPMfetch for 1.5.6
Post by: gmc on June 03, 2017, 11:40:57 pm
Well... the reason there were two versions was different things worked in the different versions...
I can't use 2.0.x - as the remote support (cfimageget) doesn't work... It was not reworked for V2 until 2.1.1.

Didn't know till now that there was other items working in 2.0 that were 'broken' in 2.1.1... From notes just appeared to be fixes and additions.
But was still a developers release - so obviously wasn't fully tested/completed.

Obviously some effort will be needed to properly merge all the functions... But would be nice to support both 'flavors' until then.
Title: Re: CPMfetch for 1.5.6
Post by: lurkalot on February 12, 2018, 12:25:47 am
Any way to make cpmfetch work responsively?  I'm testing in our new Tinyportal Responsive version, in a center block.  Everything else seems to resize and stack, but not the latest images block, it just cuts it off and add a scrollbar.
Title: Re: Re: CPMfetch for 1.5.6
Post by: gmc on February 12, 2018, 08:38:50 pm
Any way to make cpmfetch work responsively?  I'm testing in our new Tinyportal Responsive version, in a center block.  Everything else seems to resize and stack, but not the latest images block, it just cuts it off and add a scrollbar.
I expect that would be mostly a CSS implementation - and CPMFETCH allows passing an 'options' array with classes to assign to various html entities:
Quote
    (Options) Entries that change the HTML tags output
        tableheadstyle
        tablestyle
        tableheadstyle
        rowstyle
        cellstyle
        linkstyle
        imagestyle

Adapted from examples in the doc:
Code: [Select]
//Example #1
$options = array( 'option_name' => 'option_value' , 'option_name' => 'option_value' );
$objCpm->viewRandomMediaFrom("",1,1,$options);

//Example #3 Real world example
$options = array("tablestyle" => "cssfortables" );
$objCpm->viewRandomMediaFrom("",1,1,$options);

Link to a copy of the CPMFETCH doc I have loaded on my site:
http://greggallery.gmcdesign.com/cpmfetch/docs/basic (http://greggallery.gmcdesign.com/cpmfetch/docs/basic)
Link to 'options' array section:
http://greggallery.gmcdesign.com/cpmfetch/docs/basic/cpmfetch/tutorial_explainations.optionsarray.pkg.html (http://greggallery.gmcdesign.com/cpmfetch/docs/basic/cpmfetch/tutorial_explainations.optionsarray.pkg.html)