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

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

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 4 Guests are viewing this topic.

vuud


Be advised

I added a new thread here for dealing with bridges and cpmfetch.  Figure its a popular enough topic

Also, for some reason

http://cpmfetch.fistfullofcode.com is not working

However http://www.fistfullofcode.com then click on cpmfetch in the menu works fine.

Just so you know

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

chad_jennings

Hello,
I am trying to get version 1.6.2 to work correctly on my church's website.
I have created a file containing the following code:
<?php 
include "./cpmfetch/cpmfetch.php";
$objCpm = new cpm("/album");
$objCpm->cpm_viewRandomMedia(1,1);
$objCpm->cpm_close();
?>


I am calling it from my newIndex.html with the following code:
<iframe src="viewPhoto.php" width="225" height="195"></iframe>


Everything appears to be working correctly at first, but when the thumbnail is clicked on, instead of going to the larger photo in Coppermine I get my homepage displayed in the iframe instead.

I am using Coppermine 1.4.3 on Firefox.

Thanks in advance for any help.

Kinetica

since i cannot figure out how to start a new topic, i guess this is the closest topic i am able to post this in. i got CfImageGet to work (from ver1.6.2) in my phpbb (ver2.19) signature. i just cant figure out how to get it to work as a random avatar. keep getting the error The URL of the remote avatar is not valid. i wouldnt mind using the .htaccess work-around but kinda lost when it comes to that. any help would be great.

Gary B

I have cp\oppermine 1.4.3 installled and CFG 1.6.2 installed and no matter what I set in the following line my randon images are heavily favoriing my Disney Animal Kingdom photos.  I have tried limiting it to another photo gallery and it still shows the Animal Kingdom photos.

http://www.themeparks.com/

My randomimages.php
<?php 
include "cpmfetch.php";
$objCpm = new cpm('/library');
$objCpm->cpm_viewRandomMedia(1,1,array("tablestyle" => "test1","subtitle" =>"This photo is from the %a album","imagesize" => "thumb","imagestyle" => "test1"));
$objCpm->cpm_close(); 
?>



Thank you for any help
Gary

chad_jennings

Quote from: chad_jennings on January 21, 2006, 02:53:37 AM
Hello,
I am trying to get version 1.6.2 to work correctly on my church's website.
I have created a file containing the following code:
<?php 
include "./cpmfetch/cpmfetch.php";
$objCpm = new cpm("/album");
$objCpm->cpm_viewRandomMedia(1,1);
$objCpm->cpm_close();
?>


I am calling it from my newIndex.html with the following code:
<iframe src="viewPhoto.php" width="225" height="195"></iframe>


Everything appears to be working correctly at first, but when the thumbnail is clicked on, instead of going to the larger photo in Coppermine I get my homepage displayed in the iframe instead.

I am using Coppermine 1.4.3 on Firefox.

Thanks in advance for any help.

Okay, I'm a dork  ::).  I figured out the problem.  Since I was calling the .php file from an iframe the link was calling the resulting file and placing the contents in the iframe, which is the correct behavior.  It was late and I was tired when I was having the problem and I thought I had it fixed and then when I didn't I just wasn't thinking.  Sorry about the post that really wasn't necessary.  :D

Oh, btw, I used the options parameter and added the "windowtarget" => "_parent" to fix it.

websnow


websnow

i got it

$options = array( 'subtitle' => 'Image name= %t,  <br>Cap Description = %c ' );
$objCpm->cpm_viewLastAddedMedia (2,4,$options);


http://www.fistfullofcode.com/projects/copperminefetch/manual/ch06s03.html#

Pete77s

Quote from: imrich on January 15, 2006, 03:09:02 PM
Pete,

What is means is to find this code:

// 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';



and change it to this:

// 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';
*/


THEN

Find the lines:

// 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';
*/


and change it to this:


// 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';


So you are turning off the first bit of code by turning it into a comment
and then you are enabling the second  bit of code by removing the start and end comment delimiters.

The actual instructions for doing this are in the release notes, this is what it says:

Does this help at all?




Yup! thanks... I think I got it. sorry about the late reply. got a little busy. well this is what ctest.php tells me:
Trying to display some images:

Your installation seems correct so far, you should see a small grid of thumbnails from your gallery

You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'p.approved='YES' and a.visibility = 0 ORDER BY rand(23232) L
Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /home/pete77/public_html/pix/cpmfetch/cpmfetch_dao.php on line



what is this telling me?

Also another question. it says I should be seeing some images. but I would need to create a block first right? ok  and the code for these bocks is in the first post where the author of this mod shows some examples am I right? my coppermine is already bridged to my 2.0.19 phpbb board.

Okay, what Im trying to do is get a block,  a scrolling of images to go across the top of my portal. I will have it marquee across.  Will I be able to do this with this cfetch?

thanks.

kadekawa

Love CpmFetch - just installed for a friend's website and for some reason
the cftest.php is passing everything cep the small grid of thumbnails its supposed to show....thats with userpics uploaded for the albums in coppermine - it does work
when there is a batch upload of pics  ???

TopMedia and Random and all other scripts will only pull from the batch folder too...help!

Thank you in advance!

adolfs

Great plug...i recently had the need to run it off a subdomain galleries.xxxxxxx.com I am having a hard time pointing to the location in the install files any suggestions of how to do it?

seanbluekey

I don't know anything about PHP. but my Q is can I also put this on a .asp page? if so how do I go about it. I have tried several things:

1) I put the cpmfetch folder in the /picture folder.
2) I changed the cftest.php file
$ChangeThisToYourPartialUrlToCPG = "/picture";

2) and then I have put this in the body:

<?php   
include "coppermine.php";
$objCpm = new cpm('/picture');

$objCpm->cpm_viewRandomMedia (1,4);
$objCpm->cpm_viewLastAddedMedia (2,4);

$objCpm->cpm_close();

?>

and it is not working :'( Please help!

freesouljah

I did a search...but couldn't find if there is a way to list albums from categories aphabetically using cpmFetch.  Is this possible?

thanks man  8)

pat rick

I was searching through this forum, but it didn't solve my question.
I'd like to just get variables which I can use for further php processing.
For example, how can I get the height or the subtitle of a image as a variable?
I did the following, as I could find it in this forum:

<?php 
include "./cpmfetch/cpmfetch.php";
$objCpm = new cpm("/gallery");

// This tells it you want the data back, not pretty html tables
$objCpm->cpm_setReturnType('resultset');

// This gets an assocative array of the 1 random image from anywhere public in the album
$data $objCpm->cpm_viewRandomTopRatedMediaFrom('cat=3',1,1,$options);

// This gets the image to display...
$imagename $objCpm->cpm->getImageToUse($data[0]['pFilepath'], $data[0]['pFilename'] ,"");

$objCpm->cpm_close();
?>
 


This will will return the absolut path of the picture. Great!
But how can I get the picture id, subtitle, height and width of this picture as a variable?
Is there any chance for it?

Thank you.


mona87

I have a question concerning the formatting of the script.  I put up a section on my site to automatically put the last pictures into the gallery on the frontpage.

http://www.ranifan.com/test.php

thats the example of what i have on my frontpage.   The only problem is that the resizing is terrible.   

www.drewfan.com

On this site, she has a last updated section, but the pictures are resized so that it looks decent.  And its resized only a section of the picture and not the whole thing for better quality.

how do i accomplish this?

Aergonaut

Not sure if this has been asked already, so please point me to the right place if it has...  I'm trying to use CpmFetch to get recent additions to my Coppermine gallery on my website's homepage.  However, when I use the function listed in the documentation, all I get is an empty table with no data, like this:

<table><tr></tr></table>

I haven't changed the CpmFetch code at all.  My site is here.

radmofo

Hello I am having some trouble with the setup listed in the subject block. It seems that All newly uploaded pictures cannot be "fetched" with cpmfetch as well as albums 26 and above. I have asked this question in other area's I would like some sort of feedback as to how to remedy this. I have no errors and personnally think I have tried everything that I know of. I am not sure if ths is a bug or some weird thing. Any assistance will be appreciated. Preferably VUUD (the creator) By the way have you had a chance to see if albums 26 and above would pull pictures?

Please give me some negative Karma. :)

Zanelli

Quote from: Zanelli on January 05, 2006, 04:10:01 PM
I have an earlier version of PHPBB and this dosen't work could this be that "phpbb_users" is diffrent?

Okay I'm still having problems with this, my Coppermine and my PHPBB are on seperate databases:

CPG database name = _coppermine
PHPBB database name = _phpbb1

I'm not sure what I have to change to get this to work?

soldstatic

sorry for the newB question with cpmFetch, but how do we get rid of the blue link border around the images?

motorcontrol

CPMFetch Directory: http://wolfdisease.org/hntd/cpmfetch (v1.6.2)
Coppermine Directory: http://wolfdisease.org/hntd/photos (v1.4.3)

Here's my problem. On my test page (http://wolfdisease.org/hntd/cpmfetch/cftest.php) I get the image preview fine. There are no extra warnings, etc.

However, on cfig_random.php, I get this error:

ERROR: Path to Coppermine incorrect. (/home/sidni/wolfdisease.org/photos//include/config.inc.php)
Fatal error: Call to a member function on a non-object in /home/.hebi/sidni/wolfdisease.org/hntd/cpmfetch/cfimageget.php on line 167


And when I go to insert the code into my layout (http://wolfdisease.org/hntd/indexx.php?x=index) I get this error:

ERROR: Path to Coppermine incorrect. (/home/sidni/wolfdisease.org/photos//include/config.inc.php)
Fatal error: Call to a member function on a non-object in /home/.hebi/sidni/wolfdisease.org/hntd/cpmfetch/cpmfetch.php on line 770


I've used this script before on another site and had no problem whatsoever. Last night I spent a good chunk of time double checking and reinstalling, but nothing seems to have changed. Hopefully someone will give me an answer on this, cause it's driving me nuts.

Thanks!

davelu

I just finshed running the test and the result came back postive but when i scorlled down this is what is said
Trying to display some images:

Your installation seems correct so far, you should see a small grid of thumbnails from your gallery

Unknown column 'u.user_website' in 'field list'
Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /var/www/html/cpmfetch/cpmfetch_dao.php on line 710

And when i tired out the examples The exact same error message displayed

Unknown column 'u.user_website' in 'field list'
Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /var/www/html/cpmfetch/cpmfetch_dao.php on line 710

Thanks
-Dave