Adding a field? Adding a field?
 

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

Adding a field?

Started by GabeCovert, February 15, 2007, 09:58:22 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

GabeCovert

I'd like to add an additional field to images in my Coppermine gallery.  Besides adding a field to the database, which files will I need to edit in order to add/edit/view an additional field?

Gabe

GabeCovert

Nevermind...  I just found the custom field section in the configuration...   ;D

Gabe

GabeCovert

Is there any way to move a custom field up into the frame with the picture and caption?

If not, is it possible to hide some of the information under the "File Information" section?

Gabe

Joachim Müller

Quote from: GabeCovert on February 15, 2007, 10:11:36 PM
Is there any way to move a custom field up into the frame with the picture and caption?
Not sure what you mean, post more details. A link to your coppermine-driven gallery might help as well, plus a screenshot what you'd like to accomplish.

Quote from: GabeCovert on February 15, 2007, 10:11:36 PMIf not, is it possible to hide some of the information under the "File Information" section?
Yes, there are plugins as well as mods that let you determine what you'd like to see removed.

GabeCovert

Attached is an image of what I'm trying to accomplish, with the location of the custom field in red, in the main frame of the picture, below the title and caption.

Where is a good place to find these mods of which you've spoken?

Gabe

Joachim Müller

Quote from: GabeCovert on February 16, 2007, 03:16:01 AM
Attached is an image of what I'm trying to accomplish, with the location of the custom field in red, in the main frame of the picture, below the title and caption.
Quote from: GauGau on February 16, 2007, 12:34:03 AM
A link to your coppermine-driven gallery might help as well
Not a frame. In web-terms, frame refers to the use of a particular HTML element. If you just want to add some text there, you'll need to modify themes/yourtheme/theme.php. Find$template_display_mediaand edit the section as you see fit. If the section doesn't exist in your custom theme, copy the section// HTML template for intermediate image display
$template_display_media = <<<EOT
        <tr>
                <td align="center" class="display_media" nowrap="nowrap">
                        <table cellspacing="2" cellpadding="0" class="imageborder">
                                <tr>
                                        <td align="center">
                                                {IMAGE}

                                        </td>
                                </tr>
                        </table>
                </td></tr>
                <tr><td>
                                                <table width="100%" cellspacing="2" cellpadding="0" class="tableb">
                                <tr>
                                        <td align="center">

                                                {ADMIN_MENU}
                                        </td>
                                </tr>
                        </table>





<!-- BEGIN img_desc -->
                        <table cellpadding="0" cellspacing="0" class="tableb" width="100%">
<!-- BEGIN title -->
                                <tr>
                                        <td class="tableb"><center><b>
                                                {TITLE}
                                        </b></center></td>
                                </tr>
<!-- END title -->
<!-- BEGIN caption -->
                                <tr>
                                        <td class="tableb"><center>
                                                {CAPTION}
                                        </center></td>
                                </tr>
<!-- END caption -->
                        </table>
<!-- END img_desc -->
                </td>
        </tr>

EOT;
from themes/sample/theme.php into a new line before?>into themes/yourtheme/theme.php
If you want to actually add the content of a custom field (i.e. data pulled from the database), you'll have to come up with a more complicated hack. It would be easier if you would have done as suggested and posted a link and additional details what you actually want to see acomplished.




Quote from: GabeCovert on February 16, 2007, 03:16:01 AM
Where is a good place to find these mods of which you've spoken?
Filter & Sort File Information Fields on Image Display Page