×
Kunena 5.2 Beta 1 Released (24 Sep 2020)

The Kunena team is thrilled to announce the first public beta release of Kunena 5.2, a native Joomla extension for Joomla 3.9. This is a development release and should be only be used for testing; this version is not recommended for live websites at this stage.

The purpose of this release is to encourage testing by downloading, installing and identifying any problems or shortcomings that people may discover. K 5.2.0 B1 is stable and we are aware that people will discover defects. We encourage you to use the forum to report defects, as soon as they are discovered, so that the development team can work through the problems before the release of K 5.1 as a stable product. Reporting defects does not mean that the problems can or will be fixed. The Kunena team is looking forward to hearing your feedback on how well we have achieved our design goals.

× Topics that are moved into this category are generally considered to be closed. Users may want to add additional information but these topics should not be resurrected in order to discuss new problems or unrelated matters.

Question Integration of new BBCode - mimetex

More
11 years 2 months ago #1 by Newbie_Kunena
Hello,

I installed mimetex and the bot_mimetex for joomla. In the normal editor of joomla the bot works well.

Now I want to implement the following:

1.: Next to the button "Code display" I need a button "tex-Display" which opens the environment {tex}...{/tex}

2.: Everything with in the tags {tex}...{/tex} should be send du the mimetex.cgi. I thought maybe it is possible to use the mimetex.php of the bot mimetex for joomla.

Sorry for my bad English. I am not a native speaker. I hope you unterstand my problem.

regards
Marco

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

More
11 years 2 months ago #2 by Newbie_Kunena
Hello,

ok the first problem I solved by editing the smile.class.php at line 304

by the Following:
<img class = "fb-bbcode" accesskey = "f" name = "tex" alt="TEX-Formeleingabe" onclick = "bbfontstyle('[tex]', '[/tex]');" onmouseover = "javascript:kunenaShowHelp('Öffnet den Bereich TEX für Formeln')" />

Now I have only one Problem:

I want to use everything which inside the environment [tex] In the following way:

[tex]INSIDEBLOCK[/tex]
use the insideblock in the following way:
add the INSIDEBLOCK to the following url:
/cgi-bin/mimetex.cgi?INSIDEBLOCK

and display the result by the following way:
[img]https://mydomain.de/cgi-bin/mimetex.cgi?INSIDEBLOCK[/img]

regards
Marco

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

More
11 years 2 months ago #3 by Newbie_Kunena
Hello,

i am again B)

I have written a small php-script, which demonstrate my problem.
<?php error_reporting(E_ALL | E_NOTICE);
 
function parseBBCode2TEX( $TEX )
 
    $TEX = preg_replace('/\[tex\](.*?)\[\/tex\]/', '<img src="https://www.openmaths.org/cgi-bin/mathtex.cgi?$1"', $TEX);
 
    return $TEX;
 
}
 
$text = "Das ist ein Test, ob der Pythagoras stimmt: [tex]c^2=a^2+b^2[/tex].";
 
$formatiert = parseBBCode2TEX( $text );
 
echo $formatiert;  
?>

I have to modify the code in according to the bot_mimetex.

regards
Marco

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

More
11 years 2 months ago #4 by Newbie_Kunena
Ok. now it works. I do not know whether it is the best way:

I edited the file kunena.parser.php at line 383 and added the following lines:
case 'tex':
 
                $tag_new = '<img src="https://www.openmaths.org/cgi-bin/mathtex.cgi?'.$between.'">';
 
                return TAGPARSER_RET_REPLACED;
 
                break;

I hope some can use or improve it.

regards
Marco

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

  • Not Allowed: to create new topic.
  • Not Allowed: to reply.
  • Not Allowed: to edit your message.
Time to create page: 0.107 seconds