1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Help Installing 3rd-Party SyntaxHighlighting

Discussion in 'XenForo Questions and Support' started by gmaister22, Feb 19, 2011.

  1. gmaister22

    gmaister22 Active Member

  2. Jake Bunce

    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
  3. gmaister22

    gmaister22 Active Member

    Hmm...looks like it didn't work :(

    Any more ideas?
  4. gmaister22

    gmaister22 Active Member

    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 :)
  5. Brogan

    Brogan XenForo Moderator Staff Member

    I've merged your latest thread with your original one as they both relate to the same thing.
  6. gmaister22

    gmaister22 Active Member

    alright :)
  7. gmaister22

    gmaister22 Active Member

    Guys anyone knows anything about it? How to install it or something?

Share This Page