Syntax Highlighting for Programming Code

Make suggestion to the moderators and admins of this site.
User avatar
JSculley
Posts: 648
Joined: Tue May 04, 2021 7:28 am
Answers: 55
x 9
x 883

Syntax Highlighting for Programming Code

Unread post 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?
User avatar
matt
Posts: 1590
Joined: Mon Mar 08, 2021 11:34 am
Answers: 19
Location: Virginia
x 1219
x 2380
Contact:

Re: Syntax Highlighting for Programming Code

Unread post 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.
User avatar
JSculley
Posts: 648
Joined: Tue May 04, 2021 7:28 am
Answers: 55
x 9
x 883

Re: Syntax Highlighting for Programming Code

Unread post 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!");
    }
}
User avatar
mattpeneguy
Posts: 1386
Joined: Tue Mar 09, 2021 11:14 am
Answers: 4
x 2489
x 1899

Re: Syntax Highlighting for Programming Code

Unread post 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]
User avatar
JSculley
Posts: 648
Joined: Tue May 04, 2021 7:28 am
Answers: 55
x 9
x 883

Re: Syntax Highlighting for Programming Code

Unread post 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
Post Reply