User field in show image User field in show image
 

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

User field in show image

Started by cyberspeed, November 02, 2006, 02:57:16 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

cyberspeed

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

Nibbler

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()


    $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.

cyberspeed

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