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: Formating Descriptions  (Read 2808 times)

0 Members and 1 Guest are viewing this topic.

ML

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 23
Formating Descriptions
« 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

Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Formating Descriptions
« Reply #1 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;
Logged

ML

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 23
Re: Formating Descriptions
« Reply #2 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.
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Formating Descriptions
« Reply #3 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>
Logged

ML

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 23
Re: Formating Descriptions
« Reply #4 on: August 31, 2011, 12:55:58 am »

OK. Thanks for explaining that.

I appreciate your help
Logged
Pages: [1]   Go Up
 

Page created in 0.022 seconds with 19 queries.