Advanced search  

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

Pages: [1]   Go Down

Author Topic: how to make a placeholder for iptc data?  (Read 5562 times)

0 Members and 1 Guest are viewing this topic.

cygnus

  • Coppermine newbie
  • Offline Offline
  • Posts: 6
how to make a placeholder for iptc data?
« on: December 23, 2004, 03:17:08 am »

I've read through threads on moving placeholder variables around the page but nobody talks about iptc data.
I'm having trouble taking that iptc data like author from the display/hide layer on displayimage.php and moving it just below the image, outside of the layer that displays/hides.

Not the exif data... iptc.

Actually, I'm having trouble finding out what the variable name or placeholder name is to begin with.

I guessed at defining '{PHOTOGRAPHER}' => $iptc['Author'] in displayimage.php and then putting {PHOTOGRAPHER} in theme.php, but no go.
« Last Edit: December 28, 2004, 05:36:40 am by GauGau »
Logged

donnoman

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1615
  • From donovanbray.com
    • Donovan Bray
Re: how to make a placeholder for iptc data?
« Reply #1 on: December 23, 2004, 05:41:54 am »

I believe its because the Author information isn't making it to the theme function.

This will allow the Author information to at least show up with the rest of the IPTC info.

Send me a screen shot of where you would like the Author's name to appear. Or quote the section of theme.php where you put {PHOTOGRAPHER}

displayimage.php; find:
Code: [Select]
       if (isset($iptc['SubCategories'])) $info[$lang_picinfo['iptcSubCategories']] = trim(implode(" ",$iptc['SubCategories']));

Add after it:
Code: [Select]
       if (isset($iptc['Author'])) $info[$lang_picinfo['iptcAuthor']] = trim($iptc['Author']);

lang/english.php; find: (And in any additional language files if you use them, with appropriate translations)
Code: [Select]
 'iptcSubCategories'=>'IPTC Sub Categories', //cpg1.3.0

Add after it:
Code: [Select]
 'iptcAuthor'=>'IPTC Author', //cpg1.3.0
Logged

cygnus

  • Coppermine newbie
  • Offline Offline
  • Posts: 6
Re: how to make a placeholder for iptc data?
« Reply #2 on: December 23, 2004, 04:49:18 pm »

http://escape.blogdns.com/gallery/displayimage.php?album=22&pos=0

"author" has a value of "im the author" as set in Photoshop CS.
I put {PHOTOGRAPHER} where I'd like it to appear.

Logged

donnoman

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1615
  • From donovanbray.com
    • Donovan Bray
Re: how to make a placeholder for iptc data?
« Reply #3 on: December 23, 2004, 06:29:16 pm »

You can still do the previous change I posted so that the Author shows up in the PIC_INFO table.

Below is what you will need to do to show that information in the {CAPTION} section.

Note: This forces the system to parse the picture TWICE for IPTC information, I would code this differently If you
are running a really busy site. If your not... it's probably not important.


displayimage.php; function html_picture; find:
Code: [Select]
   $params = array('{CELL_HEIGHT}' => '100',
        '{IMAGE}' => $pic_html,
        '{ADMIN_MENU}' => $picture_menu,
        '{TITLE}' => $CURRENT_PIC_DATA['title'],
        '{CAPTION}' => bb_decode($CURRENT_PIC_DATA['caption']),
        );

change to
Code: [Select]
   if ($CONFIG['read_iptc_data']) $iptc = get_IPTC($CONFIG['fullpath'] . $CURRENT_PIC_DATA['filepath'] . $CURRENT_PIC_DATA['filename']);

    $params = array('{CELL_HEIGHT}' => '100',
        '{IMAGE}' => $pic_html,
        '{ADMIN_MENU}' => $picture_menu,
        '{TITLE}' => $CURRENT_PIC_DATA['title'],
        '{CAPTION}' => bb_decode($CURRENT_PIC_DATA['caption']),
        '{PHOTOGRAPHER}' => $iptc['Author'],
        );
Logged

cygnus

  • Coppermine newbie
  • Offline Offline
  • Posts: 6
Re: how to make a placeholder for iptc data?
« Reply #4 on: December 23, 2004, 08:59:52 pm »

Followed that to the letter and still nothing.  I mean, it's weird because "author:  iam the author" appears in that file info table.

$IPTC_data['Author'] is defined in iptc.inc.php and I also followed this thread:
http://forum.coppermine-gallery.net/index.php?topic=692.0

The author is stored in $user1.
« Last Edit: December 23, 2004, 09:06:50 pm by cygnus »
Logged

donnoman

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1615
  • From donovanbray.com
    • Donovan Bray
Re: how to make a placeholder for iptc data?
« Reply #5 on: December 23, 2004, 11:18:58 pm »

Followed that to the letter and still nothing. I mean, it's weird because "author: iam the author" appears in that file info table.

$IPTC_data['Author'] is defined in iptc.inc.php and I also followed this thread:
http://forum.coppermine-gallery.net/index.php?topic=692.0

The author is stored in $user1.

No, only in that MOD is the author stored in $user1.

The code I posted doesn't use the $user defined variables, and unless you are using that mod your install isn't using them either.

post a copy of the sections you changed in your theme.php and displayimage.php
Logged

cygnus

  • Coppermine newbie
  • Offline Offline
  • Posts: 6
Re: how to make a placeholder for iptc data?
« Reply #6 on: December 24, 2004, 02:59:15 pm »

displayimage.php:

Code: [Select]
$params = array('{CELL_HEIGHT}' => '100',
        '{IMAGE}' => $pic_html,
        '{ADMIN_MENU}' => $picture_menu,
        '{TITLE}' => $CURRENT_PIC_DATA['title'],
        '{CAPTION}' => bb_decode($CURRENT_PIC_DATA['caption']),
{PHOTOGRAPHER}' => $iptc['Author'],
        );

english.php, in $lang_picinfo:

Code: [Select]
'iptcAuthor'=>'IPTC Author', //cpg1.3.0
theme.php, in the caption block:

Code: [Select]
{PHOTOGRAPHER} <- photographer should echo here
Logged

donnoman

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1615
  • From donovanbray.com
    • Donovan Bray
Re: how to make a placeholder for iptc data?
« Reply #7 on: December 24, 2004, 03:34:26 pm »

 ??? Obviously I should have been more clear  :o

I still can't tell which sections of those files you modified.

how about attaching the whole file.
Logged

cygnus

  • Coppermine newbie
  • Offline Offline
  • Posts: 6
Re: how to make a placeholder for iptc data?
« Reply #8 on: December 24, 2004, 05:10:47 pm »

Sure. 
Logged

donnoman

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1615
  • From donovanbray.com
    • Donovan Bray
Re: how to make a placeholder for iptc data?
« Reply #9 on: December 25, 2004, 01:35:49 am »


change to
Code: [Select]
   if ($CONFIG['read_iptc_data']) $iptc = get_IPTC($CONFIG['fullpath'] . $CURRENT_PIC_DATA['filepath'] . $CURRENT_PIC_DATA['filename']);

    $params = array('{CELL_HEIGHT}' => '100',
        '{IMAGE}' => $pic_html,
        '{ADMIN_MENU}' => $picture_menu,
        '{TITLE}' => $CURRENT_PIC_DATA['title'],
        '{CAPTION}' => bb_decode($CURRENT_PIC_DATA['caption']),
        '{PHOTOGRAPHER}' => $iptc['Author'],
        );


You didn't put in the "IF" line at the top of my instructions.  Insert that line, and try again. It's working with my installation.

Also FYI, since you put the token in the comments section this will only show up for pictures that have comments.
Logged

cygnus

  • Coppermine newbie
  • Offline Offline
  • Posts: 6
Re: how to make a placeholder for iptc data?
« Reply #10 on: December 28, 2004, 04:30:54 am »

Thanks donnoman!
Logged
Pages: [1]   Go Up
 

Page created in 0.022 seconds with 19 queries.