coppermine-gallery.com/forum

Support => cpg1.4.x Support => Older/other versions => cpg1.4 cpmFetch by vuud => Topic started by: DangRabbit on February 03, 2008, 10:32:57 AM

Title: Pictures in SMF Profile
Post by: DangRabbit on February 03, 2008, 10:32:57 AM
This is a revisit... I had a slight problem with this a year ago but figured it out... original post is here:
http://forum.coppermine-gallery.net/index.php?topic=39706.msg188165#msg188165

Setup is SMF version 1.1.4
Coppermine version 1.4.13 (stable)
cpmFetch version 2.0, Revision 1.12

I'm now doing a similar setup on another site and I have no idea why it isn't working. I'm not getting any error what-so-ever... where the picture should be, there's nothing... nada... zilch.

$objCpm = new cpm("../cpmfetch/cpmfetch_config.php");
$source = "owner={$context['member']['name']}";
$objCpm->cpm_viewLastAddedMediaFrom(3,1,$source);
$objCpm->cpm_close();


If I use viewLastAddedMedia(3,1,$source) it works fine, but obviously it ignores $source and puts last added photos from everyone. I'm almost wondering if something changed since the last time I did this (as per the above link) was over a year ago...

In case it's relevant, cpmFetch does occur earlier on the page as a strip on the top and works fine. There is no $source defined there. It uses viewLastAddedMedia(...etc.

I'm completely baffled... Could someone with more SMF+Coppermine and cpmFetch experience help?


Title: Re: Pictures in SMF Profile
Post by: DangRabbit on February 03, 2008, 10:36:55 AM
Just to be sure I removed the first occurence of cpmFetch on the page, added the include statement to the second occurance and I ended up with the same result. No error, but no picture either.
Title: Re: Pictures in SMF Profile
Post by: DangRabbit on February 03, 2008, 10:52:36 AM
Just like last time, I fool around long enough and I figure it out...

$source has to be first.

$source = "owner={$context['member']['name']}";
$objCpm->cpm_viewLastAddedMediaFrom($source,3,1);
$objCpm->cpm_close();



Title: Re: Pictures in SMF Profile
Post by: SaWey on February 03, 2008, 10:55:34 AM
It's nice when someone finds his own solution :)
Marking as 'Solved'