Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

3537 Posts in 675 Topics- by 443 Members - Latest Member: ludus529
Pages: [1]
Print
Author Topic: Include Source Code  (Read 571 times)
0 Members and 1 Guest are viewing this topic.
Kalimaha
Jr. Member
**
Posts: 3


View Profile
« on: June 27, 2011, 13:49:27 »

Dear all,

   I need to include Java code snippets in my Wiki, there's a tag in MediaWiki to do so, it should be <source="java">code...</source> but it doesn't work for me on Wikkii. Is there any way to activate it or a way to properly format Java code? I am using <pre>code...</pre> but it would be very useful to me to have the proper format shown.


Thanks a lot!
Logged
nidek
Jr. Member
**
Posts: 30


View Profile
« Reply #1 on: June 28, 2011, 02:38:44 »

I know that MediaWiki:Common.js works in my wiki but I've never tested javascript inline.

If you are talking about showing the code in a wiki page then you have the tags pre, code and nowiki that you can use.
Logged
Kalimaha
Jr. Member
**
Posts: 3


View Profile
« Reply #2 on: June 28, 2011, 12:06:22 »

I am using the <pre> tag, and the code is shown in my wiki, but I would like to show it with default colors and so on, please consider this example http://en.wikipedia.org/wiki/Java_%28programming_language%29#Examples as a reference. In this Wikipedia page the tag <source lang="java"> is used.
Logged
Wikkii
Administrator
*****
Gender: Male
Posts: 551



View Profile WWW
« Reply #3 on: June 28, 2011, 17:05:30 »

You basically need the same extension as a couple of members here have requested:

http://wikkii.com/forums/index.php?topic=561.0

This extension has now been installed. Hope this helps.
Logged
Kalimaha
Jr. Member
**
Posts: 3


View Profile
« Reply #4 on: June 28, 2011, 17:38:57 »

That's perfect, thank you very much!
Logged
Wikkii
Administrator
*****
Gender: Male
Posts: 551



View Profile WWW
« Reply #5 on: June 29, 2011, 03:06:29 »

No problem smile
Logged
Pages: [1]
Print
Wikkii Suport ForumGeneral CategoryGeneral DiscussionTopic: Include Source Code
Jump to: