Description box - Text layout Description box - Text layout
 

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

Description box - Text layout

Started by toria55, August 08, 2008, 05:28:56 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

toria55

How can I set the text in the "Description" box to print/appear left to right, rather than centered?

Joachim Müller

Edit themes/yourtheme/theme.php, find$template_display_mediaand edit as suggested below. If that section doesn't exist in your custom theme, copy// 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 themes/yourtheme/theme.php into a new line before?>and then modify it. You need to modify                                <tr>
                                        <td class="tableb"><center>
                                                {CAPTION}
                                        </center></td>
                                </tr>
as you see fit - remove the <center> and </center>-tags, then add some wrapper into the table cell or apply your custom alignment to the table cell itself, or just leave it as is (without the <center>-tag), as left-alignment is default. For my taste, the most elegant solution is to replace the snippet mentioned above with                                <tr>
                                        <td class="tableb" style="text-align:left">
                                                {CAPTION}
                                        </td>
                                </tr>
to specifically set the alignment.

Hope that helps.

Joachim