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
[solved] Guestbook ignores line breaks
-
- Phoca Newbie
- Posts: 9
- Joined: 12 Oct 2009, 19:54
[solved] Guestbook ignores line breaks
Last edited by steff on 21 Oct 2009, 21:54, edited 1 time in total.
- Jan
- Phoca Hero
- Posts: 48714
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Guestbook ignores line breaks
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
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
If you find Phoca extensions useful, please support the project
-
- Phoca Newbie
- Posts: 9
- Joined: 12 Oct 2009, 19:54
Re: Guestbook ignores line breaks
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
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
- Jan
- Phoca Hero
- Posts: 48714
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Guestbook ignores line breaks
maybe this will help, the p tag should be not ignored.
Jan
Jan
If you find Phoca extensions useful, please support the project
-
- Phoca Newbie
- Posts: 9
- Joined: 12 Oct 2009, 19:54
Re: Guestbook ignores line breaks
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
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
- Jan
- Phoca Hero
- Posts: 48714
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: [solved] Guestbook ignores line breaks
Ok
If you find Phoca extensions useful, please support the project