Help Installing 3rd-Party SyntaxHighlighting

Jake Bunce

XenForo moderator
Staff member
Following their instructions and their example, you need to upload their js files and then add this code to your forum page:

      	<!-- Include required JS files -->
      	<script type="text/javascript" src="js/shCore.js"></script>

      		At least one brush, here we choose JS. You need to include a brush for every
      		language you want to highlight
      	<script type="text/javascript" src="css/shBrushJScript.js"></script>

      	<!-- Include *at least* the core style and default theme -->
      	<link href="css/shCore.css" rel="stylesheet" type="text/css" />
      	<link href="css/shThemeDefault.css" rel="stylesheet" type="text/css" />

      	<!-- You also need to add some content to highlight, but that is covered elsewhere. -->
      	<pre class="brush: js">
      	function foo()

      	<!-- Finally, to actually run the highlighter, you need to include this JS on your page -->
      	<script type="text/javascript">
It doesn't specify where on the page to add this code. You can probably add it to this template in xenForo:

Admin CP -> Appearance -> Templates -> page_container_js_head


Active member
Hey guys,
any ideas how i can install GeSHi or on my XenForo RC3? With a modification or something....

Also by adding line counting....

I have found that addon here but it doesn't work with RC3.

I have seen many posts around asking for syntax highlighting there was not any solution...
I am running a computing forum and i really need the syntax highlighting to be added so if you know give me a hand :)


XenForo moderator
Staff member
I've merged your latest thread with your original one as they both relate to the same thing.