Code highlight in this forum

Discuss and announce Total Commander plugins, addons and other useful tools here, both their usage and their development.

Moderators: Hacker, petermad, Stefan2, white

Post Reply
VSB
Member
Member
Posts: 136
Joined: 2006-12-12, 12:02 UTC
Location: Russia

Code highlight in this forum

Post by *VSB »

Is it possible to add code highlighter in this forum?
User avatar
Balderstrom
Power Member
Power Member
Posts: 2148
Joined: 2005-10-11, 10:10 UTC

Post by *Balderstrom »

You mean the [ code ] .... [ /code ] tags (without spaces)? Yes.
User avatar
dott
Senior Member
Senior Member
Posts: 285
Joined: 2007-03-04, 00:58 UTC
Location: La Plata, Argentina

Post by *dott »

I believe he mean something like GeSHi in Pastebin or any other hightlight php class Image: http://img180.imageshack.us/img180/3613/decclip0.png and no it's not possible.

You can do that by hand ;-) or use bbcode for firefox but only Js/xml/css code is cover.
VSB
Member
Member
Posts: 136
Joined: 2006-12-12, 12:02 UTC
Location: Russia

Post by *VSB »

2Balderstrom
I mean something like
[ code=_language_ ] .... [ /code ]
VSB
Member
Member
Posts: 136
Joined: 2006-12-12, 12:02 UTC
Location: Russia

Post by *VSB »

2dott
well, I can use different bbcode highlighters, but it will be difficult change some code in quotes.
User avatar
dott
Senior Member
Senior Member
Posts: 285
Joined: 2007-03-04, 00:58 UTC
Location: La Plata, Argentina

Post by *dott »

VSB wrote:2dott
well, I can use different bbcode highlighters, but it will be difficult change some code in quotes.
Yes, I will be a pain in the ass. Anyway, I don't see any future for code highlighter here, currently we can't even post images.


This is what you get using firefox bbcode addon, lousy :lol:
[face=consolas]<html>
<head>
<title> Actual date</title>
<
/head>
<body>
<script>
var mydate=new Date();
var year=mydate.getYear();
if (year < 1000)
year+=1900;
var day=mydate.getDay();
var month=mydate.getMonth()+1;
if (month<10)
month="0"+month;
var daym=mydate.getDate();
if (daym<10)
daym="0"+daym;
document.write("<small><font color='000000' face='Arial'><b>"+daym+"/"+month+"/"+year+"</b></font></small>")
</script>
<
/body>
</html> [/face]
Probablemente no
User avatar
MVV
Power Member
Power Member
Posts: 8711
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

Problem of quotes is that they doesn't preserve formatting while code block keeps repeated spaces and tabs.
VSB
Member
Member
Posts: 136
Joined: 2006-12-12, 12:02 UTC
Location: Russia

Post by *VSB »

2MVV
I mean quotes of somebody messages with codeblocks
User avatar
MVV
Power Member
Power Member
Posts: 8711
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

But I mean that quote block with highlighting is bad alternative for code block with preserving formatting. :)
User avatar
dott
Senior Member
Senior Member
Posts: 285
Joined: 2007-03-04, 00:58 UTC
Location: La Plata, Argentina

Post by *dott »

Ah, but the culprit off all was bbcode addon, it kills all tabs characters even if quote tag isn´t used. Anyway all this is useless.

2VSB
You could ask for highlight code block in suggestions and...

phpBB is under CC and gheshi under gpl2, no sure but seems compatible.
Post Reply