Empty lines in album description

Okat
Okat's picture

Joined: 2009-04-05
Posts: 78
Posted: Sat, 2009-06-27 09:25

When I type a (rather long) album description in the dialog box and enter empty lines (by using enter) they (the empty lines) get stored in the database,
but they won't show up on the actual page. It's shown as a great blob of text without line breaks or empty lines.

Don't know if this is the way it should be done, but it seems to work:

in /themes/default/views/album.html.php
change line #7 from:

<div class="gDescription"><?= p::clean($item->description) ?></div>

to:

<div class="gDescription"><?= nl2br(p::clean($item->description)) ?></div>

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Sun, 2009-06-28 04:18

I think that this idea is roughly covered by this ticket: http://sourceforge.net/apps/trac/gallery/ticket/400
We'll support HTML in descriptions which should allow you to make it look the way that you want.
---
Problems? Check gallery3/var/logs
bugs/feature req's | upgrade to the latest code | use git | help! vote!

 
Okat
Okat's picture

Joined: 2009-04-05
Posts: 78
Posted: Sun, 2009-06-28 08:13

You're right, of course. And here I go again, thinking I could make myself useful ;-)

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Sun, 2009-06-28 18:29

:-D you'll have to try harder!
---
Problems? Check gallery3/var/logs
bugs/feature req's | upgrade to the latest code | use git | help! vote!