Talk:Geshi.php

From Organic Design wiki

Managed to screw up the php syntax hilighting so I just copied the c.php one and that seems to work ok.

Geshi is crap. It seems it would be quite easy to use a simpler document transform based on geshi's rules rather than use geshi itself. They've tokenised the pattern matches but ignored completely the colours and text styles. I tried to make a simple change to the colours and it's all just hard coded. I suggest a view transform that reads in the geshi data at:

/var/www/wiki/extensions/geshi/geshi

and chooses the file based on the language tag. --Rob 00:51, 13 Nov 2006 (NZDT)

Yip I'd agree that geshi isn't much good, but also a lot of the hardwiring is in the geshi.php article which is an xmlwiki hack - if we fix this we should do these things...
  • All colours config in wiki articles not files
  • Colour rules for each lang and a default used for rules not specified in specific lang article
  • Allow users to have their own colour rules to overide defaults and lang articles so we can have our own colours
I agree with all this. geshi.php is a view transform? How about:
  • we make geshi execute as a view transform for any article in the language category
  • load the rules for that language
  • load the user's css from User:Rob/syntax.css
  • if none present or not logged on use syntax.css
  • then apply remaining rules from the existing geshi.php (tabs etc)
I'll make a new article called syntax.php to replace geshi.php and start playing with that. --Rob 10:00, 13 Nov 2006 (NZDT)
Ok, geshi.php is in the data event of all articles, set in default-properties.xml --Nad 10:03, 13 Nov 2006 (NZDT)