Shoutbox

Colouring [code][/code] - Printable Version

-Shoutbox (https://shoutbox.menthix.net)
+-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58)
+--- Forum: General (/forumdisplay.php?fid=11)
+---- Forum: Forum & Website (/forumdisplay.php?fid=13)
+----- Thread: Colouring [code][/code] (/showthread.php?tid=62935)

Colouring [code][/code] by matty on 07-09-2006 at 09:54 PM

I personally would really like to see this. It is getting quite old seeing the forums filled with code that isn't coloured(Canadian way of spelling it) unless the poster does it themselves.

There is an opensource php script colouring called Geshi. All we would need to do is have like [code=javascript] or [code=xml] and it would code based on that. Obviously the colours would need to be changed but Geshi is really powerful seeing how I know how lazy DZ is I found this.


RE: Colouring [code][/code] by foaly on 07-09-2006 at 09:56 PM

good idea...


RE: Colouring [code][/code] by alexp2_ad on 07-09-2006 at 09:57 PM

Yup, I use a slightly modded Geshi for mpwiki.net and it works great, if you could implement code tags with it, that'd be awesome. (Y)


RE: Colouring [code][/code] by ShawnZ on 07-09-2006 at 10:03 PM

quote:
Originally posted by Matty
(Canadian way of spelling it)

its not the canadian way of spelling it :dodgy:

quote:
Originally posted by Matty
I personally would really like to see this.

Paril's highlighting script does this (or will)
RE: Colouring [code][/code] by matty on 07-09-2006 at 10:06 PM

quote:
Originally posted by ShawnZ
quote:
Originally posted by Matty
(Canadian way of spelling it)

its not the canadian way of spelling it :dodgy:
Well colour isn't the american way of spelling it. Americans spell it color. Canadians spell it colour. If you want to be technical its the British way of spelling it I think.

quote:
Originally posted by ShawnZ
quote:
Originally posted by Matty
I personally would really like to see this.

Paril's highlighting script does this (or will)
I haven't been able to find any info on this one. Is it still in development?
RE: Colouring [code][/code] by ShawnZ on 07-09-2006 at 10:08 PM

indeed (at both quotes)


RE: Colouring [code][/code] by WDZ on 07-09-2006 at 10:16 PM

I already know about GeSHi... it's been suggested before. :p

I'm not going to add any more big features like that to RC2, but it would be a great thing to have here, so I'll think about integrating it with MyBB 1.2.


RE: Colouring [code][/code] by Lou on 07-10-2006 at 02:09 AM

quote:
Originally posted by ShawnZ
its not the canadian way of spelling it
It's*

Obviously it would be quite useless to integrate it now, when 1.2 is not so far around the corner now.

How many types of codes does Geshi have? (like what languages)

RE: Colouring [code][/code] by matty on 07-10-2006 at 03:19 AM

quote:
Originally posted by .Lou
How many types of codes does Geshi have? (like what languages)
ActionScript
ActionScript (French Doc Links)
Ada
Apache Log File
AppleScript
ASM (NASM based)
ASP
AutoIT
Bash
BlitzBasic
C
C for Macs
CAD DCL
CAD Lisp
CFDG
C++
C#
CSS
D
Delphi
Diff
DIV
DOS
Eiffel
Fortran
FreeBasic
GML
Groovy
HTML (4.0.1)
Inno
Java
Java 5
Javascript
Lisp
Lua
Matlab
MPASM
MySQL
NullSoft Installer
Objective C
OCaml
OCaml (Brief)
Openoffice.org BASIC
Oracle 8
Pascal
Perl
PHP
PHP (Brief version)
Python
QBasic/QuickBASIC
Windows Registry
robots.txt
Ruby
SAS
Scheme
SDLBasic
Smalltalk
Smarty
SQL
TCL
Plain text
T-SQL
VisualBasic
VB.NET
VHDL
VisualFoxPro
Winbatch
XML


Some of those I have never heard of.
RE: Colouring [code][/code] by surfichris on 07-10-2006 at 04:14 AM

Geshi is slow and bloated for what is needed here.

All that is needed is PHP, HTML (would also do XML) and possibly javascript. If at all..


RE: Colouring [code][/code] by -dt- on 07-10-2006 at 06:59 AM

The problem I see in it is that not everyone will use it :-/ they will just keep using the normal [code] tags and theres no real way to "guess" what type of code it is.

My solution for the problem is a javascript based one

if you have greasemonkey installed you can use this
http://svn.thedt.net/scripts/GM/plussyntaxthighlighter.user.js

Screenshot
[Image: GM_highlighter.JPG][/code]


RE: Colouring [code][/code] by Hank on 07-10-2006 at 07:16 AM

isnt there some issue with greasemonkey though?


RE: Colouring [code][/code] by -dt- on 07-10-2006 at 07:27 AM

quote:
Originally posted by Animal
isnt there some issue with greasemonkey though?
:-/ no not that I know of
RE: Colouring [code][/code] by Hank on 07-10-2006 at 08:40 AM

i thought i read somewhere on these forums greasemonkey was buggy,, .. im doubley doo sure i saw it posted. .someone having issues with FF

anyway IMO i think its a good idea matty


RE: Colouring [code][/code] by andrewdodd13 on 07-10-2006 at 09:47 AM

I think the problem with Greasemonkey was people used to think it's a security issue before realising it's quite hard to install a GM script.

I personally like this idea, though it might be simpler for the coders to make a program that they can download which generates BB code formatted code.


And as for "color" / "colour" - "color" is the way it was spelled when the Americans moved there, since then the English language has been bastardised by the Frenchn, so we have some dodgy spellings. Think "centre" (French) as opposed to "center" (how it sounds in English).