Page 1 of 1

Syntax Highlighting for Programming Code

Posted: Thu May 13, 2021 9:03 am
by JSculley
The Jive forum included a syntax highlighting tool for posting code. Very helpful. There is a phpBB 3.3 plugin that does this sort of thing:

https://www.phpbb.com/community/viewtopic.php?t=2557806

It's still in BETA but the install/uninstall looks straightforward. Any chance this can be installed so we can take it for a test drive?

Re: Syntax Highlighting for Programming Code

Posted: Sun Jun 27, 2021 8:34 am
by matt
Notice a little late, but for reference, this has been activated. I don't know how to use it, but it should let you fotmst code in the post editor box.

Re: Syntax Highlighting for Programming Code

Posted: Mon Jun 28, 2021 7:45 am
by JSculley
To use it, you simply wrap the code in 'code' tags and put the name of the programming language as an attribute. So this:

[ code=java]
public class HelloWorld {
public static void main(String[ ]args) {
System.out.println("Hello World!");
}
}
[ /code]

becomes this:

Code: Select all

public class HelloWorld {
    public static void main(String[ ]args) {
        System.out.println("Hello World!");
    }
}

Re: Syntax Highlighting for Programming Code

Posted: Mon Jun 28, 2021 9:10 am
by mattpeneguy
JSculley wrote: Mon Jun 28, 2021 7:45 am To use it, you simply wrap the code in 'code' tags and put the name of the programming language as an attribute. So this:

[ code=java]
public class HelloWorld {
public static void main(String[ ]args) {
System.out.println("Hello World!");
}
}
[ /code]

becomes this:

Code: Select all

public class HelloWorld {
    public static void main(String[ ]args) {
        System.out.println("Hello World!");
    }
}
Pfft...Who still uses Java?...Regardless, this functionality doesn't work for me...:
[ code=c64]
LOAD"SOLIDWORKS",8,1
[ /code]

Re: Syntax Highlighting for Programming Code

Posted: Mon Jun 28, 2021 9:24 am
by JSculley
mattpeneguy wrote: Mon Jun 28, 2021 9:10 am Pfft...Who still uses Java?...Regardless, this functionality doesn't work for me...:
[ code=c64]
LOAD"SOLIDWORKS",8,1
[ /code]
Because c64 is a platform, not a language. Try 'basic': 8-)

Code: Select all

LOAD"SOLIDWORKS",8,1