Displaying custom fields in thumbnails.php, in cpg1.4.x Displaying custom fields in thumbnails.php, in cpg1.4.x
 

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

Displaying custom fields in thumbnails.php, in cpg1.4.x

Started by ansonyc, August 22, 2006, 05:39:47 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

ansonyc

Hello Support Team!

I would like to display one of my custom fields along with the title and caption data underneath my thumbnails on all parts of the site.

I have filled out one of my four custom fields with a name (let's say "Price") and values, and that value is showing up correctly in the Picture Information section of the Display Image page.  However, I specifically want it to show up in the thumbnails.php and I'm not having any luck doing that, even when modifying some of the PHP pages.

I see a similar topic exists:
http://forum.coppermine-gallery.net/index.php?topic=5163.0
but the examples given there are specific to cpg1.3.x and it seems that the PHP files are structured quite differently in cpg1.4.8, which I have upgraded to.

I believe I have gotten part of the way there.

I modified functions.inc.php to add this line in the function build_caption:
$caption .= '<span class="thumb_title">' . $row['user1'] . '</span>';

and YES, I can get my user1 field (Price) to display on the main pages, that show Random Files and Latest Editions.

Here's an example of Price showing up:
http://www.fantiko.com/main/

However, I'm unable to get the custom field Price to show up on the thumbnails.php page at all, in this example:
http://www.fantiko.com/main/thumbnails.php?album=4

What should I do?  I'm guessing I'm missing some declarations or something that would make this same line work in thumbnails.php, but I'm not sure what...  Can someone try this out, or give me suggestions?

ansonyc

Oh, someone let me know if they think I placed this in the wrong forum.  I know this is not exactly a theme/skin/template question, but on the other hand, I do want to change the visual appearance of my coppermine site (by displaying custom fields).

If this should go into miscellaneous instead, let me know, or move it there for me.