Favorites Help. Upgraded to 2.1.1 Favorites Help. Upgraded to 2.1.1
 

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

Favorites Help. Upgraded to 2.1.1

Started by JCphotog, September 01, 2007, 07:00:10 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

JCphotog

Hello.  I'm still very excited by cpmFetch.  Recently I've had a need to display user favorites. I tried and instead random photos were displayed.  After searching a few other topics, I decided to upgrade to 2.1.1  all of my random photo blocks in tiny portal display just fine, but my test page in the portal gives me an array error, yet it still displays the apropriate favorite images.

I'd love some insight into the matter.  Here's the error that I get:

Array ( [0] => Array ( [user_id] => 2 [user_favpics] => YToxODp7aTowO2k6NDc1O2k6MTtpOjIxO2k6MjtpOjExMDtpOjM7aToxODc7aTo2O2k6MTE7aTo3O2k6NjUzO2k6ODtpOjM3NzI7aTo5O2k6MjY7aToxMDtpOjI4O2k6MTE7aToyOTExO2k6MTI7aTozNzk2O2k6MTM7aToxODQ7aToxNDtpOjM1ODg7aToxNTtpOjM1MTk7aToxNjtpOjE5NTE7aToxNztpOjE5NTM7aToxODtpOjIxMzc7aToxOTtpOjIxMzY7fQ== ) ) parsing


here's the code I tried to use:

echo '<center>';  include_once "/home/public_html/gallery/cpmfetch/cpmfetch.php"; 
  $objCpm = new cpm("/home/public_html/gallery/cpmfetch/cpmfetch_config.php");
  $options = array( "cellattributes" => array("align" => "center","height" => "105", "width"=>"110"), "cellStyle" => "align='center'"  );
  $objCpm->cpm_viewRandomMediaFrom("cat=1,3:favorites=2,3,4", 6, 1, $options);
  $objCpm->cpm_close();
echo '</center>';


If it helps, I'm running this in a php article in SMF and Tinyportal
Thanks for everyone's help.

vuud

That may have just been a debug statement left in there... Is there anything after "parsing" ?
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

JCphotog

Sorry for the delay.  I was out of town for the afternoon.
Interesting.  I don't see anything. Here's the link. To a test page.

JCphotog

Any thoughts on where I should look to solve this? 

JCphotog

I just noticed one other glitch. I didn't test things fully, so after upgrading, now the links take you to the album instead of the actual image. 

JCphotog

Hi guys. I'm still at a loss. I tried re-uploading 2.1.1, and I re-ran the install script.

I still get this error:
Array ( [0] => Array ( [user_id] => 2 [user_favpics] => YToxODp7aTowO2k6NDc1O2k6MTtpOjIxO2k6MjtpOjExMDtpOjM7aToxODc7aTo2O2k6MTE7aTo3O2k6NjUzO2k6ODtpOjM3NzI7aTo5O2k6MjY7aToxMDtpOjI4O2k6MTE7aToyOTExO2k6MTI7aTozNzk2O2k6MTM7aToxODQ7aToxNDtpOjM1ODg7aToxNTtpOjM1MTk7aToxNjtpOjE5NTE7aToxNztpOjE5NTM7aToxODtpOjIxMzc7aToxOTtpOjIxMzY7fQ== ) ) parsing  Any thoughts about where the debug tag might be?

And for some reason when you click on a picture it links to the album. 
If you'd like to see the problem in action, follow this link.

Thanks again for all of your efforts.

JCphotog

If it helps, I checked the error log, and I get the following error:

QuoteNotice: Only variables should be assigned by reference in /home/jessec2/public_html/artdc/gallery/cpmfetch/cpmfetch.php on line 419
Any other thoughts?  Any ideas of what I can do to track down the cause of the problem?

xchanius

I'm having the same issue. Working with the Dev Version 2.1.1 and CPG 1.4.13.

This piece of code:

$results = $objCpm->cpm_viewLastAddedMediaFrom("favorites=2672",1,$numResults);

returns the correct results, but also outputs this piece of text:

Array (
  • => Array ( [user_id] => 2672 [user_favpics] => YToxOntpOjA7aToyNDQ2OTt9 ) ) parsing

    So it does appear to be some sort of debugging type deal.

    Is there some way of turning this off? It's screwing up my JSON feed.

    Thanks.

xchanius

Ok, found the bug in 'cpmfetch_dao.php'.

Line 1055 and line 1059 need to be commented out (I've commented them out in this example):

$pidlist = array();
//print_r($this->resultArray); THIS ONE
   foreach ($this->resultArray as $row) {
   // decode the info
   $thispersonslist = unserialize(base64_decode($row['user_favpics']));
   //print "parsing"; AND THIS ONE

JCphotog

Hey.. this looks like it fixed it for me too!  Now if only the images linked to the pics, and not the albums..
Progress!  Great progress!  Thanks.