Help Installing 3rd-Party SyntaxHighlighting

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

Code:
      	<!-- 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()
      	{
      	}
      	</pre>

      	<!-- Finally, to actually run the highlighter, you need to include this JS on your page -->
      	<script type="text/javascript">
      		 SyntaxHighlighter.all()
      	</script>

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
 
Hey guys,
any ideas how i can install GeSHi or http://alexgorbatchev.com/SyntaxHighlighter/ on my XenForo RC3? With a modification or something....

Also by adding line counting....

I have found that addon here http://xenforo.com/community/threads/syntax-highlighter-bbcode.8351/ 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 :)
 
Top Bottom