Page 1 of 1

[solved] Guestbook ignores line breaks

Posted: 12 Oct 2009, 23:57
by steff
I have the problem, that if a user type in a new entry, within some line breaks, all these line breaks will be deleted if the entry was saved in the frontend view.
If I edit the entry in backend, the system save the linebreaks and also view them in frontend.

Is there a parameter to allow line breaks in frontend or is that a misstake of mine or the system?

For example see my site: http://www.tsvstetten.de/gaestebuch
The first entry was edited by me in the backend, so the frontend view is like it was written by the author, the following entries are shown and/or puplished wrong.

Thanks for your help.
Steff

Re: Guestbook ignores line breaks

Posted: 16 Oct 2009, 22:55
by Jan
Hi, if you click on ENTER the editor will produce <p> tag, if you will click SHIFT+ENTER the editor will produce <br/> tag which is not allowed (because of design issues - it can make large message) Mostly users doesn't use SHIF+ENTER but only ENTER which normally work. But you can add br tag to this code:

FROM:
$configP->set('HTML', 'Allowed', 'strong,em,p[style],span[style],img[src|width|height|alt|title],li,ul,ol,a[href],u,strike');
TO:
$configP->set('HTML', 'Allowed', 'strong,em,p[style],span[style],img[src|width|height|alt|title],li,ul,ol,a[href],u,strike,br');
on line 73
in components\com_phocaguestbook\controllers\phocaguestbook.php

so the br will be accepted.

Jan

Re: Guestbook ignores line breaks

Posted: 16 Oct 2009, 23:50
by steff
Thanks for your answer Jan.

I 've edited the file, but it doesn't work. Both, <br> and <p> were ignored.

May it be helpful to reinstall the whole component? What about my desing and entries, can I save them?

Thanks for your help
Steff

Re: Guestbook ignores line breaks

Posted: 17 Oct 2009, 19:11
by Jan
maybe this will help, the p tag should be not ignored.

Jan

Re: Guestbook ignores line breaks

Posted: 21 Oct 2009, 21:53
by steff
A new install helped for the Problem.
All Entries are back with loading of a datebase backup, I ve made before deinstalled the component.

Now everything is working fine.

I found an aditional entry for the German language File:
POST MESSAGE=Eintrag erstellen

This will be needed for the link, if you hide the Display form.

Thanks!

Steff

Re: [solved] Guestbook ignores line breaks

Posted: 23 Oct 2009, 21:56
by Jan
Ok