album title too long - stretches the template.

effisk
effisk's picture

Joined: 2005-01-09
Posts: 37
Posted: Mon, 2005-01-31 15:51

Hi everyone,

I have a problem with my gallery:

When titles are too long, they expand the width of my table and make it wider that the template. Example:
http://www.teetravel.com/galerie/albums.php

Is there a way to keep the title and split it on two lines?

I tried with adding some HTML code in the title (<br />) but it's being removed.

cheers.

 
Tim_j
Tim_j's picture

Joined: 2002-08-15
Posts: 6818
Posted: Mon, 2005-01-31 16:38

Hi,

open util.php
find in function editField(..)

$buf .= $album->fields[$field];
        if ($link) {
                $buf .= "</a>";
        }

after add:

$buf = wordwrap($buf, 50, '<br>');

Jens

 
effisk
effisk's picture

Joined: 2005-01-09
Posts: 37
Posted: Mon, 2005-01-31 20:41

that was too easy :D

It doesn't work. Instead of displaying the link, it actually displays part of the code for the link (on two lines, I must admit it :wink: )

href="http://www.teetravel.com/galerie/challenge-touessrok-2004">1er
Challenge International
 
effisk
effisk's picture

Joined: 2005-01-09
Posts: 37
Posted: Mon, 2005-01-31 20:47

I don't know much about php, I'm trying several options..

 
effisk
effisk's picture

Joined: 2005-01-09
Posts: 37
Posted: Mon, 2005-01-31 20:50

ok, here's the code it actually creates:
I don't get it why it puts the <br> at the beginning of the line when it is percised 50 in the wordwrap :-? <a<br>href="http://www.teetravel.com/galerie/challenge-touessrok-2004">1er<br>Challenge International Touessrok - 27 Nov. au 05<br>Déc. 2004</a>

 
effisk
effisk's picture

Joined: 2005-01-09
Posts: 37
Posted: Mon, 2005-01-31 20:58

I have temporarily solved the problem by setting the number to 105.
It works for this title, not sure it will work all the time though...

 
Tim_j
Tim_j's picture

Joined: 2002-08-15
Posts: 6818
Posted: Tue, 2005-02-01 08:57

My fault, sorry.

open util.php
find in function editField(..)

After:$buf .= $album->fields[$field];

Add: $buf = wordwrap($buf, 50, '<br>');

Jens

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Tue, 2009-01-13 02:50

version 1.5.7 this function is in
/lib/content.php

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
SimplyFburg

Joined: 2008-01-12
Posts: 11
Posted: Thu, 2009-01-15 01:44

bumped

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Thu, 2009-01-15 03:33

So you can't find this function?

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team