Advanced search  

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

Pages: [1]   Go Down

Author Topic: Pictures in SMF Profile  (Read 4893 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.016 seconds with 21 queries.