[HowTo] Usage of CODE tag in forum posts

MikeHart

Administrator
Joined
Jun 19, 2017
Messages
3,135
Some where wondering, how to use the CODE tag inside your posts, when you want to display source code. To get an overview of the BBcode tags available, have a look at the help page first:

https://www.cerberus-x.com/community/help/bb-codes

You can reach it via the menu

upload_2017-7-17_9-51-19.png


or through the link on the bottom of the page

upload_2017-7-17_9-51-57.png


So how do you post source code? With the use of the CODE tag.

Basically you do this:

[code] '.... you code goes here [/code]

By default it uses the Cerberus language and would look like this:

Code:
'.... you code goes here

We use the GesHI plugin to display syntax highlighted code which supports over 200 programming languages.

Here are a few which you mostly will use:


[code=cpp] // you C++ code goes here [/code]
[code=text] you plain text goes here [/code]
[code=java] '.... you JAVA code goes here [/code]
[code=JavaScript] '.... you JavaScript code goes here [/code]
[code=powershell] '.... you Powershell script goes here [/code]
[php] '.... you JAVA code goes here [/php]
[html] '.... you JAVA code goes here [/html]
[CSS] /*.... you CSS code goes here */ [/CSS]


Or you can use this helper inside the post editor:

upload_2017-7-17_10-3-26.png


upload_2017-7-17_10-4-32.png



Ok, I hope this will help you a little. If you have any questions, please ask.
 
Last edited:
Top Bottom