As I remember there are a number of issues with the GeSHi alpha that
make it incompatible with the extension, and also serve as a downside
for it's use:
* GeSHi alpha has undergone a code style change to meet pear standards
(camelCase vs. underscore_separated) and so every function call the
extension makes for old geshi is invalid for new GeSHi.
* GeSHi alpha is missing a number of features, including line numbering
last time I checked. I believe the techniques used to set these are also
different. So any use of these features will cause issues.
* GeSHi alpha, while working beautifully for PHP and a few other
languages, is missing most of the languages that the old GeSHi supports.
I actually had an old project you might be interested in. I called it
MultiHighlight_GeSHi, and the goal back then was to perfect it as a
replacement for SyntaxHighlight_GeSHi.
Basically I had support for running both GeSHi engines. Because of
course they use the same classname you had a number of options on how to
make this work:
A) Default: Only one engine can be used at a time. This means that you
can use old GeSHi, or new GeSHi in a page. But you'll have an error if
you try to use both.
B) Rename: You can rename the class of either the old geshi or the alpha
geshi. Meaning perhaps you could make new geshi use a Geshi2 class so it
doesn't conflict.
C) Runkit: You need PHP's Runkit installed (which isn't as easy on my
Ubuntu machine I find as it is on Windows with XAMPP) but the extension
can make use of the Runkit_Sandbox to sandbox two individual GeSHi
instances meaning they can both run completely separated without needing
to edit either.
Now that I think about it a bit more. I could probably also offer a D)
option, exec. Basically I could have a short php script that loads GeSHi
with a number of options then prints the output from it. That should
mean that you can run both types of GeSHi without even loading them.
^_^ Don't you wish PHP 5.3 and it's Namespace's was out already so we
could just add namespace headers to GeSHi? heh...
If you're interested in it, I can commit the current code (incomplete)
into my SVN repo. It was an old project, so I believe I never committed
it. Though I should still have the old code.
~Daniel Friesen(Dantman, Nadir-Seen-Fire) of:
-The Nadir-Point Group (
http://nadir-point.com)
--It's Wiki-Tools subgroup (
http://wiki-tools.com)
--The ElectronicMe project (
http://electronic-me.org)
--Games-G.P.S. (
http://ggps.org)
-And Wikia ACG on
Wikia.com (
http://wikia.com/wiki/Wikia_ACG)
--Animepedia (
http://anime.wikia.com)
--Narutopedia (
http://naruto.wikia.com)
Rolf Lampa wrote:
Hi all,
.... who knows the details about the SyntaxHighlight extension?
(
http://www.mediawiki.org/wiki/Extension:SyntaxHighlight_GeSHi )
Any plans to support GeSHi 1.1.2(alpha) ?
I understand that there's no rush to update the "official"
SyntaxHighlight before GeSHi1.1.2 is stable, but I'd like to test it on
my MW sites.
So, does anyone know the details about what changes makes the
SyntaxHighlight extension not working with GeSHi1.1.2?
Perhaps it isn't that big thing that I couldn't patch it myself?
Regards,
// Rolf Lampa