public function getFavicoFullDir() { return utilsCsp::getUploadsDir() . DS . $this->getFavicoDir() . DS . $this->get('favico'); }
public function setLogoDefault($d = array()) { $code = isset($d['code']) ? $d['code'] : ''; if (!empty($code)) { $plTemplate = $this->get('template'); // Current plugin template if ($plTemplate && frameCsp::_()->getModule($plTemplate)) { $newValue = frameCsp::_()->getModule($plTemplate)->getDefOptions($code); if ($newValue !== NULL && file_exists(frameCsp::_()->getModule($plTemplate)->getModDir() . $newValue)) { // Remove prev. image if (utilsCsp::fileExists(frameCsp::_()->getModule('options')->getLogoImgFullDir())) { utilsCsp::deleteFile(frameCsp::_()->getModule('options')->getLogoImgFullDir()); } // Copy new image from tpl module directory to uploads dirctory copy(frameCsp::_()->getModule($plTemplate)->getModDir() . $newValue, utilsCsp::getUploadsDir() . DS . $this->getModule()->getLogoImgDir() . DS . $newValue); if ($this->save(array('opt_values' => array($code => $newValue), 'code' => $code))) { return $this->getModule()->getLogoImgFullPath(); } } else { $this->pushError(langCsp::_('There is no default for this option and current template')); } } else { $this->pushError(langCsp::_('There is no default for this option and current template')); } } else { $this->pushError(langCsp::_('Empty option code')); } return false; }