coppermine-gallery.com/forum

Support => cpg1.4.x Support => Older/other versions => cpg1.4 cpmFetch by vuud => Topic started by: Slideshow Bob on September 05, 2006, 05:36:23 AM

Title: Fetching image attributes (author, URL to gallery, title)?
Post by: Slideshow Bob on September 05, 2006, 05:36:23 AM
Are there methods to return the author, gallery URL, or title of an image?

Here's a call to get an image name:   
    $imagename = $objCpm->getImageToUse($row['pFilepath'], $row['pFilename'] ,"normal_");

might there be corresponding functions to use to get the other info?
Title: Re: Fetching image attributes (author, URL to gallery, title)?
Post by: vuud on September 05, 2006, 05:46:43 AM
Quote from: Slideshow Bob on September 05, 2006, 05:36:23 AM
Are there methods to return the author, gallery URL, or title of an image?

Here's a call to get an image name:   
    $imagename = $objCpm->getImageToUse($row['pFilepath'], $row['pFilename'] ,"normal_");

might there be corresponding functions to use to get the other info?


I *think* you can call it something like this:

$string = $objCpm->createDescription("%f",$row);

The result would be returned to the string.  the %f you would replace with the codes to get whatever you want.  See subtitles in the documentation. 

Hope that works

Title: Re: Fetching image attributes (author, URL to gallery, title)?
Post by: Slideshow Bob on September 05, 2006, 03:39:09 PM
Once again, you are the man!  :)  Thanks!!

Are there parameters to get the custom fields?
Title: Re: Fetching image attributes (author, URL to gallery, title)?
Post by: cgc0202 on September 05, 2006, 03:51:44 PM
Did it work for you Bob? Can you please share the complete script?  And, how the actual description that is stored in the database of CPG can be included also.

CGC
Title: Re: Fetching image attributes (author, URL to gallery, title)?
Post by: Slideshow Bob on September 05, 2006, 04:27:01 PM
Yup.  Here's a page from the documentation where it shows all the values:

http://cpmfetch.fistfullofcode.com/php-lib/showexternal.php?url=http://www.fistfullofcode.com/projects/copperminefetch/manual/index.html

Check out Chapter 6. Using the OptionsArray