From 4855187c67a331c1417eb04b4525d5eb5e68bc3d Mon Sep 17 00:00:00 2001 From: CaMer0n Date: Tue, 22 May 2012 07:30:38 +0000 Subject: [PATCH] Improved bbcode styling --- e107_handlers/bbcode_handler.php | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/e107_handlers/bbcode_handler.php b/e107_handlers/bbcode_handler.php index ab2a25c61..5c19adce5 100644 --- a/e107_handlers/bbcode_handler.php +++ b/e107_handlers/bbcode_handler.php @@ -30,6 +30,7 @@ class e_bbcode var $bbLocation; // Location for each file - 'core' or a plugin name var $preProcess = FALSE; // Set when processing bbcodes prior to saving var $core_bb = array(); + var $class = FALSE; function __construct() { @@ -419,6 +420,28 @@ class e_bbcode return $ret; } + + //Set the class type for a bbcode eg. news | page | user | {plugin-folder} + function setClass($mode=false) + { + $this->class = $mode; + } + + // return the class for a bbcode + function getClass($type='') + { + $ret = "bbcode-".$type; + if($this->class) + { + $ret .= " bbcode-".$type."-".$this->class; + } + return $ret; + } + + function clearClass() + { + $this->setClass(); + } }