GML Highlighter is a PHP script developed for highlighting GML code, which can be used in web pages and forums. GML Highlighter provides an easy to use web interface and easy to use PHP functions for highlighting GML on your website. As an example, you can see the GML scripts available on this website, which are automatically highlighted using the GML Highlighter.
GML Highlighter can be easily implemented to a website. All you need to do is to include a single file and then call a function highlight_gml() with your GML code to highlight it. The returned HTML can be just echoed on your website.
The GML highlighter is very simple to use. First you must enter the GML code you wish to highlight. You may either enter code into the code box or upload a .gml file to highlight. Note that you may not enter both, and if any file is entered for upload, it will be used as the source for the code.
After you have entered the GML, choose the keyword list you wish to use. The keyword list means which special "words" are highlighted from the code. GM5 means to use the function list from gm5.3a and GM6 means to use the list from the latest GM6 version. Both of the lists were provided due to the popularity of GM5. So, if you choose GM5, some functions (like median or choose) that do not exist in GM5 will not be highlighted.
Last thing to choose is the type of the output, which depends on where you want to use the code. If you wish to see just what the code looks like when highlighted, just choose the "example output" selection (note that the <pre> setting will effect the example output). Use the type you need. Below is quick explenation of each.
HTML Types:
These types are meant for website use. For these types, there is the extra setting "Don't use <pre>". This settings means whether to use that tag for whitespacing or not. When using the <pre> tag, the whitespace is left intact, but when it's not used, multiple whitespace is replaced with " ". The main difference is that the lines won't wrap when using <pre> tag.
Forum Types:
These types are meant for forums. When you want to post highlighted code on forums, these will generate the color bbcodes for the GML code to look like it's suposed to. Note that due to the lack of standardization and behavior of bbcode, the results of the highlighting vary depending on the forum type.