Quantcast
Channel: phpBB.com
Viewing all articles
Browse latest Browse all 1404

phpBB Custom Coding • Re: How to enable "Expand code" on 3.3.14 ?

$
0
0
That wasn't an extension, it was part of core features. That's actually a built in php function but it produces a massive amount of HTML. I would presume it was canned with new text formatting used for DB storage introduced with 3.2.

There is extension here:

https://github.com/s9e/phpbb-ext-highlighter

Appears the only thing it does is load is highlight.js which you can easily do with a template edit.

https://highlightjs.org/

Between the head tags in overall_header.html (HTML is from highlight.js example):

Code:

<!-- IF S_VIEWTOPIC --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/styles/default.min.css"><script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/highlight.min.js"></script><!-- and it's easy to individually load additional languages --><script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/languages/go.min.js"></script><script>hljs.highlightAll();</script><!-- ENDIF -->
Working great, thank you so much!

Statistics: Posted by Antonio Linares — Thu Jan 09, 2025 10:53 pm



Viewing all articles
Browse latest Browse all 1404

Trending Articles