Shoutbox

[code][/code] suggestion - Printable Version

-Shoutbox (https://shoutbox.menthix.net)
+-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58)
+--- Forum: General (/forumdisplay.php?fid=11)
+---- Forum: Forum & Website (/forumdisplay.php?fid=13)
+----- Thread: [code][/code] suggestion (/showthread.php?tid=85000)

[code][/code] suggestion by matty on 07-24-2008 at 01:21 PM

WDZ can you fix it so that tabs are kept when posting?

1 tab = 4   please and thankyou :>


RE: [code][/code] suggestion by John Anderton on 07-24-2008 at 02:17 PM

Good idea (Y) Seconded :)
Wonder why didn't anyone think of this before :P


RE: [code][/code] suggestion by Spunky on 07-24-2008 at 02:21 PM

quote:
Originally posted by John Anderton
Good idea (Y) Seconded :)
Wonder why didn't anyone think of this before :P

Thirded. I think it's been mentioned in passing before, but never been made a big deal of.
RE: [code][/code] suggestion by Nathan on 07-24-2008 at 03:03 PM

And add colour formatting if you're feeling in a good mood :p

And remove smilies out of anything in the code (ive requested this before)

code:
:)


RE: [code][/code] suggestion by aNILEator on 07-24-2008 at 04:15 PM

1 tab = something like 8 spaces, so yeah when posting code on here I try to remember that :P


RE: [code][/code] suggestion by Spunky on 07-24-2008 at 05:08 PM

A tab is usually 5 IIRC


RE: [code][/code] suggestion by joey on 07-24-2008 at 05:59 PM

i thought of this ages ago, i just never voiced my idea cuz i was expecting flaming and stuff ;<

quote:
Originally posted by SpunkyLoveMuff
A tab is usually 5 IIRC
win
RE: RE: [code][/code] suggestion by Vilkku on 07-24-2008 at 08:14 PM

quote:
Originally posted by Nathan
And add colour formatting if you're feeling in a good mood :p

And remove smilies out of anything in the code (ive requested this before)

code:
:)


This is also extremely important... I can't understand really how smilies could be accepted within code-tags anyway... Also, how about making the font monospace?
RE: [code][/code] suggestion by vaccination on 07-24-2008 at 08:34 PM

quote:
Originally posted by vaccination
If you don't want emotes you just have to put [noparse] tags around the code 8-)
quote:
Originally posted by SonicSam

doesn't work inside [code] :P



code:
:)





edit: whoever merged the posts royally messed up ;[[/code]
RE: [code][/code] suggestion by Nathan on 07-24-2008 at 09:36 PM

The whole idea of the code tags are for code - not for smilies... It's not something you should have to do manually imo


RE: [code][/code] suggestion by vaccination on 07-24-2008 at 09:45 PM

quote:
Originally posted by Nathan
The whole idea of the code tags are for code - not for smilies... It's not something you should have to do manually imo
But to include a noparse feature into the [code] tags would stop you from being able to colour, bold, italicise, underline etc.

[code] should definitely not automatically not parse things.[/code][/code]
RE: [code][/code] suggestion by Lou on 07-24-2008 at 11:33 PM

quote:
Originally posted by vaccination
quote:
Originally posted by Nathan
The whole idea of the code tags are for code - not for smilies... It's not something you should have to do manually imo
But to include a noparse feature into the [code] tags would stop you from being able to colour, bold, italicise, underline etc.

[code] should definitely not automatically not parse things.
Actually, it should. It's possible to have it just not parse smilies and let it parse everything else, so I don't see why that wouldn't be the case.

As for syntax highlighting, that's included in MyBB 1.4 is it not?[/code][/code]
RE: [code][/code] suggestion by Eljay on 07-25-2008 at 12:04 AM

+1, it's very annoying having to convert to spaces :P

I only really posted to comment on your nice tid :P


RE: [code][/code] suggestion by Adeptus on 07-25-2008 at 07:01 AM

Code blocks should simply be tagged as HTML <pre>, which is a tag included precisely for that purpose and preserves tabs.  This is a more appropriate way to address that than any sort of server side processing -- because it tells the browser what the content is, rather than try to force a particular way of rendering it.


RE: [code][/code] suggestion by vaccination on 07-25-2008 at 07:51 AM

quote:
Originally posted by .Lou
quote:
Originally posted by vaccination
quote:
Originally posted by Nathan
The whole idea of the code tags are for code - not for smilies... It's not something you should have to do manually imo
But to include a noparse feature into the [code] tags would stop you from being able to colour, bold, italicise, underline etc.

[code] should definitely not automatically not parse things.
Actually, it should. It's possible to have it just not parse smilies and let it parse everything else, so I don't see why that wouldn't be the case.

But WDZ would be way too lazy to specify all the emotes not to be parsed within the code tags 8-)

I can't see the need for it, it's really not that hard to use noparse tags.[/code][/code]
RE: [code][/code] suggestion by CookieRevised on 07-25-2008 at 10:45 AM

quote:
Originally posted by SpunkyLoveMuff
A tab is usually 5 IIRC
I have heared of 4 spaces being used. And the windows default (old days) is 8 spaces. But I never heared of 5 spaces?????

quote:
Originally posted by matty
WDZ can you fix it so that tabs are kept when posting?
1 tab = 4 &nbsp; please and thankyou :>
(y)(y)

and no rendering of smilies
RE: [code][/code] suggestion by Felu on 07-25-2008 at 11:38 AM

But isn't the Tab button designed to move focus to the next element, the Post reply button in this case? Ctrl+Tab and Alt+Tab can't be used either. Although IIRC, I've seen WYSIWYG editors that have the Tab button giving some spaces, not sure though. Also, no rendering of images in code tags please.


RE: [code][/code] suggestion by Thor on 07-25-2008 at 11:42 AM

I think the solution here is an upgrade of MyBB. :zippy:


RE: RE: [code][/code] suggestion by Vilkku on 07-25-2008 at 11:45 AM

quote:
Originally posted by Nitro
I think the solution here is an upgrade of MyBB. :zippy:
Nitro just touched an forbidden subject [Image: zippyoh.png]
RE: [code][/code] suggestion by Eljay on 07-25-2008 at 11:47 AM

Surely it should be easily possible though, replace code tags with noparse tags and surround with <pre>? :P

quote:
Originally posted by Felu
But isn't the Tab button designed to move focus to the next element, the Post reply button in this case?

I'm assuming this is meant for code snippets pasted in rather than typing code in directly.
RE: [code][/code] suggestion by Felu on 07-25-2008 at 11:51 AM

quote:
Originally posted by Eljay
I'm assuming this is meant for code snippets pasted in rather than typing code in directly.
'this' as in the original post or my post? In case of the latter, I meant typing code in directly.

Edit: I get it, you were referring to the first post. I guess I just didn't read it properly.
RE: [code][/code] suggestion by John Anderton on 07-25-2008 at 01:15 PM

quote:
Originally posted by Nathan
And add colour formatting if you're feeling in a good mood :p

And remove smilies out of anything in the code (ive requested this before)

code:
:)


use noparse. I already had asked WDZ and he said there are times when you need highlighting in code tags and some people apparently want smileys too :P Anyway, you can noparse it when you want :) Its not a big deal :)

Also, 4 spaces is fine. Anything more than that would be too much imo :P
RE: [code][/code] suggestion by andrewdodd13 on 07-25-2008 at 04:00 PM

Tabs represent tab stops, not spaces, according to the ASCII standard. On Windows a tab stop is defined as 4 spaces, on some Unix systems it's 8.

Besides. To preserve tabs, 1 tab = &#09; .

Of course, this only really works with Mono-spaced fonts.


RE: [code][/code] suggestion by CookieRevised on 07-26-2008 at 03:37 PM

When tabs are used in code text lines (which is what we're talking about here; not about switching controls or technical ascii standards or whatever other context), then the only purpose of them is to indend the codelines so they are better structured.

Doing this by spaces, preseving tab stops, or whatever else doesn't matter, even mono-spaced or variable spaced fonts doesn't matter, just as long as the codelines are indended. So I don't see no harm done in a simple replace of a tab character into a few spaces.

Code highlighting would be nice too, but that isn't going to happen anytime soon. Automatic enclosing with [noparse] and using the <pre> tag is going to be worse, since then we can not use any highlighting or formatting (eg: bold) ourselfs anymore, which is very important.

A simple replace of the tab character on the other hand is quite straightforward and easy to implement I think. And at least saves us from doing a manual ReplaceAll all the time when pasting code.


RE: [code][/code] suggestion by matty on 07-26-2008 at 03:47 PM

quote:
Originally posted by CookieRevised
Code highlighting would be nice too, but that isn't going to happen anytime soon. Automatic enclosing with [noparse] and using the <pre> tag is going to be worse, since then we can not use any highlighting or formatting (eg: bold) ourselfs anymore, which is very important.
Simple implemention of GeSHi would be suffice.

[Image: codetk6.jpg]



For instance you could use:

[code=js][/code=js] or [code=php][/code=php] or [code=xml][/code=xml] and so on this will allow the forum to highlight different languages :)
RE: [code][/code] suggestion by mattisdada on 07-29-2008 at 07:21 AM

Yeah ive seen GeSHi being used on a few forums(or at least GeSHi like). Its really good, its an easy way to show your code.


RE: [code][/code] suggestion by Chrono on 07-29-2008 at 11:22 AM

WDZ already said once he wouldnt use geshi (you know he'd want to go through the source code of that, fixing bugs and stuff :P). But it is, indeed, a good idea.

WDZ, don't be lazy and fix the damn thing. I dont see the purpose of using the code tags if they still preserve smilies :P


RE: [code][/code] suggestion by NanaFreak on 07-29-2008 at 11:41 AM

wait... has anyone even seen WDZ around? o.0


RE: RE: [code][/code] suggestion by Vilkku on 07-29-2008 at 12:35 PM

quote:
Originally posted by NanaFreak
wait... has anyone even seen WDZ around? o.0
Nitro scared him off with his talks about MyBB upgrade :dodgy:
RE: [code][/code] suggestion by matty on 07-29-2008 at 12:53 PM

Well maybe he should implement it just for now until he upgrades the forums to the latest MyBB which supports it.


RE: [code][/code] suggestion by L. Coyote on 07-29-2008 at 02:23 PM

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 => &nbsp;&nbsp;&nbsp;&nbsp; thing.
RE: [code][/code] suggestion by ShawnZ on 07-29-2008 at 02:39 PM

or just use <pre> tags....


RE: [code][/code] suggestion by L. Coyote on 07-29-2008 at 02:55 PM

quote:
Originally posted by ShawnZ
or just use <pre> tags....
Hmmm! That's very true. Can't believe it's not like that already.
RE: [code][/code] suggestion by Menthix on 07-29-2008 at 03:02 PM

quote:
Originally posted by ShawnZ
or just use <pre> tags
Works, but will break layout on long lines.
RE: [code][/code] suggestion by L. Coyote on 07-29-2008 at 03:07 PM

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.
RE: [code][/code] suggestion by ShawnZ on 07-29-2008 at 03:07 PM

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
RE: [code][/code] suggestion by WDZ on 07-30-2008 at 04:25 AM

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
RE: [code][/code] suggestion by warmth on 07-31-2008 at 02:26 AM

so what are going to be the solution of this thread??? :P


RE: RE: [code][/code] suggestion by WDZ on 12-22-2008 at 01:04 AM

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.
RE: [code][/code] suggestion by warmth on 12-22-2008 at 01:18 AM

: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 ;)


RE: [code][/code] suggestion by Lou on 12-22-2008 at 03:05 AM

php code:
<?php
//Testing
function just_a($test) {
/*
Commenting block!!!!
Woot!
*/

print $test;
>>>echo $test;<<<
}
?>


I'm kind of used to having the php tags in red, comments in green. Perhaps a colour scheme similar to that used by Notepad++? I think it's more appealing. Perhaps it's just me though... :undecided:
RE: [code][/code] suggestion by toddy on 12-22-2008 at 03:25 AM

quote:
Originally posted by .Lou
Perhaps it's just me though
i think wdz should use the random color on load, that he post (in the spambox iirc) before
RE: [code][/code] suggestion by MeEtc on 12-22-2008 at 04:15 AM

The colour for PHP keywords is hard to read, some light orange

php code:
if (true){
   foreach($key as $value)
      $class->function($value)
}else{
   return;
}

RE: RE: [code][/code] suggestion by ryxdp on 12-22-2008 at 05:10 AM

quote:
Originally posted by .Lou
Perhaps a colour scheme similar to that used by Notepad++? I think it's more appealing.

Seconded :chrongue:
RE: [code][/code] suggestion by Nathan on 12-22-2008 at 10:15 AM

quote:
Originally posted by ryxdp
quote:
Originally posted by .Lou
Perhaps a colour scheme similar to that used by Notepad++? I think it's more appealing.

Seconded :chrongue:
I was about to request exactly the same thing. Yeah lou is totally right. Notepad++ colours ftw.q
RE: [code][/code] suggestion by mynetx on 12-22-2008 at 10:47 AM

I vote for Notepad++ as well, except for the \r \n highlighting, which is better in WDZ version.

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;
}
Notepad++:

[Image: zwischenablage01do9iq7.png]

php code:
<?php

// Some random code posted by mynetx :p

function post($strUrl, $strQuery) {
    $strQuery = utf8_encode($strQuery);
    $resFp = fsockopen(REMOTE_HOST, 80);
    fwrite($resFp,
        'POST '.$strUrl." HTTP/1.1\r\nHost: ".REMOTE_HOST."\r\n".
        "Content-Type: application/x-www-form-urlencoded; charset=UTF-8\r\n".
        "Cookie: PHPSESSID=".SID."\r\n".
        'Content-Length: '.strlen($strQuery)."\r\nConnection: Close\r\n\r\n".$strQuery);
    $strReply = '';
    while(!feof($resFp))
        $strReply .= fread($resFp, 1024);
    fclose($resFp);
    $intBody = strpos($strReply, "\r\n\r\n");
    if(!$intBody)
        $intBody = strlen($strReply);
    $strHeaders = substr($strReply, 0, $intBody);
    $strBody = substr($strReply, $intBody + 4);
    if(stristr($strHeaders, 'Transfer-Encoding: chunked')) {
        $strBody = decode_chunked($strBody);
    }
    return $strBody;
}

$strText = <<< SOME_TEST
Breaking News:
WDZ is working on the forums again.
SOME_TEST;

?>
Notepad++:

[Image: zwischenablage01sm8.png]

By the way:
quote:
Originally posted by http://de.php.net/types.string#language.types.string.syntax.heredoc
Also, the identifier must follow the same naming rules as any other label in PHP: it must contain only alphanumeric characters and underscores, and must start with a non-digit character or underscore.

RE: [code][/code] suggestion by WDZ on 12-22-2008 at 07:44 PM

quote:
Originally posted by toddy
i think wdz should use the random color on load, that he post (in the spambox iirc) before
Hmm, I could add that in as an easter egg... [code=random] or something :p

quote:
Originally posted by mynetx
I vote for Notepad++ as well, except for the \r \n highlighting, which is better in WDZ version.
It's not mine at all, it's GeSHi with 100% default colors. I've been looking for a custom GeSHi color scheme I can steal, but I haven't had any luck yet. I looked at MediaWiki and DokuWiki and they're both using the ugly orange-ish keywords and gray comments.

There's talk of some improvements being made to the colors on Wikipedia, but apparently nobody has done the work yet. :sad:
quote:
Originally posted by http://en.wikipedia.org/wiki/MediaWiki:Geshi.css
This css will override styles used by the GeSHi syntax highlighting, such that less awful colors for the highlighting can be chosen.

quote:
Originally posted by andrey (in the spambox)
huh "supported languages ..., text,..." ? :p never heard of that weird programming language
That just allows you to get GeSHi formatting without syntax highlighting:
text code:
text code!
indented 1
  indented 2
   indented 3

>>>very important line :o<<<

RE: [code][/code] suggestion by vaccination on 12-22-2008 at 07:54 PM

What about the important lines on white backgrounds?:P

text code:
>>> omfg <<<

^^ kinda hard to see :P
RE: [code][/code] suggestion by Lou on 12-22-2008 at 07:57 PM

quote:
Originally posted by WDZ
It's not mine at all, it's GeSHi with 100% default colors. I've been looking for a custom GeSHi color scheme I can steal, but I haven't had any luck yet.
Can't you edit the css file yourself? ;o
RE: [code][/code] suggestion by WDZ on 12-22-2008 at 08:08 PM

quote:
Originally posted by .Lou
Can't you edit the css file yourself? ;o
Of course, but there are lots of colors (I count 17 for PHP), and I'm not a web designer, so I don't want to do that work unless I have to. (a)
RE: [code][/code] suggestion by Lou on 12-22-2008 at 08:25 PM

Stick it here, I'm sure someone will grab the notepad++ colours and edit it for you. :P


RE: [code][/code] suggestion by WDZ on 12-22-2008 at 08:51 PM

css code:
/* keywords */
.geshi_code.php .kw1 {color: #b1b100;} /* language constructs (require, foreach, return) */
.geshi_code.php .kw2 {color: #000000; font-weight: bold;} /* constants */
.geshi_code.php .kw3 {color: #990000;} /* functions */
/* comments */
.geshi_code.php .co1 {color: #666666; font-style: italic;} /* single-line starting with "//" */
.geshi_code.php .co2 {color: #666666; font-style: italic;} /* single-line starting with "#" */
.geshi_code.php .co3 {color: #0000cc; font-style: italic;} /* heredoc and nowdoc */
.geshi_code.php .co4 {color: #009933; font-style: italic;} /* phpdoc */
.geshi_code.php .coMULTI {color: #666666; font-style: italic;} /* multi-line */
/* string escape sequences */
.geshi_code.php .es0 {color: #000099; font-weight: bold;}
.geshi_code.php .es1 {color: #000099; font-weight: bold;} /* simple single-char (\r\n\t) */
.geshi_code.php .es2 {color: #660099; font-weight: bold;} /* hexadecimal notation (\xAF) */
.geshi_code.php .es3 {color: #660099; font-weight: bold;} /* octal notation (\123) */
.geshi_code.php .es4 {color: #006699; font-weight: bold;} /* variables */
.geshi_code.php .es5 {color: #006699; font-weight: bold; font-style: italic;} /* cascaded variables */
.geshi_code.php .es6 {color: #009933; font-weight: bold;} /* format strings */
.geshi_code.php .es_h {color: #000099; font-weight: bold;}
/* brackets */
.geshi_code.php .br0 {color: #009900;}
/* symbols */
.geshi_code.php .sy0 {color: #339933;}
/* strings */
.geshi_code.php .st0 {color: #0000ff;}
.geshi_code.php .st_h {color: #0000ff;}
/* numbers */
.geshi_code.php .nu0 {color: #cc66cc;} /* integers */
.geshi_code.php .nu8 {color: #208080;} /* octal (0777) */
.geshi_code.php .nu12 {color: #208080;} /* hex (0xAF) */
.geshi_code.php .nu19 {color:#800080;} /* floating-point */
/* methods */
.geshi_code.php .me1 {color: #004000;}
.geshi_code.php .me2 {color: #004000;}
/* variables */
.geshi_code.php .re0 {color: #000088;}
That's just for PHP; each language has its own styles, and the class names used can vary.

BTW, when I said 17, I meant unique colors. You could have 27 different colors, but that's probably overkill. =p

I tried to comment the CSS with descriptions of what each class is for, but even I don't understand some of it. :p
RE: [code][/code] suggestion by ryxdp on 12-22-2008 at 10:53 PM

Well, the notepad++ colours can be found in %ProgramFiles%\Notepad++\stylers.xml. I'd try doing the CSS myself but I've got pretty much no idea as to what everything is :P


RE: [code][/code] suggestion by Lou on 12-22-2008 at 11:16 PM

That's the php styles from Notepad++. Geshi's seems to be a bit more detailed (more colours and stuff).  Good luck :P.

xml code:
<LexerType name="php" desc="php" ext="">
            <WordsStyle name="QUESTION MARK" styleID="18" fgColor="FF0000" bgColor="FDF8E3" fontName="" fontStyle="0" fontSize="" />
            <WordsStyle name="DEFAULT" styleID="118" fgColor="000000" bgColor="FEFCF5" fontName="" fontStyle="0" fontSize="" />
            <WordsStyle name="STRING" styleID="119" fgColor="808080" bgColor="FEFCF5" fontName="" fontStyle="0" fontSize="" />
            <WordsStyle name="STRING VARIABLE" styleID="126" fgColor="808080" bgColor="FEFCF5" fontName="" fontStyle="1" fontSize="" />
            <WordsStyle name="SIMPLESTRING" styleID="120" fgColor="808080" bgColor="FEFCF5" fontName="" fontStyle="0" fontSize="" />
            <WordsStyle name="WORD" styleID="121" fgColor="0000FF" bgColor="FEFCF5" fontName="" fontStyle="1" fontSize="" keywordClass="instre1" />
            <WordsStyle name="NUMBER" styleID="122" fgColor="FF8000" bgColor="FEFCF5" fontName="" fontStyle="0" fontSize="" />
            <WordsStyle name="VARIABLE" styleID="123" fgColor="000080" bgColor="FEFCF5" fontName="" fontStyle="0" fontSize="" />
            <WordsStyle name="COMMENT" styleID="124" fgColor="008000" bgColor="FEFCF5" fontName="Comic Sans MS" fontStyle="0" fontSize="8" />
            <WordsStyle name="COMMENTLINE" styleID="125" fgColor="008000" bgColor="FEFCF5" fontName="Comic Sans MS" fontStyle="0" fontSize="8" />
            <WordsStyle name="OPERATOR" styleID="127" fgColor="8000FF" bgColor="FEFCF5" fontName="" fontStyle="0" fontSize="" />
        </LexerType>

RE: [code][/code] suggestion by matty on 12-08-2009 at 04:41 PM

Hate to bring up an old thread.

But the suggestion is for the code block. Can you make the code blocks collapsable and collapsed by default if they are greater than X number of lines?

For instance collapse to show the first 15 or 20 than expand to show the rest.


RE: [code][/code] suggestion by Chrono on 12-15-2009 at 12:05 AM

Spoiler:
or make it like a spoiler?

RE: [code][/code] suggestion by matty on 12-15-2009 at 01:31 AM

Not quite what I was going for. I think showing a preview of the code would be better.


RE: [code][/code] suggestion by prashker on 12-15-2009 at 04:01 AM

quote:
Originally posted by matty
Not quite what I was going for. I think showing a preview of the code would be better.
errr?

xml code:
<LexerType name="php" desc="php" ext="">
            <WordsStyle name="QUESTION MARK" styleID="18" fgColor="FF0000" bgColor="FDF8E3" fontName="" fontStyle="0" fontSize="" />
            <WordsStyle name="DEFAULT" styleID="118" fgColor="000000" bgColor="FEFCF5" fontName="" fontStyle="0" fontSize="" />
            <WordsStyle name="STRING" styleID="119" fgColor="808080" bgColor="FEFCF5" fontName="" fontStyle="0" fontSize="" />
            <WordsStyle name="STRING VARIABLE" styleID="126" fgColor="808080" bgColor="FEFCF5" fontName="" fontStyle="1" fontSize="" />
            <WordsStyle name="SIMPLESTRING" styleID="120" fgColor="808080" bgColor="FEFCF5" fontName="" fontStyle="0" fontSize="" />
            <WordsStyle name="WORD" styleID="121" fgColor="0000FF" bgColor="FEFCF5" fontName="" fontStyle="1" fontSize="" keywordClass="instre1" />
            <WordsStyle name="NUMBER" styleID="122" fgColor="FF8000" bgColor="FEFCF5" fontName="" fontStyle="0" fontSize="" />
Spoiler:

xml code:
            <WordsStyle name="VARIABLE" styleID="123" fgColor="000080" bgColor="FEFCF5" fontName="" fontStyle="0" fontSize="" />
            <WordsStyle name="COMMENT" styleID="124" fgColor="008000" bgColor="FEFCF5" fontName="Comic Sans MS" fontStyle="0" fontSize="8" />
            <WordsStyle name="COMMENTLINE" styleID="125" fgColor="008000" bgColor="FEFCF5" fontName="Comic Sans MS" fontStyle="0" fontSize="8" />
            <WordsStyle name="OPERATOR" styleID="127" fgColor="8000FF" bgColor="FEFCF5" fontName="" fontStyle="0" fontSize="" />
        </LexerType>

RE: [code][/code] suggestion by matty on 12-15-2009 at 02:22 PM

That just looks too messy.