From df0055fe748cba93d5385b53e8e3df2ef7c71edc Mon Sep 17 00:00:00 2001 From: Christian Fowler Date: Thu, 17 May 2007 18:50:28 +0000 Subject: first crack at stencils. They work! woot! tidy up still needed. --- LibertySystem.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'LibertySystem.php') diff --git a/LibertySystem.php b/LibertySystem.php index 0faade0..d13d430 100755 --- a/LibertySystem.php +++ b/LibertySystem.php @@ -3,7 +3,7 @@ * System class for handling the liberty package * * @package liberty -* @version $Header: /cvsroot/bitweaver/_bit_liberty/LibertySystem.php,v 1.69 2007/05/17 14:14:29 nickpalmer Exp $ +* @version $Header: /cvsroot/bitweaver/_bit_liberty/LibertySystem.php,v 1.70 2007/05/17 18:50:28 spiderr Exp $ * @author spider */ @@ -688,8 +688,13 @@ class LibertySystem extends LibertyBase { * @return TRUE on success, FALSE on failure - mErrors will contain reason for failure */ function parse_data_plugins( &$data, &$preparsed, &$noparsed, &$pParser, &$pCommonObject ) { - global $gLibertySystem; + global $gLibertySystem, $gBitSystem; // Find the plugins + if( $gBitSystem->isPackageActive( 'stencil' ) ) { + require_once( STENCIL_PKG_PATH.'BitStencil.php' ); + $data = preg_replace_callback("/\{\{\/?([^|]+)([^\}]*)\}\}/", 'parse_stencil_data', $data ); + } + // note: $curlyTags[0] is the complete match, $curlyTags[1] is plugin name, $curlyTags[2] is plugin arguments preg_match_all("/\{\/?([A-Za-z0-9]+)([^\}]*)\}/", $data, $curlyTags); -- cgit v1.3