I use the Crayon syntax highlighting plugin in order to display code on this blog. Recently I upgrade my server to PHP 7.3, which broke a fair few things, including this plugin.

Unfortunately, it looks like this plugin is no longer being maintained – the latest stable release was three years ago, and the latest commit on their GitHub was over a year ago.

Never fear, open source is here!

If you’re using the stable version, open up crayon_langs.class.php and change crayon_langs.class.php:340 from this:

To this:

Notice the escaping before the - character.

Should work now.

Well it’s been a little while since I’ve blogged anything about Elgg, hasn’t it?

So, here’s a quick plugin that enables you to switch on a simple per-user link tracking for selected divs within your site.

I wrote this as I needed to quickly track links within certain sections of a site (rather than everywhere, where something like Piwik would have been more appropriate).

Hopefully it’s useful to you!

» Visit the project on Github...

A few months ago I wrote a bit about extending your Known plugins to support console functionality. I’ve recently pushed a patch which will make this functionality even more useful.

Previously, you could only have one console command available to your regular Known plugin, this was of course limiting. Now, you can have multiple!

Create a directory Console within your plugin’s home directory. Then fill it with one or more classes, which extend \Idno\Common\ConsolePlugin, one for each command you want to export. The format of this is exactly the same as those for any other console plugin.