Kunena 7.0.4 Released

The Kunena team has announce the arrival of Kunena 7.0.4 [K 7.0.4] in stable which is now available for download as a native Joomla extension for J! 5.4.x/6.0.x. This version addresses most of the issues that were discovered in K 6.2 / K 6.3 / K 6.4 and issues discovered during the last development stages of K 7.0

This is for users to help other users, to discuss topics that are related to forum administration in general or problems in running Joomla. This is not the place to ask for Joomla support. If you want assistance with Joomla please ask at forum.joomla.org

Question Using the Kunena BBCode parser

More
10 months 3 weeks ago #233580 by lemur
Hallo,
1) How do I check the availability of the Kunena Bbcode parser in Kunena 6.3.10 installed on Joomla 5.3.1 and display a message on the screen about the need to connect if it is not available (PHP code)?
2) Is this parser now in the Standard Kunena installation?
3) How do I manually check the availability of this parser in my Kunena installation? 

4) How to use this parser to transcode text (text string) from BBCode to HTML (calling this parser)?

Thanks  Сказать анализатор BBCODE 

- - - - - - - - -
Signature:
Many thanks to Rich and the other advisors.

Please Log in or Create an account to join the conversation.

More
10 months 3 weeks ago #233584 by Pinkeltje
What do you want to achieve or what is your problem? Sorry, but I don't understand your question.

Please Log in or Create an account to join the conversation.

More
10 months 3 weeks ago #233591 by lemur
I need to recode text from BBCode to HTML in the program. As far as I understand, BBCode parser is now in the Standard Kunena installation.

I used
Code:
[code]private function convertBBCodeToHtml($text) { try { if (!class_exists('Kunena\Forum\Libraries\Bbcode\KunenaBbcode')) { $this->app->enqueueMessage( Text::_('COM_KUNENATOPIC2ARTICLE_BBCODE_PARSER_NOT_AVAILABLE'), 'warning' ); return $text; } $bbcode = \Kunena\Forum\Libraries\Bbcode\KunenaBbcode::getInstance(); return $bbcode->parse($text); } catch (\Exception $e) { $this->app->enqueueMessage( Text::_('COM_KUNENATOPIC2ARTICLE_BBCODE_PARSE_ERROR') . ': ' . $e->getMessage(), 'warning' ); return $text; } }
[/code]

But maybe it is necessary to use
Code:
[code]private function convertBBCodeToHtml($text) { $bbcode = \KunenaHelper::getBbcodeParser(); if ($bbcode === null) { $this->app->enqueueMessage( Text::_('COM_KUNENATOPIC2ARTICLE_BBCODE_PARSER_NOT_AVAILABLE'), 'warning' ); return $text; } try { return $bbcode->parse($text); } catch (\Exception $e) { $this->app->enqueueMessage( Text::_('COM_KUNENATOPIC2ARTICLE_BBCODE_PARSE_ERROR') . ': ' . $e->getMessage(), 'warning' ); return $text; } }
[/code]

Or some other more correct way.

Thanks

- - - - - - - - -
Signature:
Many thanks to Rich and the other advisors.

Please Log in or Create an account to join the conversation.

More
10 months 2 weeks ago #233607 by lemur
OK, the first code from the previous post works.

But some markup elements are not recoded.

1) links simply disappear. Instead of any - both external and internal links, only <p> </p> appears
<p> </p>.

2) Emoticons generate error messages. For example, smileys laugh, dark glasses, grin (3 pcs. from the 1st column). (each) gives an error

Rendering Error in layout BBCode/Image: Layout 'BBCode/Image:default' Not Found in ...\libraries\kunena\src\Layout\KunenaLayout.php on line 225
Layout was rendered in ...\libraries\kunena\src\BBCode\KunenaBBCode.php on line 2729.


3) Instead of a link to the original image, a link to its thumbnail is inserted into the recoded text.

Maybe there are some options in the BBCode parser that allow you to avoid these shortcomings?

Thanks

- - - - - - - - -
Signature:
Many thanks to Rich and the other advisors.

Please Log in or Create an account to join the conversation.

Time to create page: 0.258 seconds