What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » General » Forum & Website » [code][/code] suggestion

[code][/code] suggestion
Author: Message:
WDZ
Former Admin
*****

Avatar

Posts: 7106
Reputation: 107
– / Male / Flag
Joined: Mar 2002
RE: RE: [code][/code] suggestion
quote:
Originally posted by warmth
so what are going to be the solution of this thread??? :P
The thread isn't over yet. ;o

I still have some work to do on the syntax highlighting feature, but it's mostly done now. To use it, just specify a language within the opening code tag, like [code=php]...[/code].

jscript code:
// Some random code posted by matty :p

function ReadFile(File) {
    var oLineArray = new Array();
    var oFile = FileSys.OpenTextFile(File, 1 /* ForReading */, false);
    while (!oFile.AtEndOfStream) oLineArray.push(oFile.ReadLine());
    return oLineArray;
}

Without a language, [code] will behave the same as always (for backward compatibility).
code:
without language attribute :p


Here's the full list of supported languages: apache, asm, asp, bash, c, cpp, csharp, css, delphi, diff, dos, email, html4strict, ini, inno, java, javascript, make, mirc, mysql, nsis, objc, perl, php-brief, php, povray, powershell, python, rails, reg, robots, ruby, smalltalk, smarty, sql, tcl, text, vb, vbnet, xml

I deleted some of the more obscure ones (GeSHi comes with like 120 languages), and added aliases so you can use c++, c#, html, xhtml, js, jscript, etc.

To make a certain line stand out, surround it with >>> and <<< like this:
php code:
$line = 1;
>>>$line = 2;<<<
$line = 3;

>>>/* Another important line */<<<
(Idea stolen from a phpBB modification)

I'll add all this info to the BBcode help page eventually.

Also on the todo list:
  • Add some MsgPlus-specific stuff, like automatic links to the scripting API documentation, which would be kinda cool.
  • The colors and styles might need some tweaking if people complain that they're ugly :p.
  • Modify the "MyCode inserter" thingy to support the new tag format?
  • Somehow update all old posts containing code tags so they can take advantage of the syntax highlighting?
P.S. To see some examples of the highlighting in action, search the board for [code=. I edited a bunch of posts in the Scripting forum to test the highlighter.

This post was edited on 12-22-2008 at 01:43 AM by WDZ.
12-22-2008 01:04 AM
Profile PM Web Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
[code][/code] suggestion - by matty on 07-24-2008 at 01:21 PM
RE: [code][/code] suggestion - by John Anderton on 07-24-2008 at 02:17 PM
RE: [code][/code] suggestion - by Spunky on 07-24-2008 at 02:21 PM
RE: [code][/code] suggestion - by Nathan on 07-24-2008 at 03:03 PM
RE: RE: [code][/code] suggestion - by Vilkku on 07-24-2008 at 08:14 PM
RE: [code][/code] suggestion - by aNILEator on 07-24-2008 at 04:15 PM
RE: [code][/code] suggestion - by Spunky on 07-24-2008 at 05:08 PM
RE: [code][/code] suggestion - by joey on 07-24-2008 at 05:59 PM
RE: [code][/code] suggestion - by vaccination on 07-24-2008 at 08:34 PM
RE: [code][/code] suggestion - by Nathan on 07-24-2008 at 09:36 PM
RE: [code][/code] suggestion - by vaccination on 07-24-2008 at 09:45 PM
RE: [code][/code] suggestion - by Lou on 07-24-2008 at 11:33 PM
RE: [code][/code] suggestion - by Eljay on 07-25-2008 at 12:04 AM
RE: [code][/code] suggestion - by Adeptus on 07-25-2008 at 07:01 AM
RE: [code][/code] suggestion - by vaccination on 07-25-2008 at 07:51 AM
RE: [code][/code] suggestion - by CookieRevised on 07-25-2008 at 10:45 AM
RE: [code][/code] suggestion - by Felu on 07-25-2008 at 11:38 AM
RE: [code][/code] suggestion - by Thor on 07-25-2008 at 11:42 AM
RE: RE: [code][/code] suggestion - by Vilkku on 07-25-2008 at 11:45 AM
RE: [code][/code] suggestion - by Eljay on 07-25-2008 at 11:47 AM
RE: [code][/code] suggestion - by Felu on 07-25-2008 at 11:51 AM
RE: [code][/code] suggestion - by John Anderton on 07-25-2008 at 01:15 PM
RE: [code][/code] suggestion - by andrewdodd13 on 07-25-2008 at 04:00 PM
RE: [code][/code] suggestion - by CookieRevised on 07-26-2008 at 03:37 PM
RE: [code][/code] suggestion - by matty on 07-26-2008 at 03:47 PM
RE: [code][/code] suggestion - by mattisdada on 07-29-2008 at 07:21 AM
RE: [code][/code] suggestion - by Chrono on 07-29-2008 at 11:22 AM
RE: [code][/code] suggestion - by NanaFreak on 07-29-2008 at 11:41 AM
RE: RE: [code][/code] suggestion - by Vilkku on 07-29-2008 at 12:35 PM
RE: [code][/code] suggestion - by matty on 07-29-2008 at 12:53 PM
RE: [code][/code] suggestion - by L. Coyote on 07-29-2008 at 02:23 PM
RE: [code][/code] suggestion - by ShawnZ on 07-29-2008 at 02:39 PM
RE: [code][/code] suggestion - by L. Coyote on 07-29-2008 at 02:55 PM
RE: [code][/code] suggestion - by Menthix on 07-29-2008 at 03:02 PM
RE: [code][/code] suggestion - by L. Coyote on 07-29-2008 at 03:07 PM
RE: [code][/code] suggestion - by ShawnZ on 07-29-2008 at 03:07 PM
RE: [code][/code] suggestion - by WDZ on 07-30-2008 at 04:25 AM
RE: [code][/code] suggestion - by warmth on 07-31-2008 at 02:26 AM
RE: RE: [code][/code] suggestion - by WDZ on 12-22-2008 at 01:04 AM
RE: [code][/code] suggestion - by warmth on 12-22-2008 at 01:18 AM
RE: [code][/code] suggestion - by Lou on 12-22-2008 at 03:05 AM
RE: RE: [code][/code] suggestion - by ryxdp on 12-22-2008 at 05:10 AM
RE: [code][/code] suggestion - by toddy on 12-22-2008 at 03:25 AM
RE: [code][/code] suggestion - by MeEtc on 12-22-2008 at 04:15 AM
RE: [code][/code] suggestion - by Nathan on 12-22-2008 at 10:15 AM
RE: [code][/code] suggestion - by mynetx on 12-22-2008 at 10:47 AM
RE: [code][/code] suggestion - by WDZ on 12-22-2008 at 07:44 PM
RE: [code][/code] suggestion - by vaccination on 12-22-2008 at 07:54 PM
RE: [code][/code] suggestion - by Lou on 12-22-2008 at 07:57 PM
RE: [code][/code] suggestion - by WDZ on 12-22-2008 at 08:08 PM
RE: [code][/code] suggestion - by Lou on 12-22-2008 at 08:25 PM
RE: [code][/code] suggestion - by WDZ on 12-22-2008 at 08:51 PM
RE: [code][/code] suggestion - by ryxdp on 12-22-2008 at 10:53 PM
RE: [code][/code] suggestion - by Lou on 12-22-2008 at 11:16 PM
RE: [code][/code] suggestion - by matty on 12-08-2009 at 04:41 PM
RE: [code][/code] suggestion - by Chrono on 12-15-2009 at 12:05 AM
RE: [code][/code] suggestion - by matty on 12-15-2009 at 01:31 AM
RE: [code][/code] suggestion - by prashker on 12-15-2009 at 04:01 AM
RE: [code][/code] suggestion - by matty on 12-15-2009 at 02:22 PM


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On