Exemplo n.º 1
0
	/**
	 * 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 );
	}
Exemplo n.º 2
0
 /**
  * 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));
 }