PDA

View Full Version : Better syntax highlighting for SQL, PHP, HTML, etc. on vB.org?


Sarteck
07-25-2012, 11:52 AM
Using GeSHi (http://qbnz.com/highlighter/) (Generic Syntax Highlighter), we could have highlighted code for SQL (and, IMO, better highlighting for HTML and PHP as well) as BB Codes for use on vB.org. We could also include JavaScript, CSS, and (for server optimization, etc.) BASH highlighting.

I give some examples on how to do this for vB4 here, and I don't think the process would be much more involved for vB 3.6.12 (vB.org's version). Although I guess since you have that thing where only licensed members can view code, it might get a little more involved...

But anyways. It's not any huge deal, and we've obviously gotten on well enough without it. I'd just like to bring it to your attention in case it's not previously been considered, and maybe get some member feedback on it as well.

So give it some thought (or not, if you've got your hands full elsewhere, heh). :3

vbenhancer
07-25-2012, 11:58 AM
Geshi is a bit outdated and unsupported, but your idea join mine regarding a new Code Parser... but coders sites are not that popular, so focussing on coding a complete new highlighter/parser would be a loss of time...i have mine for MySQL, which is the version used by vB.org since day one, but that's about it...

the PHP/HTML/CODE bbcodes are used by how many websites around here?... not much if we consider that nobody need to highlight a PHP code in a parenting forum or a lizards fan group...

Sarteck
07-28-2012, 01:38 AM
I'm not talking about including it in the default vBulletin software--I agree, that's more or less an exercise in futility. :P

I'm talking about using it here at vB.org, where we often do communicate code.

Here's an example. See this thread. Note the JavaScript in the HTML box in my second post? Having that all prettified to actual JavaScript code would be nice. Having it parse correctly at all would be nice. XD

Ziki
07-28-2012, 02:50 PM
You have my bow.

Though unfortunately I don't see this ever happening.