本文整理汇总了PHP中BBCode::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP BBCode::__construct方法的具体用法?PHP BBCode::__construct怎么用?PHP BBCode::__construct使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BBCode
的用法示例。
在下文中一共展示了BBCode::__construct方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1:
/**
* Object Constructor
*
* @param
* @return void
* @since 1.0
*/
function __construct() {
parent::__construct ();
$this->defaults = new KunenaBBCodeLibrary;
$this->tag_rules = $this->defaults->default_tag_rules;
$this->smileys = $this->defaults->default_smileys;
if (empty($this->smileys)) $this->SetEnableSmileys(false);
$this->SetSmileyDir ( JPATH_ROOT .'/'. KPATH_COMPONENT_RELATIVE );
$this->SetSmileyURL ( JURI::root(true) . '/' . KPATH_COMPONENT_RELATIVE );
$this->SetDetectURLs ( true );
}
示例2: KunenaBbcodeLibrary
/**
* Object Constructor
*
* @return void
*/
function __construct($relative = true)
{
parent::__construct();
$this->defaults = new KunenaBbcodeLibrary();
$this->tag_rules = $this->defaults->default_tag_rules;
$view = JString::strtolower(JRequest::getCmd('type', JRequest::getCmd('view', '')));
$this->smileys = $this->defaults->default_smileys;
if (empty($this->smileys)) {
$this->SetEnableSmileys(false);
}
$this->SetSmileyDir(JPATH_ROOT);
$this->SetSmileyURL($relative ? JURI::root(true) : rtrim(JURI::root(), '/'));
$this->SetDetectURLs(true);
$this->SetURLPattern(array($this, 'parseUrl'));
$this->SetURLTarget('_blank');
$dispatcher = JDispatcher::getInstance();
JPluginHelper::importPlugin('kunena');
$dispatcher->trigger('onKunenaBbcodeConstruct', array($this));
}