Simple Machines Community Forum

SMF Development => Feature Requests => Topic started by: Arskrigitsioniets on December 02, 2023, 12:18:06 PM

Title: [3.0] Proper HTML markup with <p> tags
Post by: Arskrigitsioniets on December 02, 2023, 12:18:06 PM
The current SMF doesn't use <p> tags in HTML. Look at the example:

Text text text

Text text text

How it looks in HTML:
<div>
Text text text
<br>
<br>
Text text text
<br>
<br>
</div>

Modern CMS like WordPress (and even MediaWiki your formatting manual (https://wiki.simplemachines.org/smf/Help:Formatting) refers to) already use automatic proper HTML markup with <p> tags, so on WordPress the same text would look like this:
<p>Text text text</p>
<p>Text text text</p>

Why do I need this?
1. Search engine crawlers like proper HTML.
2. Using <p> tags adds additional customization possibilities for text. For example, I can easily set margin between paragraphs if the text is divided with <p> by just manipulating p element in CSS.
3. This is proper HTML markup, paragraphs should be in <p>, not in simple <div> and divided by <br>.
Title: Re: [3.0] Proper HTML markup with <p> tags
Post by: Kindred on December 02, 2023, 02:40:09 PM
I disagree.  Text content in divs is completely appropriate.

That being said,  3.0 is changing the output, although I don't know yet if it changes it the way you seem to want
Title: Re: [3.0] Proper HTML markup with <p> tags
Post by: Sesquipedalian on December 02, 2023, 03:21:51 PM
You may be interested in my Paragrapher (https://custom.simplemachines.org/index.php?mod=4074) mod, @Arskrigitsioniets.

Integrating the code in that mod directly into SMF itself is not currently possible. Because the mod uses some code that was initially derived from WordPress, I had to release it under the GPL. The GPL is incompatible with the BSD-3 license that SMF is released under. So before we could even consider integrating that mod into SMF itself, I would have to rip out all the code derived from WordPress and replace it with something else. That's not impossible (my skills and knowledge have greatly increased since I first created that mod), but it would take a fair bit of effort.

At any rate, installing the mod will give you what you want on your own forum.
Title: Re: [3.0] Proper HTML markup with <p> tags
Post by: Arskrigitsioniets on December 03, 2023, 06:49:25 AM
Quote from: Sesquipedalian on December 02, 2023, 03:21:51 PMYou may be interested in my Paragrapher (https://custom.simplemachines.org/index.php?mod=4074) mod, @Arskrigitsioniets.

Integrating the code in that mod directly into SMF itself is not currently possible. Because the mod uses some code that was initially derived from WordPress, I had to release it under the GPL. The GPL is incompatible with the BSD-3 license that SMF is released under. So before we could even consider integrating that mod into SMF itself, I would have to rip out all the code derived from WordPress and replace it with something else. That's not impossible (my skills and knowledge have greatly increased since I first created that mod), but it would take a fair bit of effort.

At any rate, installing the mod will give you what you want on your own forum.
Thanks for the mod!

I will appreciate it if you find some time to update that HTML markup for one of the future releases, it will make SMF more modern and cool
Title: Re: [3.0] Proper HTML markup with <p> tags
Post by: Kindred on December 03, 2023, 01:33:38 PM
Again...

Your comment is incorrect.  What you are asking for has nothing to do with modern. Nor is it required by any html standard.

(Cool is a subjective,  so if you think so,  then I guess...  but I certainly don't think so... :P)
Title: Re: [3.0] Proper HTML markup with <p> tags
Post by: Sesquipedalian on December 03, 2023, 06:22:22 PM
@Kindred, it would be much more semantically correct and better for accessibility concerns, etc. The suggestion makes sense. In line with my signature, I'm not ready at this time to commit to implementing the idea, but it's a good idea.
Title: Re: [3.0] Proper HTML markup with <p> tags
Post by: Antechinus on December 03, 2023, 11:20:45 PM
^^ Agree. It's not a huge priority (and spiders will crawl the content anyway) but it would be good to have at some point anyway. :)