938 Posts in 271 Topics by 291 members
Forum Module
SilverStripe Forums » Forum Module » PHP Syntax Highlighting
Discuss the Forum Module.
Moderators: martimiz, Howard, Sean, Ryan M., biapar, Willr, Ingo, swaiba, simon_w
| Go to End | Next > | |
| Author | Topic: | 1839 Views |
-
PHP Syntax Highlighting

15 January 2009 at 11:36am Last edited: 15 January 2009 11:36am
having used the forums a lot lately (and loving the work you guys have done recently!) I think the one thing that makes communicating code that much harder is the lack of syntax highlighting. If we had that it would really bring the support up a level....at least if feels like it would.
How difficult would it be to implement a highlighting script like this one?: http://scott.yang.id.au/2003/01/source-code-syntax-highlighting-in-php/just a though
-
Re: PHP Syntax Highlighting

15 January 2009 at 12:00pm
Well ideally we shouldn't have large chunks of PHP code on the forum and as it kinda makes posts quite long. Would be good if people all used pastie.org or similar to paste links to their code.
But I will look into adding Syntax highlighting to the BBCode Parser (I thought it had it at one stage)
-
Re: PHP Syntax Highlighting

15 January 2009 at 12:06pm
I see what your saying about making posts long, I know some of mine have been pretty monstrous. But at the same time sometimes it's definately worth posting a short function or two rather than linking externaly just to keep the post flowing.
I hadn't used pastie before but it looks pretty useful, I will start using it for my longer posts (although I couldnt get the highlighting on that to work either
) -
Re: PHP Syntax Highlighting

15 January 2009 at 2:47pm
Also, please please please could white space be preserved in code blocks?
class MyObjects {
function LookReally() {
return array(
"ugly" => true
);
}
} -
Re: PHP Syntax Highlighting

15 January 2009 at 4:00pm
Has anyone tried the recipe on syntax highlighting in the docs? It's bloody awful. Did not work for me at all.
I use highlight,js, but the HTMLEditor in Silverstripe rips out the code tags for some reason. So it's a huge mess. And getting the indenting right is a massive headache.
Glad we have a dialogue going about this. Important issue.
-
Re: PHP Syntax Highlighting

26 January 2009 at 9:53pm
i tried that recipe on syntax highlighting, but it is missing some essential stuff.
I can't get it to work properly
| 1839 Views | ||
| Go to Top | Next > |





