We build. You grow.

Get best community software here

Start a social network, a fan-site, an education project with oxwall - free opensource community software

Photo Album Description | Forum

Ole Rasmussen
Ole Rasmussen Sep 1 '19
When I enter a description for a photo album, all my efforts to get a line break fails. All tekst is in one continuous line . NOT GOOD!!

Please fix that. I know it has been a problem for a long time now....



dave Leader
dave Sep 2 '19
What version of oxwall are you running and are you using the emojis plugin?  I use the emojis plugin and just want to be sure i have the same test environment that you do. 


We might be able to try some css to change this for you. 

The Forum post is edited by dave Sep 2 '19
Ole Rasmussen
Ole Rasmussen Sep 2 '19
I'm using v. 1.8.4 build 10800

I'm not using the emojis plugin, I think :-P


dave Leader
dave Sep 2 '19
ok thanks, ill do some testing later today and reply here. 
dave Leader
dave Sep 25 '19
Sorry about the late reply, i am not able to duplicate this on my test site.  Here is what i get for the album desc. If must be a plugin conflict.





Steve
Steve Sep 26 '19
Dave I apologize for not mentioning this in my message to you. 


When you make a post in newfeed with a image it looks good until you click on send once you click on send the text has no paragraph breaks or line breaks.


The strange thing is when you go to the photo section and look at the image the descrition you typed looks just the way it did before you clicked on send. 

dave Leader
dave Sep 26 '19
Ok ill try that 
dave Leader
dave Sep 26 '19
Unabel to reproduce that




and with a pic





The Forum post is edited by dave Sep 26 '19
Ole Rasmussen
Ole Rasmussen Sep 27 '19
Well Dave.

This is exactly what I get. A "Title" then a line break, after that all text is in one continuous line, no line break, no paragraph.


Try to write this in a Photo album description in your test setup.


Line one

Line Two

Line Three


Line Five



Ole

dave Leader
dave Sep 27 '19
OK i see what you mean now.. 




The text is probably trimmed which gets rid spaces or it does not allow html....  ill try a few things.

The Forum post is edited by dave Sep 27 '19
Steve
Steve Oct 11 '19
Curious has anyone figured out how to correct this problem yet?
Ole Rasmussen
Ole Rasmussen Oct 13 '19
Think Dave is still trying to find out where it's going wrong :P
dave Leader
dave Oct 13 '19
I was not able to spend more time to figure this out yet, sorry
Steve
Steve Oct 25 '19
I know Dave is checking this out among all of his other projects and it is greatly appreciated.


But if anyone can check this out or has found a solution to it can you please share.


It makes the website look tacky and it doesn't look well for Oxwall community due to the fact of the websites saying Powered by OXWALL.

The Forum post is edited by Steve Oct 25 '19
Patricia Zorrilla Leader
Patricia Zorrilla Dec 10 '19

It's very simple: When you display a text that contains line breaks (it can be CR, LF or CRLF), you have to replace it with <br>

This is the function of PHP nl2br().

There is a |nl2br modifier in Smarty but it is obsolete so we can no longer use it because it generates a warning and does not modify the text.

There are two ways to solve this:

by storing the converted text or converting it only when it is going to be displayed on the screen.

This last option is the most interesting because it will not have any unwanted side effects anywhere, since it does not alter the stored values ​​and we do not know what plugins are going to use it.

It will also be very ugly and unprofessional if the user edits that text and HTML codes appear in the middle.

In this piece of code from a plugin of mine:

$writer = MAGAZINE_BOL_WriterDao::getInstance()->findById($writerId);

$writer->description = nl2br($writer->description);

$this->assign('writer', $writer);

You can see how I modify the description of the $Writer class before assigning it to a function of displaying data on the screen. If $Writer had to be stored again it could use the inverse function br2ln() but it would be better to use a copy of $writer and respect the text entered by the user. Modifying and demodifying it could be that you alter it.


Now we have to find where to insert that nl2br() in the photo plugin and verify that the smarty |nl2br modifier is not being trusted for this task because it is obsolete.

raresky six
raresky six Apr 17 '21

A photographic album or photo album, is a series of photographic prints collected by an individual person or family in the form of a book. ... Older style albums often were simply books of heavy paper on which photos could be glued to or attached to with adhesive corners or pages. mybk-experience.onl www.mcdvoicesurvey.onl

The Forum post is edited by raresky six Apr 20 '21
mick biden
mick biden Dec 21 '21
I know Dave is checking this out among all of his other projects and it is greatly appreciated.

Tea tv   netbanking login

The Forum post is edited by mick biden Dec 22 '21
jendyy
jendyy Oct 24 '22
It is great to read this article it  territorial io means a lot to us in this life. It teaches us humans that humans must love nature to make this life more colorful.