From 9c69982711c24d375c13c41c891b55d59a45997e Mon Sep 17 00:00:00 2001 From: lisa Date: Thu, 15 Jan 2009 22:04:45 +0000 Subject: [PATCH] added function to initialise the shortcode class --- e107_handlers/shortcode_handler.php | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/e107_handlers/shortcode_handler.php b/e107_handlers/shortcode_handler.php index d4008af44..ea3e055f4 100644 --- a/e107_handlers/shortcode_handler.php +++ b/e107_handlers/shortcode_handler.php @@ -12,8 +12,8 @@ | GNU General Public License (http://gnu.org). | | $Source: /cvs_backup/e107_0.8/e107_handlers/shortcode_handler.php,v $ -| $Revision: 1.21 $ -| $Date: 2009-01-15 20:18:46 $ +| $Revision: 1.22 $ +| $Date: 2009-01-15 22:04:45 $ | $Author: lisa_ $ +----------------------------------------------------------------------------+ */ @@ -48,6 +48,16 @@ function register_shortcode($classFunc, $codes, $path='', $force=false) } } +function initShortcodeClass($class) +{ + $e107 = e107::getInstance(); + $sc = &$e107->tp->e_sc; + if(class_exists($class)) + { + $sc->scClasses[$class] = new $class; + } +} + class e_shortcode { var $scList = array(); // The actual code - added by parsing files or when plugin codes encountered. Array key is the shortcode name.