ElkArte Community

Project Support => Support => Topic started by: Ruth on March 07, 2018, 03:01:20 pm

Title: HTML in board description not working in 1.1?
Post by: Ruth on March 07, 2018, 03:01:20 pm
Hi!

I don't want to use images instead of the board description like this example here, but we have  always little images added to the board descriptions in the admin panel. Most of them are smileys. We have a lot of them and they are all different. Some of them have to be resized a little in the board descriptions.

With the 1.1.1 it seems no longer possible to insert them with HTML?  :o
If I edit a board the image will disappear and the description shows me the HTML-Code for this image.

I have to use BBC now (or I can use smiley codes for them, both is working.)
But it would be a lot of work to change them all by hand from HTML to BBC .
(I don't know, how many boards we have, but to many to do this)

Is there a possibility to continue using HTML? (Please, say "yes", Emanuele) O:-)
Title: Re: HTML in board description not working in 1.1?
Post by: emanuele on March 07, 2018, 04:58:34 pm
I split the message since it had nothing to do with the other topic. :)

If it is just simple html for images, enabling "Enable basic HTML in posts" should do.
Title: Re: HTML in board description not working in 1.1?
Post by: Ruth on March 07, 2018, 05:05:42 pm
I have tried this, Emanuele...but it was not working.

The second board here should have a flower too, but shows me the HTML-Code now
Title: Re: HTML in board description not working in 1.1?
Post by: emanuele on March 09, 2018, 05:30:24 pm
Back to this one moment to properly understand.
The second board in your image is one that you modified?
While the others are boards that you have not yet edited since the upgrade?
Title: Re: HTML in board description not working in 1.1?
Post by: Ruth on March 10, 2018, 01:27:35 am
Yes, Emanuele.

All four boards had the same image before, inserted with HTML
I modified the first and the second board after the upgrade.
I did not touch the Boards 3 and 4, so the image is still displayed there.
Title: Re: HTML in board description not working in 1.1?
Post by: emanuele on March 10, 2018, 02:41:07 am
Sorry, but yesterday I couldn't do much.
If now you have enabled the html, try to modify again the 2nd board (just to be sure, add anything to the text, a dot would do) and see what happens.
Title: Re: HTML in board description not working in 1.1?
Post by: Ruth on March 10, 2018, 02:51:05 am
I tried it after enabling HTML yesterday a few times and now again, but there is still the HTML-code to see.

BBC is working splendid.




New Screenshot:

(Link-5641)

1. Board: Smiley-Code
2. Board: BBC-Code
3. Board: HTML-Code, board modified a few times
4. Board: HTML-Code, board not modified after the upgrade
Title: Re: HTML in board description not working in 1.1?
Post by: Ruth on March 10, 2018, 05:16:34 am
Maybe it is not working in the board description, because HTML is not working in the posts in my testforum?

This image, inserted  with img src, should be displayed in a post now, but there is also just the code to see.
Title: Re: HTML in board description not working in 1.1?
Post by: emanuele on March 10, 2018, 09:06:39 am
Ahh it's all the attributes like width and height (apart that width from the image seems badly formatted because is attached to the " of the src, but that's another point).

"Basic" means really basic: src and alt. Stop. Nothing else.

Try the attached script (put where Settings.php is and use the browser to reach it at yoururl.tld/forum/cleanboard.php).
It removes all the width and height parameters. Should do the trick.
Title: Re: HTML in board description not working in 1.1?
Post by: Ruth on March 10, 2018, 01:23:42 pm
Thank you very much for the script, Emanuele.

I used it, the browser told me "done".

But in forum it is still the same with the html-code.... it seems not to work. :(
Title: Re: HTML in board description not working in 1.1?
Post by: emanuele on March 10, 2018, 04:06:59 pm
In your forum there are some more variations I didn't expect (including some not exactly perfectly formatted HTML :P).

The one attached here seems to be more reliable and be able to cope with the descriptions of your boards.
In the first screen you'll see the current version of the board description and the "fixed one" (in BBC), then a button at the end of the table to start the cleaning.

I tested some variations and it seems to work... give it a try.
Title: Re: HTML in board description not working in 1.1?
Post by: Ruth on March 10, 2018, 04:24:52 pm
Quote from: emanuele – In your forum there are some more variations I didn't expect (including some not exactly perfectly formatted HTML :P).
Oh, don't laugh at me, Emanuele.  ;)  I feel stupid enough without this...and I always try to do my very best.

So this  is not correct? O:-)  How should it be?

Code: [Select]
<img src="http://myforum.de/ea_test/smileys/default/bs_gaenseblume.gif" width="22" height="30" alt="Blume">


Quote from: emanuele – I tested some variations and it seems to work... give it a try.

Thank you very much...I will try it.

Title: Re: HTML in board description not working in 1.1?
Post by: Ruth on March 10, 2018, 04:46:32 pm
Yes! That one worked! :) Now the html-code for this board changed to the BBC-Code

Thank you very much, Emanuele!



Edit: I modified another board in my testforum and the same was happening with the html-code
and I used the cleanig file again for this board. It was working too.

Anyway...

At the moment we have just a few boards in our forum, where the posts are counted.
I was thinking about to change this in future, which means, that I have to edit every single board in forum for this. ::) It will do a lot of extra work to change also all those html-codes into bbc-codes, even with your script.

It is necessary to modify the boards, if there are any changings about the permissions, etc.
But I think, I will not change them all for the counting of posts.
Title: Re: HTML in board description not working in 1.1?
Post by: emanuele on March 11, 2018, 01:36:34 am
In teory it should work for non-edited boards as well...
I guess I missed some other variations...
Title: Re: HTML in board description not working in 1.1?
Post by: Ruth on March 11, 2018, 03:52:03 pm
In my testforum is only one board left, which I did not edit until now.

So I think, that testing of a modified cleaning script there is not really possible,
even not if I would create some more boards on the testforum with inserted html-codes,
because first they would just show the code, not the image.

Maybe it would be better to wait, until the live forum is upgraded?