forum.coppermine-gallery.net

Support => cpg1.5.x Support => cpg1.5 themes (visuals) => Topic started by: ML on August 21, 2011, 03:26:18 am

Title: Formating Descriptions
Post by: ML on August 21, 2011, 03:26:18 am
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

Title: Re: Formating Descriptions
Post by: Αndré on August 22, 2011, 05:03:28 pm
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}:
Code: [Select]
$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;
Title: Re: Formating Descriptions
Post by: ML on August 23, 2011, 08:45:22 am
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.
Title: Re: Formating Descriptions
Post by: Αndré on August 30, 2011, 04:10:19 pm
Where would I insert this into the php file?
Right before the closing
Code: [Select]
?>PHP tag.


And what do you mean by: "add some proper HTML/CSS around {CAPTION}:"
I meant something like
Code: [Select]
<table align="center"><tr width="100%"><td width="500">{CAPTION}</td></tr></table>
Title: Re: Formating Descriptions
Post by: ML on August 31, 2011, 12:55:58 am
OK. Thanks for explaining that.

I appreciate your help