public function display($tpl = null) { $document =& JFactory::getDocument(); JHTML::stylesheet('administrator/components/com_phocagallery/assets/phocagallery.css'); JHTML::stylesheet('administrator/components/com_phocagallery/assets/jcp/picker.css'); $document->addScript(JURI::base(true) . '/components/com_phocagallery/assets/jcp/picker.js'); $this->require_ftp = JClientHelper::setCredentialsFromRequest('ftp'); if ($this->themeName()) { $this->theme_name = $this->themeName(); } // Background Image $params = JComponentHelper::getParams('com_phocagallery'); $this->tmpl['formaticon'] = PhocaGalleryImage::getFormatIcon(); // Small $this->tmpl['siw'] = $params->get('small_image_width', 50); $this->tmpl['sih'] = $params->get('small_image_height', 50); //After creating an image (post with data); $this->tmpl['ssbgc'] = JRequest::getVar('ssbgc', '', '', 'string'); $this->tmpl['sibgc'] = JRequest::getVar('sibgc', '', '', 'string'); $this->tmpl['sibrdc'] = JRequest::getVar('sibrdc', '', '', 'string'); $this->tmpl['sie'] = JRequest::getVar('sie', '', '', 'int'); $this->tmpl['siec'] = JRequest::getVar('siec', '', '', 'string'); $siw = JRequest::getVar('siw', '', '', 'int'); $sih = JRequest::getVar('sih', '', '', 'int'); $this->tmpl['ssbgc'] = PhocaGalleryUtils::filterInput($this->tmpl['ssbgc']); $this->tmpl['sibgc'] = PhocaGalleryUtils::filterInput($this->tmpl['sibgc']); $this->tmpl['sibrdc'] = PhocaGalleryUtils::filterInput($this->tmpl['sibrdc']); $this->tmpl['siec'] = PhocaGalleryUtils::filterInput($this->tmpl['siec']); if ($this->tmpl['ssbgc'] != '') { $this->tmpl['ssbgc'] = '#' . $this->tmpl['ssbgc']; } if ($this->tmpl['sibgc'] != '') { $this->tmpl['sibgc'] = '#' . $this->tmpl['sibgc']; } if ($this->tmpl['sibrdc'] != '') { $this->tmpl['sibrdc'] = '#' . $this->tmpl['sibrdc']; } if ($this->tmpl['siec'] != '') { $this->tmpl['siec'] = '#' . $this->tmpl['siec']; } if ((int) $siw > 0) { $this->tmpl['siw'] = (int) $siw; } if ((int) $sih > 0) { $this->tmpl['sih'] = (int) $sih; } // Medium $this->tmpl['miw'] = $params->get('medium_image_width', 100); $this->tmpl['mih'] = $params->get('medium_image_height', 100); //After creating an image (post with data); $this->tmpl['msbgc'] = JRequest::getVar('msbgc', '', '', 'string'); $this->tmpl['mibgc'] = JRequest::getVar('mibgc', '', '', 'string'); $this->tmpl['mibrdc'] = JRequest::getVar('mibrdc', '', '', 'string'); $this->tmpl['mie'] = JRequest::getVar('mie', '', '', 'int'); $this->tmpl['miec'] = JRequest::getVar('miec', '', '', 'string'); $miw = JRequest::getVar('miw', '', '', 'int'); $mih = JRequest::getVar('mih', '', '', 'int'); $this->tmpl['msbgc'] = PhocaGalleryUtils::filterInput($this->tmpl['msbgc']); $this->tmpl['mibgc'] = PhocaGalleryUtils::filterInput($this->tmpl['mibgc']); $this->tmpl['mibrdc'] = PhocaGalleryUtils::filterInput($this->tmpl['mibrdc']); $this->tmpl['miec'] = PhocaGalleryUtils::filterInput($this->tmpl['miec']); if ($this->tmpl['msbgc'] != '') { $this->tmpl['msbgc'] = '#' . $this->tmpl['msbgc']; } if ($this->tmpl['mibgc'] != '') { $this->tmpl['mibgc'] = '#' . $this->tmpl['mibgc']; } if ($this->tmpl['mibrdc'] != '') { $this->tmpl['mibrdc'] = '#' . $this->tmpl['mibrdc']; } if ($this->tmpl['miec'] != '') { $this->tmpl['miec'] = '#' . $this->tmpl['miec']; } if ((int) $miw > 0) { $this->tmpl['miw'] = (int) $miw; } if ((int) $mih > 0) { $this->tmpl['mih'] = (int) $mih; } $this->addToolbar(); parent::display($tpl); }