Advanced search  

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]

Pages: [1]   Go Down

Author Topic: User field in show image  (Read 3352 times)

0 Members and 1 Guest are viewing this topic.

cyberspeed

  • Coppermine newbie
  • Offline Offline
  • Posts: 5
User field in show image
« on: November 02, 2006, 02:57:16 am »

Hi, i want a little info, made a search trough the forum but i cant find the solution, i want to show an user field, user1 for being specific below caption in imagedisplay, tryed all the ways described for thumbnail in themes.inc.php but i only get parts of the code i put, the place where i want to view the user1 field y below:
<!-- BEGIN caption -->
                                <tr>
                                        <td class="tableb"><center>
                                                {CAPTION}
                                        </center></td>
                                </tr>
<!-- END caption -->

i want to make this because its an important info and dont want the need of users clicking the "Info" button of the top

ill apreciate some help and thanks in advice
« Last Edit: November 02, 2006, 04:20:56 am by Nibbler »
Logged

Nibbler

  • Guest
Re: User field in show image
« Reply #1 on: November 02, 2006, 03:09:12 am »

Step 1: Add your tag (eg. {USER1}) into the $template_display_media template where you want it to appear. Note that if you place it inside the <!-- BEGIN caption --><!-- END caption --> section it will only be displayed if there is also a caption. If there is no caption set then that section is cut out.

Step 2: Add code to process that tag into theme_html_picture()

Code: [Select]
    $params = array('{CELL_HEIGHT}' => '100',
        '{IMAGE}' => $CURRENT_PIC_DATA['header'].$CURRENT_PIC_DATA['html'].$CURRENT_PIC_DATA['footer'],
        '{ADMIN_MENU}' => $CURRENT_PIC_DATA['menu'],
        '{TITLE}' => bb_decode($CURRENT_PIC_DATA['title']),
        '{CAPTION}' => bb_decode($CURRENT_PIC_DATA['caption']),
        '{USER1}' => $CURRENT_PIC_DATA['user1'], // This is your new line
        );

If you don't have $template_display_media or theme_html_picture() in your own theme.php you must copy it from themes/sample/theme.php and then modify your copy. Don't copy the entire file, just the template or function you are going to modify.
Logged

cyberspeed

  • Coppermine newbie
  • Offline Offline
  • Posts: 5
Re: User field in show image
« Reply #2 on: November 02, 2006, 03:36:10 am »

Ty very much nibbler! you very rule, this is a nice feature that i wanted, you can see it working on: http://www.minoruwada.com.ar/fotos/displayimage.php?album=1&pos=0

Thanks again
Logged
Pages: [1]   Go Up
 

Page created in 0.019 seconds with 21 queries.