How to truncate picture description in album view How to truncate picture description in album view
 

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

How to truncate picture description in album view

Started by FinnK, November 10, 2003, 08:29:59 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

FinnK

I am using Coppermine to put pictures and text into some sort av traveling diary for a relative traveling in South America.

The diary text goes into the picture descriptions - and they tend to be rather long compeared to a normal picture description.

The result is that the album view becomes very "unpractical".

Is there a way to truncate picture descriptions in album view to a standard lenght? -so visitors has to "view picture" to read the rest.

Take a look: http://reisen.krogvig.no and open the album called Argentina

Thanks for all suggestions.

John


FinnK

Thanks for the tip, but this hack is for scrolling the ALBUM descriptions in the "album list".

I have long PICTURE descriptions wich messes up the page with thumbnails inside the albums.

If I knew where I could find where the code for displaying thumbnails and their PICTURE descriptions maybe the same type of hack could work?

Could anyone please point me in the right direction?

moorey

In theme.php, look for this line (around line 493 for the default theme):

// HTML template for intermediate image display
...
...


Edit as necessary.

FinnK

Sorry, but this it is not where I want to scroll the text either, as far as I can understand.

Where I want to scroll the text is where you get when you first go into the album: There are thumbnails for each picture in the album with picture title underneath and then there is the picture description.

If you check out http://reisen.krogvig.no/coppermine and open the album "Argentina, Buenos Aires" you will hopefully see what I mean.

FinnK

Yess!

I found where the <div> code for scrolling long text when displaying thumnails and picture descriptions (=caption) inside albums should go.

Its in the same file as mentioned before (of course):theme.php inside the folder for the theme in use.

The red is the new code.

Quote.....snip....
// HTML template for thumbnails display
$template_thumbnail_view = <<<EOT

<!-- BEGIN header -->
        <tr>
<!-- END header -->
<!-- BEGIN thumb_cell -->
        <td valign="top" class="thumbnails" width ="{CELL_WIDTH}" align="center">
                <table width="100%" cellpadding="0" cellspacing="0">
                        <tr>
                                <td align="center">
                                                                <div style="width:100%;height:200px;position:relative;overflow:auto;padding-right:10px">
                                     <a href="{LINK_TGT}">{THUMB}<br /></a>
                                        {CAPTION}
                                        {ADMIN_MENU}
                                                                </div>
                                </td>
                        </tr>
                </table>
        </td>
<!-- END thumb_cell -->
.....snip....