Skip to content
This is an extension for PHPBB 3.1.x that allows to highlight the code
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
acp
adm/style
config
core
event
language/en
migrations
styles/all
tests
LICENSE
README.md
composer.json
ext.php

README.md

PHPBB Extensions: Code Highlight

This is an extension for PHPBB forum that allows to use highlight.js in forum posts.

Installation

Dou to bad sync with composer there are some steps

  1. Download version of repository that You are prefer
  2. Unzip extension code to the ext directory of Your PHPBB board
  3. Navigate to the ACP Customise -> Manage extensions
  4. Enable extension with name PHPBB Code Highlight
  5. [Optional] Navigate to the ACP Extensions -> PPHPBB Code Highlight -> Settings and setup list of languages and theme.
NOTE

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:

  1. HTTP2 on server
  2. Static-Domain
  3. CDN

How to use in posts

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]

Links

TODO

  1. Proper store dependency from HighlightJS repo
  2. Wrap PHPBB extension with composer
  3. Write tests

Thank You

Big thanks for community

You can’t perform that action at this time.