Formating Descriptions Formating Descriptions
 

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

Formating Descriptions

Started by ML, August 21, 2011, 03:26:18 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

ML

Is there any way to format the descriptions for photos, or whatever else is posted, instead of them spreading all the way across the page the way they do? Maybe a paragraph format or something?

I am having to go back and forth between the "photo and description" to the edit page to just click "Enter" so that a line will not just have one work on it.

Any suggestions would be greatly appreciated as the way the descriptions look now is not so good.

example
http://micksplace.net/coppermine/displayimage.php?album=1&pid=47#top_display_media


Αndré

Sorry, but I'm not sure if I have understood what you try to accomplish. If you want to limit the maximal width of the description, copy the following code block to your theme's theme.php file and add some proper HTML/CSS around {CAPTION}:
$template_display_media = <<<EOT
        <tr>
                <td align="center" class="display_media" nowrap="nowrap">
                        <table width="100%" cellspacing="2" cellpadding="0">
                                <tr>
                                        <td align="center" style="{SLIDESHOW_STYLE}">
                                                {IMAGE}
                                        </td>
                                </tr>
                        </table>
                </td>
            </tr>
            <tr>
                <td>
                        <table width="100%" cellspacing="2" cellpadding="0" class="tableb tableb_alternate">
                                        <tr>
                                                <td align="center">
                                                        {ADMIN_MENU}
                                                </td>
                                        </tr>
                        </table>


<!-- BEGIN img_desc -->
                        <table cellpadding="0" cellspacing="0" class="tableb tableb_alternate" width="100%">
<!-- BEGIN title -->
                                <tr>
                                        <td class="tableb tableb_alternate"><h1 class="pic_title">
                                                {TITLE}
                                        </h1></td>
                                </tr>
<!-- END title -->
<!-- BEGIN caption -->
                                <tr>
                                        <td class="tableb tableb_alternate"><h2 class="pic_caption">
                                                {CAPTION}
                                        </h2></td>
                                </tr>
<!-- END caption -->
                        </table>
<!-- END img_desc -->
                </td>
        </tr>

EOT;

ML

Yes, limiting the maximum width would probably do the trick.

Where would I insert this into the php file?

And what do you mean by: "add some proper HTML/CSS around {CAPTION}:"

I am not a programmer, but I get by. I am just unsure what you mean.

Thanks for the reply.

Αndré

Quote from: ML on August 23, 2011, 08:45:22 AM
Where would I insert this into the php file?
Right before the closing
?>
PHP tag.


Quote from: ML on August 23, 2011, 08:45:22 AM
And what do you mean by: "add some proper HTML/CSS around {CAPTION}:"
I meant something like
<table align="center"><tr width="100%"><td width="500">{CAPTION}</td></tr></table>

ML

OK. Thanks for explaining that.

I appreciate your help