Extension talk:GeSHiHighlight (Ajqnic)
Add topicAny user names refer to users of that site, who are not necessarily users of MediaWiki.org (even if they share the same username).
patch needed
[edit]
I had to patch it to get it working with php file reading. You can find the patch as well as GeSHiHighlight in action here
--TobiasBengtsson 20:31, 14 January 2006 (UTC)
1.5.5 compatibility
[edit]
We are running 1.5.5, and it seems the extension function now takes two parameters instead of just the text between the <lang></lang> tags. To get it to work I have had to modify the following lines:
foreach ( $langArray as $lang ){ $wgParser->setHook( $lang, create_function( '$text,$attrib', 'return wfSyntaxCode("' . $lang . '", $text);')); $wgParser->setHook( $lang.'-file', create_function( '$file_name,$attrib', 'return wfSyntaxFile("' . $lang . '", $file_name);')); }
Note the new $attrib parameter in the create_function call.
--rassie 15:24, 26 January 2006 (GMT+1)
Security Alert
[edit]
Hi, I installed your extension onto my webserver and tried - just for interest - the following:
<php-file>LocalSettings.php</php-file>
After that, I could read my configuration-settings - this is not good! So, on every wiki that has enabled this extension, everybody can read all files accessible to the web-server. I suggest to only allow files to be highlighted that are located in a certain directory!
minor bad effect when installing this extension
[edit]
You may remove or rename "div" of the $langArray... it makes strange behaviour when using div to format pages ! Bouil
- I removed "div" in $langArray, and the strange behaviours disappeared for me too. However I still dont get the code highlighted. The rendering is different from <pre>. Its neat, clean and easy to read... i just dont get color yet. Any suggestions? -- Oblivious 15:03, 26 October 2005 (UTC)
- Actually it works. All this time I've been trying without "geshi" directory inside "geshi" directory... stupid me. Thanks anyway. -- Oblivious 21:20, 26 October 2005 (UTC)
I can confirm that it works on MediaWiki 1.53 with PHP 5. Funnily enough, it didn't work (didn't colourise the text) when I first tried to get it to display the contents of GeSHiHighlight.php! The comment at the top of the script contains a </php> tag. I tried enclosing the text in an <nowiki> tag but that didn't work either. Anyway, little gotcha out of the way it seems to do exactly what it says on the tin. Thanks! --Kingboyk 05:27, 18 December 2005 (UTC)
m:User:Ajqnic:GeSHiHighlight/Cleaned-up-a-little-bit-version --Kingboyk 05:51, 18 December 2005 (UTC)
After the installation, all is fie except that when i enter a url with a new article, the actual message to edit this article is displayed in a new strange format (i means with no format)
is somebody with the same error ? Thx
PS: my config:
- MediaWiki: 1.6.5
- PHP: 5.1.4 (apache2handler)
- MySQL: 5.0.20a-standard
==> OK, i fix the pb by skipping the div section from lang array
Christophe
Note that the above conversation may have been edited or added to since the transfer. If in doubt, check the edit history.