There might be a bit low responsiveness on technical matters because of some personal family related cirumstances
- Malte (acrylian)

New line to HTML br?

I have already asked in another forum, what about the line breaks in the description?
Currently no \n are converted to <br> and that is not a solution.
<?php nl2br(printAlbumDesc()); ?>
What helps?


  • wibbi Member
    edited March 8

    <?php echo nl2br(getAlbumDesc()); ?>
    <?php echo nl2br(getGalleryDesc()); ?>
    <?php echo nl2br(getImageDesc()); ?>

  • wibbi Member

    Question: Does this conflict with newly saved descriptions?

  • wibbi Member

    OK, i have test it.
    Zenphoto don't save line breaks as <br>. Same as Gallery3.

    But, for what is this?
    <?php printAlbumDesc(); ?>
    This don't work with line breaks.

  • acrylian Administrator
    edited March 8

    <?php printAlbumDesc(); ?> outputs the album description as saved. Zenphoto generally does no output processing. For formatting use plain HTML, for example by using the default plugin TinyMCE4. If you don't want to use that, you need to format the output just like you do via nl2br or whatever else on the theme side.

  • wibbi Member

    What's the difference between
    except "echo"?

  • wibbi Member

    OK, i have found it in the docs.

Sign In or Register to comment.