Plain Text Line Breaks in 1.3.9 r213

Please post all install related problems here. Visit this forum first for troubleshooting.

Plain Text Line Breaks in 1.3.9 r213

Postby Evoplure on Fri Jun 27, 2008 01:38

Hello,
After installing 1.3.9 r213 (congratulations Oliver, good stuff there!) I realised that two or more line breaks in a paragraph when using the Plain Text content part are not shown on the frontend as spaces between lines...

It seems that it is because they are replaced for a (just one) <p> tag, instead of several <br> ones. That is particulary annoying for me: sometimes I want to control a variable amount of space between lines. Now I can only set the space between paragraphs using the style for <p> in the css stylesheet, and that is always the same amount of space regardless the line breaks I introduce in the backend ( the number of times press enter between lines)...

Is that a bug? Is it a problem of my installation? any suggestion?

Thanks a million for your help
* Maybe I'm wrong * Maybe not *
Evoplure
 
Posts: 43
Joined: Fri Jul 08, 2005 00:59

Re: Plain Text Line Breaks in 1.3.9 r213

Postby Heiko H. on Fri Jun 27, 2008 06:13

Hi Evoplure,

please use the Replacement Tag [BR] for linebrakes


Good luck, Heiko...
"Lieber Gott, der Du bist im Himmel wie auf Erden...
...und bitte zeige mir den Weg, damit ich ihn nicht selber suchen muss."


Fischmob
User avatar
Heiko H.
 
Posts: 638
Joined: Thu Oct 27, 2005 09:41
Location: Dresden

Re: Plain Text Line Breaks in 1.3.9 r213

Postby Evoplure on Sat Jun 28, 2008 00:21

thanks a million heiko

basically it works, using [BR] replacement tags I can modify the amount of space between the end of a paragraph and the beginning of the next one...

but there are some disadvantages...

1. personal disadvantage: unfortunately my website has more than 100 pages, most of them using the Plain Text content part... and I never used the [BR] tag to introduce a blank space between paragraphs... I can't check now every page to find where I should have introduced the [BR] tag instead of pressing the 'enter' key two or more times. I am very surprised to find that nobody else seems to have the same problem (that's why I thought that something was wrong with my installation...)

2. it goes against the idea of a real 'plain text' content part: that means that when you use a plain text editor you don't need to introduce any tag if you want to separate lines or paragraphs... you just press the enter key two or more times... I can't understand why do we need to use a tag or change the style sheet now for such a basic thing in phpwcms :!:



nb. ... and changing the style sheet does change each place in which the <p> tag is used (not only the space between paragraphs :? )
* Maybe I'm wrong * Maybe not *
Evoplure
 
Posts: 43
Joined: Fri Jul 08, 2005 00:59

Re: Plain Text Line Breaks in 1.3.9 r213

Postby rescamilla on Mon Jun 30, 2008 23:26

Same problem here. This was a suprise for me.

I have thousands of articles on one of my sites (a government site). My habit was to use plain text for all normal text content. Now I'll have a site full of paragraphs that have no spacing between them.

In the past, the PLAIN TEXT content part obeyed line breaks. I can't go in and add [BR]'s to everything.

We need a fix please.

-Ray
rescamilla
 
Posts: 65
Joined: Sat Jul 24, 2004 23:53

Re: Plain Text Line Breaks in 1.3.9 r213

Postby Jensensen on Mon Jun 30, 2008 23:47

well --> Plain Text is -->
[x]
Last edited by Jensensen on Sat Sep 20, 2008 21:11, edited 1 time in total.
can energy || brillant! könnte - ist aber © by olli dittsche.
User avatar
Jensensen
 
Posts: 2633
Joined: Tue Oct 17, 2006 19:11
Location: Rhein-Ruhr-Stever-Verse

SOLVED: Plain Text Line Breaks in 1.3.9 r213

Postby rescamilla on Tue Jul 01, 2008 16:46

Evoplure,

Put this at the bottom of your style sheet:
Code: Select all
p {padding-bottom: 20px; }

(edit the value to your taste. ex: "1em")

-Ray
rescamilla
 
Posts: 65
Joined: Sat Jul 24, 2004 23:53

Re: Plain Text Line Breaks in 1.3.9 r213

Postby Jensensen on Tue Jul 01, 2008 17:26

Hi Ray,

good to here this. So, you could solve the problem?

another tip (to be more layout-specific)
[x]
Last edited by Jensensen on Sat Sep 20, 2008 20:19, edited 1 time in total.
can energy || brillant! könnte - ist aber © by olli dittsche.
User avatar
Jensensen
 
Posts: 2633
Joined: Tue Oct 17, 2006 19:11
Location: Rhein-Ruhr-Stever-Verse

Re: Plain Text Line Breaks in 1.3.9 r213

Postby rescamilla on Tue Jul 01, 2008 22:29

Jensensen,

Yes, this is solved.

In previous versions, Plain Text was rendered up as:
Code: Select all
<p>asdasd asdasd asdada asdasd asdad dfzs sdf.<br>
lksdlksdf lskdfoi liuhrw,m sd lksdfl lksdflk ,ksdnf.<br>
jsdfkjs skdfhu lhdlkjsf kshdflksf lkjshdflk wner.</p>


But the latest 1.3.9 renders plain text as:
Code: Select all
<p>asjd;laksdjklad asda asdad asdad asd  ssdf.</p>
<p>sdfsdf sdfksjdfl slkdflskf slkdfs sldkfs lekj.</p>
<p>lkckzhxc asjdfhas ,asdla askdnadasd lakjd.</p>


So... the padding element in the style sheet will fix the problem.

-Ray
rescamilla
 
Posts: 65
Joined: Sat Jul 24, 2004 23:53

Re: Plain Text Line Breaks in 1.3.9 r213

Postby Evoplure on Fri Jul 04, 2008 12:43

Thanks all for your comments that have been very useful. For me the problem is solved following your suggestions. :)

I don't know how could "main_column p {... }" be implemented, because it does not work from the main stylesheet :( , but the option of defining the style for <p> is good enough for my website.

Someone else could still have some problems:

in previous versions several line breaks together, like <br><br><br><br>

are now rendered by a single <p> tag, regardless of the number of line breaks.

that means that the space between paragraphs will be always the value in the style sheet, regardless the amount of lines that you put between paragraphs... In other words... You can't add more space if you don't use the [BR] tag several times.

But I suppose that's not a big problem for most phpwcms users...

=====

added 29.07.08: CSS solution seems not be very useful between 2 image tags {IMAGE...}, [BR] should be used instead

I think it would be nice for the next Phpwcms version if Plaint Text Content Part work like in previous versions, wouldn't be?
* Maybe I'm wrong * Maybe not *
Evoplure
 
Posts: 43
Joined: Fri Jul 08, 2005 00:59

Re: Plain Text Line Breaks in 1.3.9 r213

Postby Oliver Georgi on Sat Aug 09, 2008 10:19

This was changed to get more valid page rendering. <br><br> always result in too big spaces (in my eyes).

It still supports <br> but only for single line break - all plain text sections divided by double line break will be wrapped by <p> tag.

I always recommend to wrap the {CONTENT} in special <div id="content">{CONTENT}</div> - then it can be defined much easier by CSS like
Code: Select all
#content p {
  padding: 0 0 .5em 0;
}


Oliver
Oliver Georgi | phpwcms Developer
Hegerplatz 7, 06846 Dessau, Germany
phpwcms | webverbund.de | LinkedIn | XING | Hot stuff
User avatar
Oliver Georgi
Site Admin
 
Posts: 6337
Joined: Fri Oct 03, 2003 20:22
Location: Dessau

Re: Plain Text Line Breaks in 1.3.9 r213

Postby claus on Tue Aug 12, 2008 08:42

Please see p tag problem here also : viewtopic.php?f=1&t=17643&p=107644#p107644

all plain text sections divided by double line break will be wrapped by <p> tag

This would be ok, but all text is wrapped in p tags anyway...hmm I'm quite sure that I don't like this...
The following (and the previous) wouldn't have happened if there had been a GURM!
update process in progress 90% - Please stand by.. don't hit any key. Hold your breath ... until the day when pigs can fly ...
User avatar
claus
 
Posts: 2778
Joined: Mon Jan 10, 2005 16:29
Location: germany / outdoor


Return to phpwcms Installation Troubleshooting English

Who is online

Users browsing this forum: Alexa [Bot] and 1 guest