Advanced search  

News:

cpg1.5.34 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.32 or older update to this latest version as soon as possible.
[more]

Pages: [1] 2 3 4   Go Down

Author Topic: CPMfetch for 1.5.6  (Read 55189 times)

0 Members and 1 Guest are viewing this topic.

lurkalot

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 732
  • +Tinyportal Support team. +SMFArcade support team.
CPMfetch for 1.5.6
« 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:

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.
« Last Edit: March 10, 2013, 11:18:30 PM by lurkalot »
Logged
Running SMF 2.0.7  / Tinyportal 1.0, bridged with Coppermine 1.5.28, plus cpmfetch 2.0.0

Phill Luckhurst

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 3998
    • Windsurf.me
Re: CPMfetch for 1.5.6
« Reply #1 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.
Logged
It is a mistake to think you can solve any major problems just with potatoes.

lurkalot

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 732
  • +Tinyportal Support team. +SMFArcade support team.
Re: CPMfetch for 1.5.6
« Reply #2 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

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

Phill Luckhurst

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 3998
    • Windsurf.me
Re: CPMfetch for 1.5.6
« Reply #3 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.
Logged
It is a mistake to think you can solve any major problems just with potatoes.

lurkalot

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 732
  • +Tinyportal Support team. +SMFArcade support team.
Re: CPMfetch for 1.5.6
« Reply #4 on: June 09, 2010, 08:26:34 AM »

No problem, I'll change it. ;)
Logged
Running SMF 2.0.7  / Tinyportal 1.0, bridged with Coppermine 1.5.28, plus cpmfetch 2.0.0

lurkalot

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 732
  • +Tinyportal Support team. +SMFArcade support team.
Re: CPMfetch for 1.5.6
« Reply #5 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. ;)
Logged
Running SMF 2.0.7  / Tinyportal 1.0, bridged with Coppermine 1.5.28, plus cpmfetch 2.0.0

François Keller

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: fr
  • Offline Offline
  • Gender: Male
  • Posts: 9041
  • aka Frantz
    • Ma galerie
Re: CPMfetch for 1.5.6
« Reply #6 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
Logged
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

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 732
  • +Tinyportal Support team. +SMFArcade support team.
Re: CPMfetch for 1.5.6
« Reply #7 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. ;)
Logged
Running SMF 2.0.7  / Tinyportal 1.0, bridged with Coppermine 1.5.28, plus cpmfetch 2.0.0

vuud

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1803
  • [cpmfetch.fistfullofcode.com]
    • Fist Full Of Code
Re: CPMfetch for 1.5.6
« Reply #8 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
Logged
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

  • Coppermine newbie
  • Offline Offline
  • Posts: 2
Re: CPMfetch for 1.5.6
« Reply #9 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
Logged

bossspears

  • Coppermine newbie
  • Offline Offline
  • Posts: 2
Re: CPMfetch for 1.5.6
« Reply #10 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
Logged

lurkalot

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 732
  • +Tinyportal Support team. +SMFArcade support team.
Re: CPMfetch for 1.5.6
« Reply #11 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/
Logged
Running SMF 2.0.7  / Tinyportal 1.0, bridged with Coppermine 1.5.28, plus cpmfetch 2.0.0

lurkalot

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 732
  • +Tinyportal Support team. +SMFArcade support team.
Re: CPMfetch for 1.5.6
« Reply #12 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>';
}
Logged
Running SMF 2.0.7  / Tinyportal 1.0, bridged with Coppermine 1.5.28, plus cpmfetch 2.0.0

debraguk

  • Coppermine newbie
  • Offline Offline
  • Posts: 13
Re: CPMfetch for 1.5.6
« Reply #13 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
Logged

Phill Luckhurst

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 3998
    • Windsurf.me
Re: CPMfetch for 1.5.6
« Reply #14 on: July 21, 2010, 08:35:58 PM »

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

lordxtina

  • Coppermine newbie
  • Offline Offline
  • Posts: 19
Re: CPMfetch for 1.5.6
« Reply #15 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. :)
Logged

lordxtina

  • Coppermine newbie
  • Offline Offline
  • Posts: 19
Re: CPMfetch for 1.5.6
« Reply #16 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
Logged

torgasm

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 23
Re: CPMfetch for 1.5.6
« Reply #17 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
Logged

torgasm

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 23
Re: CPMfetch for 1.5.6
« Reply #18 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]

Logged

torgasm

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 23
Re: CPMfetch for 1.5.6
« Reply #19 on: September 05, 2010, 12:06:51 AM »

Logged
Pages: [1] 2 3 4   Go Up
 

Page created in 0.122 seconds with 21 queries.