Hi,
I don't usually start topics in this board, but I really need some assistance.
I'm working on what I hope will be a popular site and there's just 1 major obstacle keeping me from launching it, and that is this:
I am writing a simple CMS to maintain the site. In the admin panel, you can add a tutorial for others to see. The problem is when code gets embedded, it needs to be highlighted.
I've installed GeSHi which highlights it (Mambo and Wordpress use GeSHi!), and tested it:
http://www.GoTutorials.com/admin/test.php
As you can see, it works fine. Documentation here: http://qbnz.com/highlighter/geshi-doc.html
Now, I need to get it to highlight all the code between [language_name] and [/language_name] tags. ALL of them in the string.
This alone is not too difficult (even though I can't get it anyway)... but the catch:
NUMEROUS languages can go inside the brackets [ and ]. The list follows:
*Actionscript
*ADA
*Apache Log
*AppleScript
*ASM
*ASP
*Bash
*C
*C for Macs
*C#
*C++
*CAD DCL
*CadLisp
*CSS
*Delphi
*DIV
*DOS
*Eiffel
*FreeBasic
*GML
*HTML
*Inno
*Java
*Javascript
*Lisp
*Lua
*Microprocessor ASM
*NSIS
*Objective C
*OpenOffice BASIC
*Oracle 8 SQL
*Pascal
*Perl
*PHP
*Python
*Q(uick)BASIC
*SDLBasic
*Smarty
*SQL
*VB.NET
*Visual BASIC
*Visual Fox Pro
*XML
So, i need it to find the text between [ and ] and set that as the $language variable (code below). And, if it's not supported, give an error message.
The code has been uploaded and highlighted by geshi:
CODE: http://www.gotutorials.com/code.php
WHAT I HAVE NOW: http://www.gotutorials.com/admin/addtut.php
I WILL GIVE 150 NP$ FOR THE PERSON WHO MAKES THIS WORK! Right now it only does lower-case php tags...
Not sure what I want still? It's like this forum: You type [ php ] and [ /php ], and everything between it is highlighted in PHP. Same for [ html ] and [ /html ].
Case-INsensitivity would be wonderful also
Good luck,
-Matt
I don't usually start topics in this board, but I really need some assistance.
I'm working on what I hope will be a popular site and there's just 1 major obstacle keeping me from launching it, and that is this:
I am writing a simple CMS to maintain the site. In the admin panel, you can add a tutorial for others to see. The problem is when code gets embedded, it needs to be highlighted.
I've installed GeSHi which highlights it (Mambo and Wordpress use GeSHi!), and tested it:
http://www.GoTutorials.com/admin/test.php
As you can see, it works fine. Documentation here: http://qbnz.com/highlighter/geshi-doc.html
Now, I need to get it to highlight all the code between [language_name] and [/language_name] tags. ALL of them in the string.
This alone is not too difficult (even though I can't get it anyway)... but the catch:
NUMEROUS languages can go inside the brackets [ and ]. The list follows:
*Actionscript
*ADA
*Apache Log
*AppleScript
*ASM
*ASP
*Bash
*C
*C for Macs
*C#
*C++
*CAD DCL
*CadLisp
*CSS
*Delphi
*DIV
*DOS
*Eiffel
*FreeBasic
*GML
*HTML
*Inno
*Java
*Javascript
*Lisp
*Lua
*Microprocessor ASM
*NSIS
*Objective C
*OpenOffice BASIC
*Oracle 8 SQL
*Pascal
*Perl
*PHP
*Python
*Q(uick)BASIC
*SDLBasic
*Smarty
*SQL
*VB.NET
*Visual BASIC
*Visual Fox Pro
*XML
So, i need it to find the text between [ and ] and set that as the $language variable (code below). And, if it's not supported, give an error message.
The code has been uploaded and highlighted by geshi:
CODE: http://www.gotutorials.com/code.php
WHAT I HAVE NOW: http://www.gotutorials.com/admin/addtut.php
I WILL GIVE 150 NP$ FOR THE PERSON WHO MAKES THIS WORK! Right now it only does lower-case php tags...
Not sure what I want still? It's like this forum: You type [ php ] and [ /php ], and everything between it is highlighted in PHP. Same for [ html ] and [ /html ].
Case-INsensitivity would be wonderful also
Good luck,
-Matt






