Home · Latest · Trends  /  HTML, XML
4

Syntax code highlighting phpBB 3.2

rated 4 times [  4] [ 0]  / comments: 0 / hits: 3837  / 2 years ago, thu, mar 2, 2017, 06:35:12
Syntax code highlighting with JavaScript code prettifier for phpBB 3.2
1. In /styles/YOURTEMPLATE/template/bbcode.html

replace this code:

<!-- BEGIN code_open --><div class="codebox"><p>{L_CODE}{L_COLON} <a href="#" onclick="selectCode(this); return false;">{L_SELECT_ALL_CODE}</a></p><pre><code><!-- END code_open -->

with this code:

<!-- BEGIN code_open --><div class="codebox"><p>{L_CODE}{L_COLON} <a href="#" onclick="selectCode(this); return false;">{L_SELECT_ALL_CODE}</a></p><pre class="prettyprint"><code><!-- END code_open -->


2. In styles/YOURTEMPLATE/template/overall_header.html put this code in HEAD section of the HTML


<script src="https://cdn.rawgit.com/google/code-prettify/master/loader/run_prettify.js"></script>


3. Go to ACP - > Purge Cache
More From » HTML, XML
 

Comments

There are no comments for this Snippet yet
Only authorized users can post. Please sign in first, or register a free account
 
Share
Snippets
Count number of rows in the record set
3 years ago, thu, dec 1, 2016
Refresh html div content with jQuery
3 years ago, wed, dec 7, 2016
Getting a MySQL last MySQL id from an ADODB conn
3 years ago, thu, dec 8, 2016
Bootstrap 4 button remove focus outline border
2 years ago, thu, aug 3, 2017
Sponsor
Posted
Micky

Micky

Member since Nov 12, 2016
Total Code Snippets: 5
Total Comments: 2
Location: n/a
Following
User not following anyone yet.