Cant't get rid of centered text alignment in picture description... Cant't get rid of centered text alignment in picture description...
 

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

Cant't get rid of centered text alignment in picture description...

Started by oekokubus, January 17, 2006, 06:50:46 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

oekokubus

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.

Paver

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:
// 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.

oekokubus

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

Paver

You're welcome.  Remember that in an open-source community, where there's a will, there's a way.