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: Adding a field?  (Read 3540 times)

0 Members and 1 Guest are viewing this topic.

GabeCovert

  • Coppermine newbie
  • Offline Offline
  • Posts: 7
Adding a field?
« on: February 15, 2007, 09:58:22 pm »

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
« Last Edit: February 16, 2007, 12:34:15 am by GauGau »
Logged

GabeCovert

  • Coppermine newbie
  • Offline Offline
  • Posts: 7
Re: Adding a field?
« Reply #1 on: February 15, 2007, 09:59:27 pm »

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

Gabe
Logged

GabeCovert

  • Coppermine newbie
  • Offline Offline
  • Posts: 7
Re: Adding a field?
« Reply #2 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?

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

Gabe
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Adding a field?
« Reply #3 on: February 16, 2007, 12:34:03 am »

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.

If 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.
Logged

GabeCovert

  • Coppermine newbie
  • Offline Offline
  • Posts: 7
Re: Adding a field?
« Reply #4 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.

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

Gabe
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Adding a field?
« Reply #5 on: February 16, 2007, 03:50:14 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.
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
Code: [Select]
$template_display_mediaand edit the section as you see fit. If the section doesn't exist in your custom theme, copy the section
Code: [Select]
// 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
Code: [Select]
?>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.



Where is a good place to find these mods of which you've spoken?
Filter & Sort File Information Fields on Image Display Page
Logged
Pages: [1]   Go Up
 

Page created in 0.022 seconds with 19 queries.