Topic on Project:Support desk

[WW][Resolved] SyntaxHighlight Geshi Extension : box around every line

4
Nouklea (talkcontribs)

Hi!

  • MediaWiki : 1.16.0
  • PHP : 5.3.0
  • MySQL : 5.1.36

I have installed the Extension:SyntaxHighlight GeSHi. Following advices in the 2008 discussion archives (see here), I modified the SyntaxHighlight_GeSHi.class.php file so that borders and background would be properly displayed when I use the <pre> tag.

I now face a problem : when I ask for line numbers to be displayed within a <syntaxhighlight> tag, a box is drawn around every line. This problem is not apparent when no line numbers are required. Here is a printscreen from my wiki were I display 2 blocs of code : one with and one without line numbers. You can see how ugly it gets...

I posted the problem on the Extension discussion page about a month ago, but got no feedback. If anyone had an idea on how to solve this, I would really appreciate :)

Thank you very much for your time and help!

Krinkle (talkcontribs)

Don't modify the extensions' classes. Instead do a clean install and use the MediaWiki:Geshi.css page on your wiki (editing that page is restricted to administrators), and in there add which ever css rules you want.

Nouklea (talkcontribs)

Thanks for your help! I reinstalled the extension and deleted the changes I made to the skins. Then I tried updating the css within the wiki page. I had trouble proceeding, until I figured out I was updating the MyWiki:Geshi.css page instead of the MediaWiki.css page. This little block of code on the MediaWiki.css page solved my problem :

div.mw-geshi {
  padding: 1em; 
  margin: 1em 0; 
  border: 1px dashed #2f6fab;
  background-color: #f9f9f9;
}

Thanks again!

Reply to "[WW][Resolved] SyntaxHighlight Geshi Extension : box around every line"