Page 1 of 1

Problem with Tables.

Posted: Wed Mar 08, 2006 3:25 pm
by Hanjo Iwanowitsch
Ladies & Gentlemen,

now the blog http://www.lbsmalente.de works, but there is still a little problem:

when I use tables in blogentries there is a lot of space in front of the table - have a look at this entry http://www.lbsmalente.de/index.php?/arc ... -2006.html for example, please.

For I tried some different templates (always the same effect) and I do not find any hint in the CSS-files I would lieke to ask if this ist a mistake in S9y's way to treat tables in general or how I could make the gap vanish.

TIA.

Regards,
Hanjo.

Re: Problem with Tables.

Posted: Wed Mar 08, 2006 3:52 pm
by garvinhicking
This happens because of the "nl2br" markup plugin.

For every newline/return in your entries, it adds a "<br />", so if you type HTML code in it with linebreaks, those also get converted.

So you have some options:

1. Disable the nl2br markup plugin completely, and ensure that you always type your br's or p Tags manually

2. Install the entryproperties plugin and then disable the markup plugin inside the 'advanced options' section for each entry wher eyou use TABLE HTML markup

3. When you use HTML markup, remove all newlines in the HTML code, so that the ywill not be converted to BR.

Regards,
Garvin

Re: Problem with Tables.

Posted: Wed Mar 08, 2006 7:38 pm
by Hanjo Iwanowitsch
garvinhicking wrote:This happens because of the "nl2br" markup plugin.

For every newline/return in your entries, it adds a "<br />", so if you type HTML code in it with linebreaks, those also get converted.
Then there would be lots of "<br />"s in the sourcecode of the entries but there isn't more than one.

Oh, I see: the "<br />"s aren't between lines of text and the table but at the end of each table cell!:

<tr align="left" valign="top"><br />
<td>Reiseverkehr</td><br />
<td><i>noch nicht bekannt</i></td><br />
</tr><br />

For this is never correct, this could be fixed somehow by clever programmers (something like "nl2br, please never touch tables").

I tried the entryproperty plugin, too - it's the same with the option "Automatischen Zeilenumbruch deaktivieren" checked. The preview was still correct, but the entry post was broken again.

So I had to uninstall the nl2br-Plugin as you said.
garvinhicking wrote:3. When you use HTML markup, remove all newlines in the HTML code, so that the ywill not be converted to BR.
I did this anyway. But there is no way to remove the cells and lines of tables.

Thanks for your help, Garvin.

Regards,
Hanjo

Re: Problem with Tables.

Posted: Thu Mar 09, 2006 10:19 am
by garvinhicking
Hi!
For this is never correct, this could be fixed somehow by clever programmers (something like "nl2br, please never touch tables").
This isn't as easy as you would think! Coding this would considerable decrease performance because then an entry would have to be parsed for EVERY HTML tag. That would mean a performance decrease of maybe 500-600%...

I think this is not a workable solution. :)
I tried the entryproperty plugin, too - it's the same with the option "Automatischen Zeilenumbruch deaktivieren" checked. The preview was still correct, but the entry post was broken again.
On Serendipity versions prior to 1.0-beta1, this option would only work if the caching of the entryproperties plugin is disabled. Only since 1.0-beta1 the disabling with caching should work properly, I'm sorry.
I did this anyway. But there is no way to remove the cells and lines of tables.
If you write your code like this:

Code: Select all

<table><tr><td>...</td><td>...</td></tr></table>
It would work - it would all need to be in one line. Linebreaks could only occur within <td>..</td>.

Best regards,
Garvin

Posted: Thu Mar 09, 2006 12:54 pm
by Hanjo Iwanowitsch
I see. Thanks for your explanations, Garvin.

Concerning the performance decrease you know now why I'm not a programmer. :-)

Regards,
Hanjo.

(I'm happy S9y works now fine on our new serverspace. The minor problems are mine (in understanding and learning), not S9y's.)

Posted: Thu Mar 09, 2006 1:28 pm
by garvinhicking
Hi Hanjo!

I'm glad you can understand my concern. I'm also happy to hear that you got s9y up and running so far and I hope you'll have fun with serendipity.

If you have any issues or questions, you know where to find us! :-))

Best regards,
Garvin