Kunena 6.3.0 released

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

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 Inserting Code (Alternative Language)

More
12 years 2 months ago #1 by jnewell
Hey all,

I've searched the forums but have not found a similar topic. I recently got Kunena 1.7.2 installed on my site and LOVE IT. Thank you Kunena team! My question is, my community members typically use C++, C# & VB(.NET) but they don't have those options when inserting code snippets in a post. Can anyone point me in a direction of enabling those languages? I can't find an existing solution but am willing to create one with a little guidance.

Thanks so much!

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

More
12 years 2 months ago - 12 years 2 months ago #2 by sozzled
G'day, Jason, welcome to Kunena and thank you for your question.

As you would be aware, if people allow the unrestricted use of programming code in the forum this opens up the question of securing your website from untrustworthy sources, sources that may not share the desire that you and your community should have to have a forum that works smoothly and reliably. It is possible with the use of the "code" BBcode tag to display source code (that could be written in virtually any language). It is not, however, possible to exercute that code in Kunena.

That is to say, while it would be possible for me to display the following VBscript code
Code:
document.write ("Hello World");
it is not possible for me to insert the code and have it execute.

I hope this helps you to understand how Kunena works and what are some of the limitations in how you and your community may be able to use Kunena.
Last edit: 12 years 2 months ago by sozzled.

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

More
12 years 2 months ago - 12 years 2 months ago #3 by jnewell
Thank you for the reply sozzled. I was aware of using the default "code" and I now realize that I was not clear in my goal and for that, I apologize. What I'm looking for really is a way to have the "code" formatted & colorized as you would expect for those languages. Reviewing the rendered html from using the "code" tag, I see:
Code:
<pre class="php" style="font-family:monospace;">

which tells me that it's defaulting to php style formatting which is not desired for the languages I listed. Not at all complaining, just looking for a solution.

Thanks again!
Last edit: 12 years 2 months ago by jnewell. Reason: I initially used brackets on the code tag in text.

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

More
12 years 2 months ago #4 by sozzled
I'm not 100% sure how Kunena renders code written for the various options you see in the CODE tool and, I'm sorry to say, that's about the limit of my understanding of the issue. I will ask if one of the Kunena development team can reply to your question directly.

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

More
12 years 2 months ago #5 by jnewell
Thanks again sozzled.

I think that I've figured it out on my own. The solution that I figured out is to download GeSHi and look in the extracted geshi\geshi folder for the desired language.php file. I uploaded one to my server as a test in the plugins/content/geshi/geshi/geshi folder. Refreshed my Kunena editor and the new language automagically showed up and worked as expected.

Hopefully one of the Kunena devs can confirm or deny that this is the correct solution.

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

More
12 years 2 months ago #6 by sozzled
I suspected GeSHi was the place to look, but I didn't want to write that as a definite answer. If it's worked for you, then you have your answer and, again, thank you for your interest in Kunena.

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

More
12 years 2 months ago #7 by Jiminimonka
Would Kunena pick up the differences between say Java and CSS automatically? If it had all the different language types of GeSHI and did that, it could attract more users, those that are interested in coding etc.

Please read the FAQ.
Only one question per topic.
Search before you ask a question.

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

More
12 years 2 months ago - 12 years 2 months ago #8 by jnewell
You have to pick the language from the dropdown when inserting the code snippet. I don't think it will automatically detect the language.

What I'm finding is that the rendered code does not look exactly like what you get when you use their GeSHi Demo page. I'm no Kunena or php expert but I have dug into the Kunena php and it looks like to me it will require some core Kunena php changes to implement some of the additional functionality listed in the GeSHi Documentation .

Would love to hear from a Kunena dev on this topic.

*Just noticed this thread got moved into the archive. I don't think we were done with the discussion.
Last edit: 12 years 2 months ago by jnewell. Reason: Commented on archive status

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

More
12 years 2 months ago #9 by sozzled
We're mostly "done" on the topic (in the sense that you asked how to implement the code highlighting in general terms) but, just because the topic has been moved to the archive, this doesn't mean that we cannot continue to discuss it further. I understand that Jiminimonka may be willing to offer his help to write some documentation that will help you and others in this case. :)

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

Time to create page: 0.667 seconds