Thu, December 2, 2021
 
https://devcodepro.comdevcodepro
X
InterServer Web Hosting and VPS
Home · Latest · Trends
4

Syntax code highlighting phpBB 3.2

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
rated 4 times (4) (0)
comments: 0 / hits: 9665  / 5 years ago, thu, mar 2, 17, 06:35:12
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
Login with Google
 
Share
Posted
Micky
Member since Nov 12, 2016
Total Code Snippets: 5
Total Comments: 2
Location: n/a
Micky snippets
5 years ago, thu, dec 1, 16, 6:27:26
comments: 0 / hits: 4020
PHP
5 years ago, wed, dec 7, 16, 12:37:43
comments: 0 / hits: 5334
5 years ago, thu, dec 8, 16, 6:21:29
comments: 1 / hits: 9826
PHP
4 years ago, thu, aug 3, 17, 2:59:59
comments: 0 / hits: 13958
CSS