This is an extension for PHPBB forum that allows to use highlight.js in forum posts.
Dou to bad sync with composer there are some steps
- Download version of repository that You are prefer
- Unzip extension code to the
ext
directory of Your PHPBB board - Navigate to the ACP
Customise -> Manage extensions
- Enable extension with name
PHPBB Code Highlight
- [Optional] Navigate to the ACP
Extensions -> PPHPBB Code Highlight -> Settings
and setup list of languages and theme.
Enabling of all languages will cause performance issues on clients side, because each langauge is loading as separate JS. So, if You are still needed to have all languages, then it will be nice to have:
- HTTP2 on server
- Static-Domain
- CDN
To highlight code in post use new PHPBB tag [syntax]:
[syntax=cpp]
#include <tuple>
std::tuple<int, bool, float> foo()
{
return std::make_tuple(128, true, 1.5f);
}
int main()
{
std::tuple<int, bool, float> result = foo();
int value = std::get<0>(result);
int obj1;
bool obj2;
float obj3;
std::tie(obj1, obj2, obj3) = foo();
}
[/syntax]
- Proper store dependency from HighlightJS repo
- Wrap PHPBB extension with composer
- Write tests
Big thanks for community