Extension talk:SyntaxHighlight GeSHi/Archive 2015

=2008=

Strict Mode Parameter meaning
I'm unsure about how the strict paramter for the source tag is supposed to be used, as GeSHi 1.0.8 adds another strict type GESHI_MAYBE while replacing false and true with GESHI_NEVER and GESHI_ALWAYS. Some more information on the exact usage (maybe an example) would be appreciated. --BenBE 21:18, 16 August 2008 (UTC)

Problem with CSS: Default style for pre is overwritten
Hi, the generated output contains CSS classes which overwrite the default pre stlye rules.

How can I change the renedered classes rules? (In my case .source-csharp li, .source-csharp pre and .csharp.source-csharp .de1, .csharp.source-csharp .de2) A quick fix was to declare the base CSS class rules as important, but that's only a hack.

Thanx for help in advance. PJ --IP 19 August 2008


 * Same problem here.
 * Code is highlighted, but without background box, because default pre style is overwritten.
 * MediaWiki 	1.12.0
 * PHP 	5.2.0-8+etch11 (apache2handler)
 * MySQL 	5.0.32-Debian_7etch6-log
 * Any idea? --IP 20 August 2008


 * It does work for me with the following snapshot:
 * SyntaxHighlight_GeSHi-MW1.12-r31252.tar.gz
 * --IP 20 August 2008


 * Thanks for the feedback. I will try the snapshot.
 * But I'd still like to know how I can change the generated CSS class wich is causing the trouble. I found some lines in geshi.php, but not the right one. Perhaps some expert does know how to do it.
 * PJ --IP 20 August 2008

The problem can be fixed by editing file "SyntaxHighlight_GeSHi.class.php". Go to line 192, which should look like $css[] = ".source-$lang {line-height: normal;}"; Change this to $css[] = ".source-$lang {padding: 1em; border: 1px dashed #2f6fab; color: black; background-color: #f9f9f9; line-height: 1.1em;}"; and you have restored the pre css formatting. --KKreuzwieser 21 August 2008

Addition to the point above (2008-09-27): Please note that this didn't take effect for me immediately, it appears PHP caches the class. After making the change to the class as above, comment out the include from LocalSettings.php and refresh your page. Then un-comment out the include and refresh. Worked perfect here, good luck! --IP 26 September 2008


 * Thank you for the answer, but the line did not fix the css problem. --IP 28 August 2008
 * It did fix my problem, which wasn't doing pre tags for any language. I am using MW 1.11.0, geshi 1.0.8, syntaxhighlightgeshi $LastChangedDate: 2008-07-10 08:45:20 -0400 (Thu, 10 Jul 2008) $ --IP 2 September 2008
 * The fix is not needed for MSIE, but does not work in FF 3.0.1. See my Test page and my MediaWiki version (MW 1.13.1, geshi 1.0.8.1). I tryed SyntaxHighlight_GeSHi MW1.13-r37906, trunk-r40401 and trunk 40580. --Milan Keršláger 13:59, 7 September 2008 (UTC)
 * This fix works for me using MSIE(2008-10-28), thanks a lot. The trick is comment out the include from LocalSettings.php and refresh your page.  Then un-comment out the include and refresh. --IP 28 October 2008

If you want to see in   does not change in trunk so Special:Version lie about current version. Even that r37495 nor r40968 does not work. One should debug CSS to find where correct attributes are lost. --Milan Keršláger 01:08, 18 September 2008 (UTC)


 * I tried the code change mentioned above and it fixed this problem in IE6 and FF3. I am using the download link listed in the original instructions (http://geshi.svn.sourceforge.net/svnroot/geshi/branches/RELEASE_1_0_X_STABLE/geshi-1.0.X/src/) and MW 1.12. - R590 --IP 28 October 2008


 * I tried the code change and it works for FF3. However, IE6 is still not behaving properly. I am using Mediawiki 1.13.2 and Geshi 1.0.8.1 with SyntaxHighlight_GeSHi.php from 9-28-2008. Any suggestions? --IP 19 November 2008
 * Try GeSHi 1.0.7.21, not the higher ones. this one works. I think wikipedia is using that version. --IP 17 December 2008

Problem with code overflowing page width and no scroll bars
I have recently installed this extension on a new wiki at my work place.

I can see the highlighted code syntax correctly.

If there is a long line of code it flows past the border on the right of the page and looks pretty bad.

On the examples in this extension page, if i resize the page to make it narrow the code does not overflow, a horizontal scrollbar appears.

How do i make this scrollbar appear on my wiki?

The same thing happens when i use the code tag. Any info would be appreciated. Thanks

Danny 88.151.1.10 12:08, 11 September 2008 (UTC)


 * I looked around a bit more on the fact that it wasnt working for the code tag either and found the answer.
 * Project:Support desk
 * 88.151.1.10 12:15, 11 September 2008 (UTC)

Border error
Hi! Why my standard installation of "SyntaxHighlight GeSHi" in MediaWiki software not produce border. I've Perl test sytntax:

Test syntax: http://i38.tinypic.com/biq7om.png

This's produce code without border: http://i38.tinypic.com/2a8qlnp.png

Page source: http://i35.tinypic.com/xmilc3.png

Please Help Me! :)

--Danny373 14:04, 3 October 2008 (UTC)


 * Also experiencing this issue with no border showing by default. I tried using the enclose tags to no avail.
 * Also wanted to suggest the following to allow use of the GESHI_HEADER_PRE_TABLE:


 * I would also like to suggest to expand on the usage within the README file to make it clear which $args are valid and how to use them. I found pointing to the Geshi documentation not that helpful.
 * --alexsch8 11:10 AM, 28 Oct 08 (EDT) --IP 28 October 2008

If you read GeSHi documentation this is expected. SyntaxHighlight GeSHi shouldn't use GESHI_HEADER_PRE_VALID by default, because it will use  as a code container and wiki doesn't put border around   section.

Vchepkov 16:13, 21 January 2009 (UTC)

SVN "relocated"
If I check http://svn.wikimedia.org/viewvc/mediawiki/trunk/extensions/SyntaxHighlight_GeSHi/, I can see the files fine. However, if I try to check it out from SVN or TortoiseSVN, I get the message

svn: Repository moved permanently to '/viewvc/mediawiki/trunk/extensions/SyntaxHighlight_GeSHi/'; please relocate

As far as I can tell, that's the exact same path as in the URL I pasted. Any thoughts? --SarekOfVulcan 18:03, 9 October 2008 (UTC)


 * Use /svnroot/ instead of /viewvc/. -- Sayuri 19:10, 9 October 2008 (UTC)

README
Should the README file be updated to reflect the stable branch svn URL of GeSHi rather than the trunk path? NSK Nikolaos S. Karastathis 01:15, 27 October 2008 (UTC)


 * Yes, it should as I will not take care to produce stable source in the branch. --BenBE 16:33, 28 January 2009 (UTC)

huge problem after installing
After I followed the installation instructions my wiki looks like this: screenshot. Can anyone please help me? --IP 3 November 2008


 * You've downloaded the wrong file.
 * You've downloaded instade of open this link.
 * When you've opended this link, choice a revision and click on the download link.
 * Same procedre for the other files:
 * -- MichaelFrey 17:05, 4 November 2008 (UTC)

internal bookmarks
I administrate a wiki about programming, and some of its content is source code. I would like to link from the documentation of each element to the element itself in the source on the same page. I've figured out how to break out of the tags to insert an id'ed span element, but this forces readers to tediously highlight the source one small segment at a time. Does GeSHi support bookmarks yet? If not, can they be supported? Thanks! --Jesdisciple 05:16, 12 November 2008 (UTC)

Border/css/pre Problem is back
Guys is it possible that the Quarterly MW release 1.13 broke this extension? I am running 1.13.3. Only the CSS hack above fixed the problem (combined with apache restart as well). Could this is be a parameter passing issue as well? Thanks everyone! Frankk74 05:12, 29 December 2008 (UTC)


 * I confirm that the border problem is present in the latest version of GeSHi (as of 20-Jan-2009). The above CSS hack worked wonders. Thanks! liyf. 20 January 2009

=2009=

Not using external stylesheet
The documentation for GeSHi states:

in particular, if you’re making a plugin for a forum/wiki/other system, using an external stylesheet is a good idea!

Still, this extension outputs the CSS for used classes inline, in the  function. This is inelegant (includes presentation information in HTML code), wasteful (a block of CSS for every page request) and redundant (in case an installation also uses the MediaWiki:Geshi.css page). --IP 4 January 2009

SQL
hi, i get the following error message after installing it:

GeSHi Error: GeSHi could not find the language php (using path D:\www\www1145\Techie\extensions\SyntaxHighlight_GeSHi\geshi\geshi\) (code 2)

You need to specify a language like this: "

Supported languages for syntax highlighting:

abap, actionscript, actionscript3, ada, apache, applescript, apt_sources, asm, asp, autoit, avisynth, bash, basic4gl, bf, blitzbasic, bnf, boo, c, c_mac, caddcl, cadlisp, cfdg, cfm, cil, cobol, cpp, cpp-qt, csharp, css, d, delphi, diff, div, dos, dot, eiffel, email, fortran, freebasic, genero, gettext, glsl, gml, gnuplot, groovy, haskell, hq9plus, html4strict, idl, ini, inno, intercal, io, java, java5

and i was wondering aswell if i can use the language sql or do i need another extension for this?

because i made my own wiki site and i wanted to copy a link from the original wikipedia site but it wont display it correctly, it keeps saying

and i want to get rid of that source language tag and let it be displayed correctly, do i need another extension for that??

thanks

PHP: Call_user_func_array error
Have just installed the extension for the customer - verified permissions and installation several times, and have checked out latest code from SVN, but am getting the following error message:

Warning: call_user_func_array: First argumented is expected to be a valid callback, 'SyntaxHighlight_GeSHi::parserHook' was given in /home/username/public_html/includes/Parser.php on line 468

Are there any issues with particular versions of MediaWiki?