Source for file _gmcode.plugin.php
Documentation is available at _gmcode.plugin.php
* This file implements the GMcode plugin for b2evolution
* GreyMatter style formatting
* b2evolution - {@link http://b2evolution.net/}
* Released under GNU GPL License - {@link http://b2evolution.net/about/license.html}
* @copyright (c)2003-2008 by Francois PLANQUE - {@link http://fplanque.net/}
if( !defined('EVO_MAIN_INIT') ) die( 'Please, do not access this page directly.' );
* Replaces GreyMatter markup in HTML (not XML).
* GreyMatter formatting search array
'# \*\* (.+?) \*\* #x', // **bold**
'# \x5c\x5c (.+?) \x5c\x5c #x', // \\italics\\
'# (?<!:) \x2f\x2f (.+?) \x2f\x2f #x', // //italics// (not preceded by : as in http://)
'# __ (.+?) __ #x', // __underline__
'/ \#\# (.+?) \#\# /x', // ##tt##
( \s*? \n )? # Eat optional blank line after %%%
( \n \s*? )? # Eat optional blank line before %%%
'<span style="text-decoration:underline">$1</span>',
'<div class="codeblock"><pre><code>$2</code></pre></div>'
$this->long_desc =
T_('**bold** \\italics\\ //italics// __underline__ ##tt## %%codeblock%%');
* @see Plugin::RenderItemAsHtml()
$content =
& $params['data'];
$content =
preg_replace( $this->search, $this->replace, $content );
* $Log: _gmcode.plugin.php,v $
* Revision 1.17 2008/01/21 09:35:41 fplanque
* Revision 1.16 2007/04/26 00:11:04 fplanque
* Revision 1.15 2007/04/20 02:53:13 fplanque
* limited number of installs
* Revision 1.14 2006/12/26 03:19:12 fplanque
* assigned a few significant plugin groups
* Revision 1.13 2006/07/10 20:19:30 blueyed
* Fixed PluginInit behaviour. It now gets called on both installed and non-installed Plugins, but with the "is_installed" param appropriately set.
* Revision 1.12 2006/07/07 21:26:49 blueyed
* Revision 1.11 2006/07/06 19:56:29 fplanque
* Revision 1.10 2006/06/16 21:30:57 fplanque
* Started clean numbering of plugin versions (feel free do add dots...)
* Revision 1.9 2006/04/11 21:22:26 fplanque