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: Cant't get rid of centered text alignment in picture description...  (Read 3531 times)

0 Members and 1 Guest are viewing this topic.

oekokubus

  • Coppermine newbie
  • Offline Offline
  • Posts: 2

Have used all my combinatorial skills within the template.html, style.css and theme.php trying to get rid of centered text alignment in the picture description. As BBCode does not work either on that topic, I would appreciate some help how to enforce left aligned text in the picture description box.
« Last Edit: January 17, 2006, 11:45:11 pm by GauGau »
Logged

Paver

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 1609
  • Paul V.
Re: Cant't get rid of centered text alignment in picture description...
« Reply #1 on: January 17, 2006, 08:10:31 pm »

The answer is in theme.php.  If you look in the sample theme's theme.php, you'll see all the variables & functions you can use in your theme.  Only copy the section you want to modify.  In this case, copy the variable $template_display_media from the first comment describing it to the line "EOT;".  To be clear, here it is:
Code: [Select]
// HTML template for intermediate image display
$template_display_media = <<<EOT
        <tr>
                <td align="center" class="display_media" nowrap="nowrap">
                        <table cellspacing="2px" cellpadding="0px" class="imageborder">
                                <tr>
                                        <td align="center">
                                                {IMAGE}

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

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





<!-- BEGIN img_desc -->
                        <table cellpadding="0px" cellspacing="0px" 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;
After copying this into your theme.php (wherever you like), go to the section bracketted by <!-- BEGIN caption --> and <!-- END caption -->.  Remove the <center> tag and the picture description will no longer be centered.  Modify the $template_display_media variable however you like.

I found this quickly by going to the web page I wanted to modify (or look up in this case), then "View Source".  I look for the text I want to modify and look for comment tags or something descriptive near it.  Then look in the sample theme.php and find the section to copy.  Always copy from the sample theme.php so you'll have a non-hacked Coppermine.
Logged

oekokubus

  • Coppermine newbie
  • Offline Offline
  • Posts: 2
Re: Cant't get rid of centered text alignment in picture description...
« Reply #2 on: January 17, 2006, 08:59:42 pm »

A big thank you - your instructions just worked like a snap - was close of giving up on Coppermine. Cheers!
Logged

Paver

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 1609
  • Paul V.
Re: Cant't get rid of centered text alignment in picture description...
« Reply #3 on: January 17, 2006, 10:12:17 pm »

You're welcome.  Remember that in an open-source community, where there's a will, there's a way.
Logged
Pages: [1]   Go Up
 

Page created in 0.019 seconds with 19 queries.