public function parse($vars = null) { $stylesheet = $this->header . parent::parse($vars) . $this->footer; ob_start(); // Opening script tag if ($this->styleTag) { echo $this->openingTag . "\n"; } // Opening CDATA tag if ($this->CDATA) { echo '/*' . '<![CDATA[' . '*/' . "\n"; } echo $stylesheet; // Closing CDATA tag if ($this->CDATA) { echo "\n" . '/*' . ']]>' . '*/'; } // Closing script tag if ($this->styleTag) { echo "\n" . $this->closingTag; } $output = ob_get_contents(); ob_end_clean(); return $output; }
public function __construct() { // Define Joomla's app $this->app = JFactory::getApplication(); $this->input = $this->app->input; // Load configuration object. $config = FD::config(); $jConfig = FD::jconfig(); // Define the current logged in user or guest if (is_null(self::$user)) { self::$user = FD::user(); } // Define the current logged in user's access. if (is_null(self::$userAccess)) { self::$userAccess = FD::access(); } if (is_null(self::$tmplMode)) { self::$tmplMode = $this->input->get('tmpl', '', 'default'); } // Get the current access $this->my = self::$user; $this->access = self::$userAccess; // Define our own configuration $this->config = $config; // Define template's own configuration if (is_null(self::$templateConfig)) { self::$templateConfig = $this->getConfig(); } $this->template = self::$templateConfig; // Define Joomla's configuration so the world can use it. $this->jConfig = $jConfig; // Determine if the current request has tmpl=xxx $this->tmpl = self::$tmplMode; }
/** * Parses a script file. * * @since 1.0 * @access public * @param string * @return */ public function parse($vars = null) { // Pass to the parent to process the theme file $vars = parent::parse($vars); $script = $this->header . $vars . $this->footer; // Do not reveal root folder path. $file = str_ireplace(SOCIAL_JOOMLA, '', $this->file); // Replace \ with / to avoid javascript syntax errors. $file = str_ireplace('\\', '/', $file); $cdata = $this->CDATA; $scriptTag = $this->scriptTag; $safeExecution = $this->safeExecution; ob_start(); include SOCIAL_MEDIA . '/scripts/template.php'; $contents = ob_get_contents(); ob_end_clean(); return $contents; }
public function __construct() { // Pre-render all modules parent::__construct(); }