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

Pages: (6): « First « 1 2 3 [ 4 ] 5 6 » Last »
[code][/code] suggestion
Author: Message:
L. Coyote
Senior Member
****

Avatar
Captain Obvious

Posts: 981
Reputation: 49
38 / Male / Flag
Joined: Aug 2004
Status: Away
RE: [code][/code] suggestion
quote:
Originally posted by matty
Well maybe he should implement it just for now until he upgrades the forums to the latest MyBB which supports it.
It's nice to have dreams, but don't live in a fantasy!

quote:
Originally posted by Chrono
WDZ, don't be lazy
1/0

To be honest, it's amazing that you still try. :rofl:



But, I do agree with the \t =>      thing.

This post was edited on 07-29-2008 at 02:24 PM by L. Coyote.

Hack, hack, hack!
Finally became a Systems Analyst! :spam:

07-29-2008 02:23 PM
Profile PM Find Quote Report
ShawnZ
Veteran Member
*****

Avatar

Posts: 3146
Reputation: 43
32 / Male / Flag
Joined: Jan 2003
RE: [code][/code] suggestion
or just use <pre> tags....
Spoiler:
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
07-29-2008 02:39 PM
Profile PM Web Find Quote Report
L. Coyote
Senior Member
****

Avatar
Captain Obvious

Posts: 981
Reputation: 49
38 / Male / Flag
Joined: Aug 2004
Status: Away
RE: [code][/code] suggestion
quote:
Originally posted by ShawnZ
or just use <pre> tags....
Hmmm! That's very true. Can't believe it's not like that already.

Hack, hack, hack!
Finally became a Systems Analyst! :spam:

07-29-2008 02:55 PM
Profile PM Find Quote Report
Menthix
forum admin
*******

Avatar

Posts: 5537
Reputation: 102
39 / Male / Flag
Joined: Mar 2002
RE: [code][/code] suggestion
quote:
Originally posted by ShawnZ
or just use <pre> tags
Works, but will break layout on long lines.
Finish the problem
Menthix.net | Contact Me
07-29-2008 03:02 PM
Profile E-Mail PM Web Find Quote Report
L. Coyote
Senior Member
****

Avatar
Captain Obvious

Posts: 981
Reputation: 49
38 / Male / Flag
Joined: Aug 2004
Status: Away
RE: [code][/code] suggestion
quote:
Originally posted by MenthiX
quote:
Originally posted by ShawnZ
or just use <pre> tags
Works, but will break layout on long lines.
Not really. I think it was overflow (in CSS) that can "correct" that.

Edit: Yeah, and overflow-x and overflow-y.

This post was edited on 07-29-2008 at 03:11 PM by L. Coyote.

Hack, hack, hack!
Finally became a Systems Analyst! :spam:

07-29-2008 03:07 PM
Profile PM Find Quote Report
ShawnZ
Veteran Member
*****

Avatar

Posts: 3146
Reputation: 43
32 / Male / Flag
Joined: Jan 2003
RE: [code][/code] suggestion
quote:
Originally posted by MenthiX
quote:
Originally posted by ShawnZ
or just use <pre> tags
Works, but will break layout on long lines.

so? why would people want their code wrapping? :p
Spoiler:
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
07-29-2008 03:07 PM
Profile PM Web Find Quote Report
WDZ
Former Admin
*****

Avatar

Posts: 7106
Reputation: 107
– / Male / Flag
Joined: Mar 2002
RE: [code][/code] suggestion
quote:
Originally posted by NanaFreak
wait... has anyone even seen WDZ around? o.0
Hi :p I'm still here, but I've been spending less time online lately because I've had tons of offline work keeping me busy.

Replacing every tab character in the whole post with spaces would be easy, but limiting it to code blocks would require a rewrite of the post parser (a project I started working on, but, um, didn't finish). I guess just replacing all tabs will be fine since they don't really serve any purpose in posts at the moment.

As for syntax highlighting, I'd love to integrate GeSHi, but it's really quite slow, so a caching system would have to be added. I did write a modification for an old MyBB 1.2.x version that could be re-used... I'll think about it. =p
07-30-2008 04:25 AM
Profile PM Web Find Quote Report
warmth
Veteran Member
*****

Avatar
Electronic Engineer

Posts: 1730
Reputation: 26
39 / Male / Flag
Joined: Jul 2003
RE: [code][/code] suggestion
so what are going to be the solution of this thread??? :P
@warmth - Beta Testing a life!
Official Nokia (former Ovi) Suite Beta Tester | Nokia Beta Labs Contributor of the month (June, 2011)
07-31-2008 02:26 AM
Profile PM Web Find Quote Report
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
warmth
Veteran Member
*****

Avatar
Electronic Engineer

Posts: 1730
Reputation: 26
39 / Male / Flag
Joined: Jul 2003
RE: [code][/code] suggestion
:O OMG!!! this is just great... thanks WDZ... you rock!!!

I hope that all this changes to this MyBB version can be still there if someday the forums get upgraded ;)
@warmth - Beta Testing a life!
Official Nokia (former Ovi) Suite Beta Tester | Nokia Beta Labs Contributor of the month (June, 2011)
12-22-2008 01:18 AM
Profile PM Web Find Quote Report
Pages: (6): « First « 1 2 3 [ 4 ] 5 6 » Last »
« Next Oldest Return to Top Next Newest »


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