add this code to your template in the same place described in the previous post.
<link href='http://o.aolcdn.com/dojo/1.2/dojox/highlight/resources/highlight.css' rel='stylesheet'/>
<link href='http://o.aolcdn.com/dojo/1.2/dojox/highlight/resources/pygments/default.css' rel='stylesheet'/>
<script djConfig='parseOnLoad: true' src='http://o.aolcdn.com/dojo/1.2/dojo/dojo.xd.js'/>
<script>
dojo.require("dojox.highlight");
dojo.require("dojox.highlight.languages._all");
dojo.require("dojox.highlight.languages.pygments._www");
dojo.addOnLoad(function() {
dojo.query("code").forEach(dojox.highlight.init);
});
</script>
put all your code inside
<pre>
and <code>
blocks and use a <code class="lang">
to define the language for the code block. valid values for lang are:- cpp
- css
- delphi
- django
- html
- javascript
- python
- sql
- xml
they now support PHP code :)
ReplyDelete