sTemplatePathPlugin)) { preg_match('/^Plugin([\w]+)_Action([\w]+)$/i',$this->GetActionClass(),$aMatches); /** * Проверяем в списке шаблонов */ $aMatches[1]=strtolower($aMatches[1]); $aPaths=glob(Config::Get('path.root.server').'/plugins/'.$aMatches[1].'/templates/skin/*/actions/Action'.ucfirst($aMatches[2]),GLOB_ONLYDIR); $sTemplateName=($aPaths and in_array( Config::Get('view.skin'), array_map( create_function( '$sPath', 'preg_match("/skin\/([\w\-]+)\/actions/i",$sPath,$aMatches); return $aMatches[1];' ), $aPaths ) )) ? Config::Get('view.skin') : 'default'; $sDir=Config::Get('path.root.server')."/plugins/{$aMatches[1]}/templates/skin/{$sTemplateName}/"; $this->sTemplatePathPlugin = is_dir($sDir) ? $sDir : null; } return $this->sTemplatePathPlugin; } /** * Установить значение пути к директории шаблона плагина * * @param string $sTemplatePath Полный серверный путь до каталога с шаблоном * @return bool */ public function setTemplatePathPlugin($sTemplatePath) { if(!is_dir($sTemplatePath)) return false; $this->sTemplatePathPlugin = $sTemplatePath; } } ?>