Download the PHP package club-1/flarum-ext-server-side-highlight without Composer

On this page you can find all versions of the php package club-1/flarum-ext-server-side-highlight. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package flarum-ext-server-side-highlight

CLUB1 Server Side Highlight

License Latest Stable Version Total Downloads Coverage Build Status

A Flarum extension. Server-side code highlighting with cached results.

banner banner

For each code block of the posts, a hash is computed while parsing them, then on render the code highlighting is done in the backend once, and stored in the cache for future renderings.

It provides the following advantages:

  1. The highlighting is done on the server so it is not up to the clients to do it.
  2. The server uses the cache to save highlighted blocks to only do the processing once.
  3. It works without any JS so even on the worst web browser the highlight will be there and there is no delay before the highlighting is applied.
  4. The theme adapts itself to the "dark mode" setting of Flarum.
  5. It works even with BBCode extension disabled.
  6. Admins can choose the highlight theme for both "Light" and "Dark" Flarum variants.
  7. Admins can download highlight themes with highlight:download Flarum console command.
  8. It is compatible with fof/nightmode by switching the highlight theme accordingly.

Client-side highlighting is still used, but only for the post preview.

Installation

Install with composer:

Recommendation

This extension alone does not apply the formatting changes to previously posted comments. I you want to reparse all the comments posts of the database it is recommended to install and enable the club-1/flarum-ext-chore-commands extension and use its chore:reparse command.

Updating

Acknowledgement

This extension is based on the following libraries:

Links


All versions of flarum-ext-server-side-highlight with dependencies

PHP Build Version
Package Version
Requires php Version >=7.3
flarum/core Version ^1.2.0
scrivo/highlight.php Version ^9.18
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package club-1/flarum-ext-server-side-highlight contains the following files

Loading the files please wait ....