Jump to content


Photo

Tutorial: Getting GMLHTML5 Syntax Highlighting


  • Please log in to reply
4 replies to this topic

#1 OMGCarlos

OMGCarlos

    GMC Member

  • GMC Member
  • 329 posts
  • Version:GM:HTML5

Posted 04 October 2011 - 10:34 PM

Posted Image
(click image for more info and example)

(Not really too sure where to post this, but because it's relevant to a published GMHTML project I'll post it here)

I painstakingly went through the manual and got syntax highlighting for every single command in GMHTML5 (that I know of) to work on websites. This is important for anyone who publishes a game and releases the source code along with it. In the event that you want to deploy the source code along with the project, you can now display beautified code to help your visitors out! The following is the how-to, depending on what kind of website you are running:

This is a patch to the CodeCitation plugin for Joomla sites. In order to patch:

For Joomla Sites:
http://afoobar.com/foo/gmdn/misc/gml-highlighting/gml-for-joomla.zip
  • Download the CodeCitation Plugin for Joomla
  • Install the plugin into your Joomla site (how to install extensions)
  • Download and unpack the patch above
  • Navigate to your root directory and upload the folder "plugins" onto your root directory (click yes to overwrite)
  • Go to your plugin manager in the backend of Joomla (Menu > Extensions > Plugin Manager) and make sure "Content - CodeCitation" is enabled
  • Go into its preferences and change the "Default language to cite" to "gml"
  • In any of your articles copy/paste your GML script inbetween "{ codecitation }{ /codecitation }" (without the spaces)

For all other sites:
http://afoobar.com/foo/gmdn/misc/gml-highlighting/gml-for-syntaxhighlighter.zip
This download patches SyntaxHighlighter, which allows you to add syntax highlighting to any website which allows external javascript calls
  • Download the SyntaxHighlighter
  • View the Installation Page to understand how to install it to your website
  • Download the script below
  • Add shBrushGML.js to the scripts folder
  • See this page to learn how to integrate it with one of the major web platforms, orthis page to use it in a fully custom website.

Edited by OMGCarlos, 07 October 2011 - 08:43 AM.

  • 3

#2 pedrosorio

pedrosorio

    GMC Member

  • GMC Member
  • 971 posts

Posted 04 October 2011 - 10:48 PM

WOW. Awesome work, kudos.
  • 0

#3 Rossay

Rossay

    GMC Member

  • GMC Member
  • 67 posts
  • Version:GM:Studio

Posted 05 October 2011 - 09:13 AM

Much Kudos to you, Sir.
  • 0

#4 BlaXun

BlaXun

    Slime Online Creator

  • GMC Member
  • 2616 posts
  • Version:GM:Studio

Posted 05 October 2011 - 04:37 PM

Sry, but if you continue like this with your GMDN and now this then I can't help but falling in love with you :S

Please continue...
  • 0

#5 OMGCarlos

OMGCarlos

    GMC Member

  • GMC Member
  • 329 posts
  • Version:GM:HTML5

Posted 07 October 2011 - 08:45 AM

Thanks guys! I added the original GameMaker 8 css themes in it and found a ton of keywords I didn't have in there before. As before you can see an example and grab the download here -> http://afoobar.com/g...or-your-website

Edited by OMGCarlos, 07 October 2011 - 08:45 AM.

  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users