"Including Custom fields for image description" in the CPMFetch "Option Array" "Including Custom fields for image description" in the CPMFetch "Option Array"
 

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

Main Menu

"Including Custom fields for image description" in the CPMFetch "Option Array"

Started by cgc0202, November 12, 2006, 07:06:14 PM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

cgc0202

Hi Vuud,

I beginning to understand how to include "Option Array information display entries"  in a CPMFetch script.  For example:

<?php
$objCpm101->cpm_viewRandomMediaFrom (1,1,'cat=34:album=1',array("subtitle" => '"%t"<br />"%a"<br />%A <br > %o  <br />%c<br >%C', 'tablestyle' => 'test2','imagestyle' => 'test6', 'imagesize' => 'int'));
?>

There are layouting issues encountered with the above rudimentary script, but I will initiate a different post for that, since they are more complex.

Only one of the issues arising from calling the available options in the "Option Array information display entries" is discussed here.  More specifically, as the Admin, I sometimes upload photos by other contributing photographers, once I get their permission.  The same is encountered when historical photos are uploaded.

In the above examples, the Admin uploader is considered the owner "%o" and the address, as well as other information associated with be those of the uploader -- rather than those of  the actual photographer -- are used.

A solution to this is to include in the "Custom fields for image description" (done in the Configuration page) specific custom fields for the name of the photographer, address of the photographer, the place where  and the date when the photograph was taken, etc.

This will show up as blank fields to be filled up in the "Edit page", as shown in this portion of the

Custom fields in the Edit page

The question then is:

How can these resulting specific "Custom fields for image description" be included in the "Option Array information display entries"?

Thanks.

CGC


vuud

Quote from: cgc0202 on November 12, 2006, 07:06:14 PM

How can these resulting specific "Custom fields for image description" be included in the "Option Array information display entries"?

Thanks.

CGC

Actually they really can't.  I just added them into the development version, which will be uploaded in a few days.  At that point, you can use them as %1, %2, %3, %4 depeding on which user field is which.   They represent the custom fields in the config section.

Hopefully in a day or two I can post it.  It will be version 1.9.5.




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

cgc0202

Quote from: vuud on November 12, 2006, 07:59:42 PM
Actually they really can't.  I just added them into the development version, which will be uploaded in a few days.  At that point, you can use them as %1, %2, %3, %4 depeding on which user field is which.   They represent the custom fields in the config section.

Hopefully in a day or two I can post it.  It will be version 1.9.5.


Thanks Vuud, can they be included in the CPMFetch version 1.6.x series also? 

I realized that separation of the CPMFetch script as an independent entity might be more flexible than its integration to a specific CPG gallery itself.  In this case, I think the stand-alone CPMFetch version 1.6.x series  might be more suitable, and more stable for my purpose.

The key reason for opting for the stand-alone CPMFetch version 1.6.x series for now is the fact that in a multiple and independent CPG galleries setup -- that I have adopted for my website -- it is better that the single CPMFetch script directly used for all the resulting dynamic CPMFetch-scripted webpages will not be coupled with any of the CPG galleries created.

Not all the CPG galleries are created the same way.  For example, some galleries have the images within the gallery while most use images in a common image directory database, located outside of the CPG galleries.  Many other  features are also different and customized for each CPG gallery.

The other major reason is that  I have not gotten the 1.9.x series to work completely yet. There is no error based on the output of the "cftest.php" but the actual thumbnail images were not showing properly, although the "image links" are showing and clickable back to the correct CPG site. I am sure that the reason might be quite simple, but with the key reason stated above. 

Thus, for now I decided to stick on concentrating in understanding the features of the  CPMFetch version 1.6.x series, which I am getting more quite familiar with already.  Thanks all to your patience in guiding me.

CGC

vuud

Quote from: cgc0202 on November 12, 2006, 08:40:33 PM
Thanks Vuud, can they be included in the CPMFetch version 1.6.x series also? 

1.6 is going away when I release 2.0 (1.9.x graduating).  There will be no official support, updates or anything else for that line.

Quote
The other major reason is that  I have not gotten the 1.9.x series to work completely yet. There is no error based on the output of the "cftest.php" but the actual thumbnail images were not showing properly, although the "image links" are showing and clickable back to the correct CPG site. I am sure that the reason might be quite simple, but with the key reason stated above. 

There is no cftest.php for 1.9.x ... there is an install script.  1.9.x is also test, so not working is not all that surprising.

Quote
Thus, for now I decided to stick on concentrating in understanding the features of the  CPMFetch version 1.6.x series, which I am getting more quite familiar with already.  Thanks all to your patience in guiding me.

That's okay - all of that should work in 2.x - I am trying to keep as much as possible backward compatible.  The only thing that really changes is the way the cpmfetch object is created.  no worries.

2.x supports multiple configuration files, which you can create by hand if you want to.  I will help you burn this bridge when you get to it because I know how involved your task is.

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

droz928

I am having some troubles here.

I am using the Dev ver 1.9.6. It is working quite well, but when i try subtitle => %1 all i get as an out put is 1 not what i have in the custom field 1.

vuud

Quote from: droz928 on December 27, 2006, 04:28:20 AM
I am having some troubles here.

I am using the Dev ver 1.9.6. It is working quite well, but when i try subtitle => %1 all i get as an out put is 1 not what i have in the custom field 1.

I don't have a dev version 1.9.6...  At least I don't think I do.... the %1, %2, %3, %4 is added in 1.9.5 which I have not released yet.

It's eager to be released though - the list of changes is growing so much that I may have to release it tonight.
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

vuud

Quote from: droz928 on December 27, 2006, 04:28:20 AM
I am having some troubles here.

I am using the Dev ver 1.9.6. It is working quite well, but when i try subtitle => %1 all i get as an out put is 1 not what i have in the custom field 1.


1.9.5 released tonight:  see this post
http://forum.coppermine-gallery.net/index.php?topic=39640.0
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