CPMfetch for 1.5.6 CPMfetch for 1.5.6
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

CPMfetch for 1.5.6

Started by lurkalot, June 08, 2010, 11:35:18 PM

Previous topic - Next topic

0 Members and 5 Guests are viewing this topic.

lurkalot

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.

Quote from: Phill Luckhurst on June 06, 2010, 01:52:54 PM
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.

Quote from: Phill Luckhurst on June 08, 2010, 10:02:59 PM
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.


Running SMF 2.1.4  / Tinyportal 3.0.1, bridged with Coppermine 1.6.25, plus cpmfetch 2.0.0

phill104

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 )

'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

'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.
It is a mistake to think you can solve any major problems just with potatoes.

lurkalot

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

[cpg1.5.x]: Open Q&A on the new CpmFetch 1.5 development efforts
Running SMF 2.1.4  / Tinyportal 3.0.1, bridged with Coppermine 1.6.25, plus cpmfetch 2.0.0

phill104

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.
It is a mistake to think you can solve any major problems just with potatoes.

lurkalot

No problem, I'll change it. ;)
Running SMF 2.1.4  / Tinyportal 3.0.1, bridged with Coppermine 1.6.25, plus cpmfetch 2.0.0

lurkalot

Quote from: 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 )

'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

'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. ;)
Running SMF 2.1.4  / Tinyportal 3.0.1, bridged with Coppermine 1.6.25, plus cpmfetch 2.0.0

François Keller

I can confirm this. It's the first code that you must put into the install.php file
Avez vous lu la DOC ? la FAQ ? et cherché sur le forum avant de poster ?
Did you read the DOC ? the FAQ ? and search the board before posting ?
Mon Blog

lurkalot

Quote from: 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

Thanks François. ;)
Running SMF 2.1.4  / Tinyportal 3.0.1, bridged with Coppermine 1.6.25, plus cpmfetch 2.0.0

vuud

Quote from: 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.

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
Please post for help to the forum... PM me only if you are sending security related items (passwords, security problems, etc).

cpmFetch - Images, RSS feeds from CPG from outside CPG
New release notification signup also. 
See http://cpmfetch.fistfullofco

bossspears

Quote from: lurkalot on June 09, 2010, 11:18:57 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

bossspears

Quote from: 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 )

'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

'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

lurkalot

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/
Running SMF 2.1.4  / Tinyportal 3.0.1, bridged with Coppermine 1.6.25, plus cpmfetch 2.0.0

lurkalot

This is the code I'm using in a PHP block,


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>';
}
Running SMF 2.1.4  / Tinyportal 3.0.1, bridged with Coppermine 1.6.25, plus cpmfetch 2.0.0

debraguk

can someone please re-upload the code changes in install.php I'm just seeing scroll bars

phill104

Use another browser, IE8 does the scroll bar thing not displaying the code correctly.
It is a mistake to think you can solve any major problems just with potatoes.

lordxtina

Quote from: 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 )

'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

'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.

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,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. :)

lordxtina

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

torgasm

I keep getting this error still.

QuoteWarning: 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

torgasm

Quote from: torgasm on September 04, 2010, 09:58:37 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]


torgasm