Advanced search  

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]

Pages: [1]   Go Down

Author Topic: Pictures in SMF Profile  (Read 4906 times)

0 Members and 1 Guest are viewing this topic.

DangRabbit

  • Coppermine newbie
  • Offline Offline
  • Posts: 19
Pictures in SMF Profile
« 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.

Code: [Select]
$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?


« Last Edit: February 03, 2008, 10:55:53 am by SaWey »
Logged

DangRabbit

  • Coppermine newbie
  • Offline Offline
  • Posts: 19
Re: Pictures in SMF Profile
« Reply #1 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.
Logged

DangRabbit

  • Coppermine newbie
  • Offline Offline
  • Posts: 19
Re: Pictures in SMF Profile
« Reply #2 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.

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


Logged

SaWey

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1119
    • SaWey.be
Re: Pictures in SMF Profile
« Reply #3 on: February 03, 2008, 10:55:34 am »

It's nice when someone finds his own solution :)
Marking as 'Solved'
Logged
Pages: [1]   Go Up
 

Page created in 0.017 seconds with 16 queries.