CpmFetch 1.4 On... Displaying data and images from CPG on your website - Page 30 CpmFetch 1.4 On... Displaying data and images from CPG on your website - Page 30
 

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 1.4 On... Displaying data and images from CPG on your website

Started by vuud, July 08, 2005, 06:43:10 AM

Previous topic - Next topic

0 Members and 3 Guests are viewing this topic.

pedrosite

Hello,
I've upgrade coppermine from version 1.3 to 1.4.3 and after cpmfetch don't display the random image. The browser display this text:
QuoteUnknown column 'u.user_website' in 'field list'
Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /web/htdocs/www.pedrosite.it/home/cpmfetch/cpmfetch_dao.php on line 710

My code is:
include "/web/htdocs/www.pedrosite.it/home/cpmfetch/cpmfetch.php";
$objCpm = new cpm('/gallery');
$styleguide = array( "imagestyle" => "test1", "linkstyle","imagesize" => "int","imagewidth" => 140 );
$objCpm->cpm_viewRandomMedia(1,1,$styleguide);


The page that show the error is: http://www.pedrosite.it

Thaks for the help!
Antonio.


vuud

Quote from: n3n on January 04, 2006, 04:24:26 PM
Well im using the following code:

<?php
include "./cpmfetch.php";
$objCpm = new cpm("/flix");
$objCpm->cpm_viewLastAddedMedia(1,5);
$objCpm->cpm_close();
?>

So I'm supposed to get 5 images back right ? Im only getting 3 images, and always the same images.


This is probably a stupid question, but do you have more than 3 publically available images?  The behavior is to stop displaying when it runs out, which would explain the lack of 5.

Are you bridged and added cpg users?  Maybe you did not add enough?

Inquiring minds.


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

vuud

Quote from: pedrosite on January 04, 2006, 08:24:06 PM
Hello,
I've upgrade coppermine from version 1.3 to 1.4.3 and after cpmfetch don't display the random image. The browser display this text:
My code is:
include "/web/htdocs/www.pedrosite.it/home/cpmfetch/cpmfetch.php";
$objCpm = new cpm('/gallery');
$styleguide = array( "imagestyle" => "test1", "linkstyle","imagesize" => "int","imagewidth" => 140 );
$objCpm->cpm_viewRandomMedia(1,1,$styleguide);


The page that show the error is: http://www.pedrosite.it

Thaks for the help!
Antonio.




Two people just asked this and got an answer, its in the release notes, and its been brought up a bunch of times in this forum.

At least try to search for an answer first.


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

amused1958

Hi

I've upgraded to CPG 1.4.3 & CpmFetch 1.6.2.
However: the test-page doesn't show the thumbnaisl as expected.
In fact it shows the alternate tag instead of the image. Clicking on the image does send me to the gallery, so it all does work.
Only the thumbnails are not shown.

See http://marislaan.kohnstammschool.nl/cpmfetch.162/cftest.php

Couldn't find a solution in dox or forum. What am I missing??

n3n

Quote from: vuud on January 04, 2006, 08:38:05 PM

This is probably a stupid question, but do you have more than 3 publically available images?  The behavior is to stop displaying when it runs out, which would explain the lack of 5.

Are you bridged and added cpg users?  Maybe you did not add enough?

Inquiring minds.




Hi, tnx for the quick reply again :)

Yes, my coppermin IS bridged, so could be that thats the problem. Im gonna ad a few more users, and see if
that works. I'll let you know.

Cheers

n3n

Tested with standalone version, didnt change anything :(

Any more things that could affect cpmfetch ? I was thinking about the chmod of the
pictures, but didnt change anything.

Zanelli

Quote from: imrich on December 26, 2005, 10:48:35 PM
First, I want to thank vuud for an incredible add on to Coppermine! :D

My Coppermine 1.3.5 is bridged with phpbb 2.0.18.

I have a bunch of users in my phpbb forum (about 100) and thought this 'make up some fake users in the Coppermine database' was just too much work for me (lazyness is the mother of most of my coding), so I thought take this as a 'hint' by vuud to what may be a minimal change to the code to allow it to work with the PHPBB database.

First (and this is important), I have both my coppermine and my phpbb data in the same mysql database. My phpbb database has a phpbb prefix (i.e. phpbb_).  This is important to allow this 'hack' to work!

I made some rather simple-minded changes to cpmfetch_dao.php in an attempt to get CpmFetch 1.6.2 to work with PHPBB 2.0.18.

Note, at this time, I'm using Coppermine version 1.3.5. I have NOT tested this yet with Coppermine 1.4.2.


I haven't done any significant testing, but it seems to work and cftest.php works too. ;)

open cpmfetch.dao.php and find line:

$this->sqlPictureSourceSelect = " " . $database_table_prefix . "pictures as p, " . $database_table_prefix . "albums as a, "
. $database_table_prefix . "users AS u ";


change it to the following:

$this->sqlPictureSourceSelect = " " . $database_table_prefix . "pictures as p, " . $database_table_prefix . "albums as a, "
. $database_table_prefix . "users AS u , phpbb_users AS phpbb ";


note! If your phpbb database tables have a different prefix than 'phpbb_' then change the phpbb_users as needed to use the same prefix as your phpbb database tables use.

THEN, find every occurance of u.user_id and change it to phpbb.user_id

Save cpmfetch_dao.php and then try cftest.php.

If you get a chance to try this with Coppermine 1.4.2 bridge with PHPBB 2.0.18 and it works ok, I'd appreciate someone letting me know. If I get a chance to upgrade to cpg 1.4.2 myself, I'll let you know.


I have an earlier version of PHPBB and this dosen't work could this be that "phpbb_users" is diffrent?

imrich

What version of phpbb are you using?

Also, what is your phpbb table prefxi? This is configurable. So your installation uses something different than "phpbb_" then you have to make a similar change.

Per my post, you also need to have the phpbb and coppermine data in the same database.

vb28

Quote from: toxicfritz on December 15, 2005, 06:21:00 AM
i have the same problem test page has no errors and no pictures

1. version of coppermine 1.4.2
2. website http://hot-rain.ca/cmcforum/index.php and gallery http://www.hot-rain.ca/cmcgallery/
3. problem http://www.hot-rain.ca/cmcgallery/cpmfetch/cftest.php
4. Inbetween newbie, intermediate
5. Apache/1.3.34 (Unix) taken from line 40 of cftest.php
6. code used for image block
echo '<div align="right">';
include "../cmcgallery/cpmfetch/cpmfetch.php";
$objCpm = new cpm("/cmcgallery");
$objCpm->cpm_viewRandomMedia(1,1);
$objCpm->cpm_close();
echo '</div>';

same thing nothing no error no image


i am having the same problem as well i also have the same settings as above...but i notice that the cftest.php is working toxicfritz but for me the pictures are not showing only the alt is displaying the path to pictures don't have the url infront of it... i am getting http:///images/dog/1.jpg beside from getting http://www.site.com/images/dog/1.jpg

any advice....

thanks

snork13

@vuud


quick question? Is there a way to control thumbnail size, other then the css I'm using?

example in the info center...http://www.snork13.net/forum

thanks

dukuduku

Hi Vuud,

Your docs state:
Quote13.2.   I have my pages and gallery on different subdomains... will CpmFetch work?

I have gotten a few of these working, but not enough to have all the answers. To use CpmFetch in its normal usage, the subdomain has to have access to the files on the CPG domain. If you have that, then I am confident it can be made to work.

For one reason or another, I have had to move my website off of the server that is hosting coppermine (and off the subdomain).  I am trying to configure cpmFetch but I can't get through the test page (step 80 fails) since it can't find the configuration file for coppermine (it uses the document root I believe).

Is what I am trying to do possible?  Last resort is moving coppermine to the new server, which I will do if necessary.

Thanks,
dukuduku

martyn_c

Hi all,

This evening i have upgraded from cpm 1.3.x to 1.4.3. It is bridged to phpbb2.0.19.

Using cpmfetch 1.6.2, i get no errors on the cftest.php, but there are no images - 'view source' just shows a series of 'tr' and 'table' tags.

I've tried all the suggestions in previous replies to this topic without luck, but also noticed that there is no mention of this specific grouping of program versions.

Any clues?

Many thanks,

Martyn

n3n

If your installation is bridged you can try to add a few more users into the cpg database. Sometimes it only shows a few or no images at all, when
cpg uses the bridged database.

Good luck.

benseth

Hey I found out how CPMFETCH can work on the latest CPG.

Remove all the */ and the /* from line 54 to 59.  It should look like this

var $topPercentForMostViewed = 25;

// This is for CPG versions prior to 1.4
var $sqlPictureAlbumSelect = ' 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, a.title AS aTitle, a.description AS aDescription, p.pid AS pPid, p.pic_rating AS pPic_Rating,  p.votes AS pVotes, p.pwidth AS pWidth, p.pheight AS pHeight, u.user_lastvisit AS uUser_lastvisit, u.user_regdate AS uUser_regdate, u.user_email AS uUser_email, u.user_website AS uUser_website, u.user_location AS uUser_location, u.user_interests AS uUser_interest, u.user_occupation AS uUser_occupation';


// This is for CPG v 1.4.1 beta 1

var $sqlPictureAlbumSelect = ' 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, a.title AS aTitle, a.description AS aDescription, p.pid AS pPid, p.pic_rating AS pPic_Rating,  p.votes AS pVotes, p.pwidth AS pWidth, p.pheight AS pHeight, u.user_lastvisit AS uUser_lastvisit, u.user_regdate AS uUser_regdate, u.user_email AS uUser_email';




I did it and it work perfectly now :D

n3n

Does anyone have an idea howto let a semi-transparant image float over the thumbs ?

Like on: http://www.threadless.com/catalog/Retired

Couldnt get it to work with css.

imrich

Quote from: martyn_c on January 08, 2006, 03:09:20 AM
Hi all,

This evening i have upgraded from cpm 1.3.x to 1.4.3. It is bridged to phpbb2.0.19.

Using cpmfetch 1.6.2, i get no errors on the cftest.php, but there are no images - 'view source' just shows a series of 'tr' and 'table' tags.

I've tried all the suggestions in previous replies to this topic without luck, but also noticed that there is no mention of this specific grouping of program versions.

Any clues?

Many thanks,

Martyn

Martyn,

Did you try this: http://forum.coppermine-gallery.net/index.php?topic=19564.msg117615#msg117615

This is what I did and it's working perfectly with phpbb 2.0.19.

vuud

Quote from: benseth on January 08, 2006, 06:55:03 AM
Hey I found out how CPMFETCH can work on the latest CPG.

Remove all the */ and the /* from line 54 to 59.  It should look like this

var $topPercentForMostViewed = 25;

// This is for CPG versions prior to 1.4
var $sqlPictureAlbumSelect = ' 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, a.title AS aTitle, a.description AS aDescription, p.pid AS pPid, p.pic_rating AS pPic_Rating,  p.votes AS pVotes, p.pwidth AS pWidth, p.pheight AS pHeight, u.user_lastvisit AS uUser_lastvisit, u.user_regdate AS uUser_regdate, u.user_email AS uUser_email, u.user_website AS uUser_website, u.user_location AS uUser_location, u.user_interests AS uUser_interest, u.user_occupation AS uUser_occupation';


// This is for CPG v 1.4.1 beta 1

var $sqlPictureAlbumSelect = ' 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, a.title AS aTitle, a.description AS aDescription, p.pid AS pPid, p.pic_rating AS pPic_Rating,  p.votes AS pVotes, p.pwidth AS pWidth, p.pheight AS pHeight, u.user_lastvisit AS uUser_lastvisit, u.user_regdate AS uUser_regdate, u.user_email AS uUser_email';




I did it and it work perfectly now :D


Wow
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

vuud

Quote from: dukuduku on January 07, 2006, 11:01:45 PM
Hi Vuud,

Your docs state:
For one reason or another, I have had to move my website off of the server that is hosting coppermine (and off the subdomain).  I am trying to configure cpmFetch but I can't get through the test page (step 80 fails) since it can't find the configuration file for coppermine (it uses the document root I believe).

Is what I am trying to do possible?  Last resort is moving coppermine to the new server, which I will do if necessary.

Thanks,
dukuduku



The docs are full of lies I tell you.  I hate the docs more than most of the things I hate.  And thats a lot.

Anyway, if you are on a completely different domain, you can access if using the SSI techniques that seem to work the best.  Sometimes you can call it from PHP...  The big thing is to have it working on the server you have CPG on and then start trying to remotely get data.  See the SSI thread for some more ideas on it.

Hope that helps some


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

n3n


vuud

Quote from: n3n on January 08, 2006, 05:59:42 PM
Any ideas on my question vuud ? if you have the time.

Aside from doing it the way they did it... nope. 

If you did not want to do it their way, maybe something with positioning a gif with transparent parts over your pictures with css positioning stuff - but I know little about CSS layouts - so that could be crazy talk.

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