3
Many, many thx Christian!
That makes a world of difference. Improves semantics and better for SEO too.
Roughly translated to English, Herve says:
For XOOPS 2.0 and for XOOPS 2.2, open the file /xoops/class/module.textsanitizer.php
Find the line below :
$replacements[] = '\1';
You'll find this line in the function 'xoopsCodeDecode'
Just after this line, insert the code below :
$patterns[] = "/[h([1-6])](.*)[/h([1-6])]/sU";
$replacements[] = '\2';
Your XOOPS now has 6 new BBCodes that can be used :
[h1 ]text[/h1 ]
[h2 ]text[/h2 ]
[h3 ]text[/h3 ]
[h4 ]text[/h4 ]
[h5 ]text[/h5 ]
[h6 ]text[/h6 ]
You need to omit the spaces shown in the tags in the real editor. I found you can put the new pattern + replacement anywhere in the function.
A thread is for life. Not just for Christmas.