Can't get $source to work for 1.9.12 Can't get $source to work for 1.9.12
 

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

Can't get $source to work for 1.9.12

Started by jlove, April 02, 2007, 05:25:37 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

jlove

I've read through all of the documents that I could find, and I've even tried codes that others have, but I cannot get $source to work.

I want to be able to display pics from certain categories/albums, but every time I try the code, I always get the last album.

The last version that I tried was:


<?php
  include "../cpmfetch/cpmfetch.php";
  $objCpm = new cpm("../cpmfetch/cpmfetch_config.php");
  $options = array('imagestyle' => 'cpm', 'imagewidth' => '70', 'tablestyle' => 'auto');
  $objCpm->cpm_viewLastAddedMedia(1,4,$source="cat=9:album=96",$options);
  $objCpm->cpm_close();
?>


But, of course, none of the docs for the new version have a code that shows you how to do it. And if they do, they make it pretty hard to find.

vuud

Quote from: jlove on April 02, 2007, 05:25:37 AM
I've read through all of the documents that I could find, and I've even tried codes that others have, but I cannot get $source to work.

I want to be able to display pics from certain categories/albums, but every time I try the code, I always get the last album.

The last version that I tried was:


<?php
  include "../cpmfetch/cpmfetch.php";
  $objCpm = new cpm("../cpmfetch/cpmfetch_config.php");
  $options = array('imagestyle' => 'cpm', 'imagewidth' => '70', 'tablestyle' => 'auto');
  $objCpm->cpm_viewLastAddedMedia(1,4,$source="cat=9:album=96",$options);
  $objCpm->cpm_close();
?>


But, of course, none of the docs for the new version have a code that shows you how to do it. And if they do, they make it pretty hard to find.

yeah, the docs for the new version are not terribly organized yet.  But they do show the source parameter as the first entry.  This is behaviour that has changed since the older version.   Also, you just pass the string, not source=

$objCpm->cpm_viewLastAddedMedia("cat=9:album=96",1,4,$options);

Should work for you.

The beta draft docs, here:
http://forum.coppermine-gallery.net/index.php?topic=41984.msg199145#msg199145

Have a nice walk through that may help you acclimate to it.

Vuud



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

jlove

I don't know, it still didn't work.

Does it matter that it's a second time that I'm calling it on my page? (I've done it before, so I didn't think that would be a problem.)

vuud

Quote from: jlove on April 02, 2007, 09:12:01 PM
I don't know, it still didn't work.

Does it matter that it's a second time that I'm calling it on my page? (I've done it before, so I didn't think that would be a problem.)

Depends what you mean.

Can you copy and paste the code here? 

And is it the same error?
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

jlove

This code:

<?php
  include "../cpmfetch/cpmfetch.php";
  $objCpm = new cpm("../cpmfetch/cpmfetch_config.php");
  $options = array('imagestyle' => 'cpm', 'imagewidth' => '70', 'tablestyle' => 'auto');
  $objCpm->cpm_viewLastAddedMedia("cat=9:album=96",1,4,$options);
  $objCpm->cpm_close();
?>

I also tried with the absolute path.

All I get is an empty table

<table >

Nothingness

</table>

That's what it looks like.

vuud

Quote from: jlove on April 03, 2007, 07:58:46 AM
This code:

<?php
  include "../cpmfetch/cpmfetch.php";
  $objCpm = new cpm("../cpmfetch/cpmfetch_config.php");
  $options = array('imagestyle' => 'cpm', 'imagewidth' => '70', 'tablestyle' => 'auto');
  $objCpm->cpm_viewLastAddedMedia("cat=9:album=96",1,4,$options);
  $objCpm->cpm_close();
?>

I also tried with the absolute path.

All I get is an empty table

<table >

Nothingness

</table>

That's what it looks like.


Can you post or PM me a link to your gallery?

That looks right...
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

jlove


vuud

Quote from: jlove on April 04, 2007, 12:20:16 AM
I sent a PM.

Ah crap, sorry I missed something above when i was changing you

This:

$objCpm->cpm_viewLastAddedMedia("cat=9:album=96",1,4,$options);


Should be:

$objCpm->cpm_viewLastAddedMediaFrom("cat=9:album=96",1,4,$options);



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

jlove