Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Wiki syntax highlighter
Hrvoje_86
#1 Posted : Tuesday, January 31, 2012 6:16:51 PM(UTC)
Rank: Advanced Member
Groups: Registered

Joined: 1/28/2011(UTC)
Posts: 157
Location: Croatia
Can you add this to the wiki ?
http://www.mediawiki.org/wiki/Extension:SyntaxHighlight_GeSHi

I know we can use <csharp>code</csharp> but its not very readable.
jifeng
#2 Posted : Wednesday, February 01, 2012 12:19:11 AM(UTC)
Rank: Administration
Groups: Administrators, Registered

Joined: 9/3/2009(UTC)
Posts: 1,555
Location: Xiamen China
The wiki.kooboo.com is using this extension.
Regards,

Jifeng Huang

Kooboo Team

Microsoft ASP.NET MVP
Hrvoje_86
#3 Posted : Wednesday, February 01, 2012 10:03:41 PM(UTC)
Rank: Advanced Member
Groups: Registered

Joined: 1/28/2011(UTC)
Posts: 157
Location: Croatia
jifeng;5614 wrote:
The wiki.kooboo.com is using this extension.

Strange.
I can't get it to work.

I tried this but it doesn't highlight anything.
Code:
<syntaxhighlight lang="csharp">
var textFolder = new TextFolder(Repository.Current,"news");
</syntaxhighlight>


See here
http://wiki.kooboo.com/wiki/Query_examples
jifeng
#5 Posted : Thursday, February 02, 2012 1:38:58 AM(UTC)
Rank: Administration
Groups: Administrators, Registered

Joined: 9/3/2009(UTC)
Posts: 1,555
Location: Xiamen China
ah, sorry, the wiki.kooboo.com is using http://www.mediawiki.org...xtension:GeSHiHighlight

It seems the one you provide is more advance, I will change also install the extension.
Regards,

Jifeng Huang

Kooboo Team

Microsoft ASP.NET MVP
jifeng
#4 Posted : Thursday, February 02, 2012 1:52:06 AM(UTC)
Rank: Administration
Groups: Administrators, Registered

Joined: 9/3/2009(UTC)
Posts: 1,555
Location: Xiamen China
Hrvoje_86;5627 wrote:
jifeng;5614 wrote:
The wiki.kooboo.com is using this extension.

Strange.
I can't get it to work.

I tried this but it doesn't highlight anything.
Code:
<syntaxhighlight lang="csharp">
var textFolder = new TextFolder(Repository.Current,"news");
</syntaxhighlight>


See here
http://wiki.kooboo.com/wiki/Query_examples


Now, it works.

The two extension use the same highlight library, GeShi. Why don't you use the code like:

Code:
<csharp>
var textFolder = new TextFolder(Repository.Current,"news");
</csharp>


It is more simple, isn't it?
Regards,

Jifeng Huang

Kooboo Team

Microsoft ASP.NET MVP
Hrvoje_86
#6 Posted : Thursday, February 02, 2012 10:15:15 AM(UTC)
Rank: Advanced Member
Groups: Registered

Joined: 1/28/2011(UTC)
Posts: 157
Location: Croatia
Quote:
The two extension use the same highlight library, GeShi. Why don't you use the code like:

Oh i didn't know they are the same.
I used <csharp> tag but its not very readable and on geshi demo page it looks ok.

Now that i have a better look at it i noticed that on wiki.kooboo.com
Under font-family it only has monospace which looks bad.

Uploaded with ImageShack.us

And on the geshi demo page http://www.mediawiki.org/wiki/Extension:GeSHiHighlight
it is like this:
Code:

div.mw-geshi div, pre{
font-family:monospace,"Courier New" !important;
}

It looks much better.

Uploaded with ImageShack.us

Anyway if you can configure a more readable font that would be great.




jifeng
#7 Posted : Friday, February 03, 2012 8:39:25 AM(UTC)
Rank: Administration
Groups: Administrators, Registered

Joined: 9/3/2009(UTC)
Posts: 1,555
Location: Xiamen China
The result is the same as the demo page. I have add the same code to this page:http://wiki.kooboo.com/?wiki=Query_examples

Code:


<php>
require_once("geshi.php"); // i asume geshi.php is in the same directory as GeSHiHighlight.php (that is 'extensions' dir)

define("GESHI_PATH","extensions/geshi");// definition where are stored geshi language parsing files
</php>
Regards,

Jifeng Huang

Kooboo Team

Microsoft ASP.NET MVP
Hrvoje_86
#8 Posted : Friday, February 03, 2012 10:42:38 AM(UTC)
Rank: Advanced Member
Groups: Registered

Joined: 1/28/2011(UTC)
Posts: 157
Location: Croatia
The fonts in the css are not the same.

http://board.s9y.org/viewtopic.php?f=4&t=18171
jifeng
#9 Posted : Sunday, February 05, 2012 12:31:22 PM(UTC)
Rank: Administration
Groups: Administrators, Registered

Joined: 9/3/2009(UTC)
Posts: 1,555
Location: Xiamen China
Will check out it.
Regards,

Jifeng Huang

Kooboo Team

Microsoft ASP.NET MVP
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Powered by YAF 1.9.5.5 | YAF © 2003-2011, Yet Another Forum.NET
This page was generated in 0.286 seconds.