Gist Extras in Habari

Gist Extras embeds gists in post content, and allows for the use of custom CSS.

Unfortunately, the author has not updated the plug-in for Habari 0.7 - where plug-in information now resides in a separate XML file. To address this, make the following changes to gistextras.plugin.php:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
*** user/plugins/gistextras/gistextras.plugin.php.orig 2010-06-26 22:11:59.777117173 +0800
--- user/plugins/gistextras/gistextras.plugin.php 2010-06-26 22:11:32.328366681 +0800
***************
*** 2,20 ****

class GistExtras extends Plugin
{
- public function info()
- {
- return array(
- 'url' => 'http://andrewhutchings.com',
- 'name' => 'Gist Extras',
- 'description' => 'Embeds gists in post content, and allows for the use of custom CSS.',
- 'license' => 'Apache License 2.0',
- 'author' => 'Andrew Hutchings',
- 'authorurl' => 'http://andrewhutchings.com',
- 'version' => '0.0.2'
- );
- }
-
public function action_update_check()
{
Update::add( 'GistExtras', 'A6A9D42C-2F4F-11DE-BB63-026155D89593', $this->info->version );
--- 2,7 ----

You’ll also need to create gistextras.plugin.xml:

1
2
3
4
5
6
7
8
9
10
<?xml version="1.0" encoding="utf-8" ?>
<pluggable type="plugin">
<name>Gist Extras</name>
<license url="http://www.apache.org/licenses/LICENSE-2.0.html">Apache Software License 2.0</license>
<url>http://andrewhutchings.com</url>
<author url="http://andrewhutchings.com">Andrew Hutchings</author>
<version>0.0.2</version>
<description><![CDATA[Embeds gists in post content, and allows for the use of custom CSS.]]></description>
<copyright>2009</copyright>
</pluggable>