forum.coppermine-gallery.net
Support => cpg1.4.x Support => Older/other versions => cpg1.4 cpmFetch by vuud => Topic started by: JCphotog on September 01, 2007, 07:00:10 pm
-
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.
-
That may have just been a debug statement left in there... Is there anything after "parsing" ?
-
Sorry for the delay. I was out of town for the afternoon.
Interesting. I don't see anything. Here's the link (http://artdc.org/forum/index.php?page=31). To a test page.
-
Any thoughts on where I should look to solve this?
-
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.
-
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 (http://artdc.org/forum/index.php?page=31).
Thanks again for all of your efforts.
-
If it helps, I checked the error log, and I get the following error:
Notice: 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?
-
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.
-
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
-
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.