Member
Member
cactux   2012-10-09, 21:13
#1

Hello,

I recently upgraded to the latest version of Zenphoto (1.4.3.3).
Now the text on the albums lost all the line breaks (the carriage return).
It seems the html "BR" tag is missing.
In the database, the "desc" field of the "albums" table contains only newline characters, no BR. Before the upgrade Zenphoto displayed the text nicely, what should I do to have it work as before?

Thanks for your help

Member
Member
sbillard   2012-10-09, 21:49
#2

the printField() function, the underlying code for all these print functions, has a parameter to control converting line breaks into HTML. It defaults to false, though. Making those conversions was messing up descriptions entered by the WYSIWYG editors.

Your best fix is to change the newline characters into tags in the database as ofcourse, browsers carefully ignore newline characters.

Or you could directly call the printField() function to print your descriptions and pass true as the $convertBR parameter.

Member
Member
cactux   2012-10-10, 11:12
#3

Hello,

Thank you for your answer, I'll do a small PHP script to update the database, using the nl2br() function.

I'll do it this week-end and post it here in case it can help someone with the same problem.
Except if it is already available somewhere?

Administrator
Administrator
acrylian   2012-10-10, 11:50
#4

To my knowledge this has never been reported before.

Member
Member
cactux   2012-10-10, 19:09
#5

Hello,

Here is a script:

Member
Member
cactux   2012-10-10, 19:11
#6

Inserting php code here is not a good result.
Here is the code in more readable format:
http://snipt.org/vfHi2

  
Powered By MyBB, © 2002-2026 MyBB Group.
Made with by Curves UI.