芝麻web文件管理V1.00
编辑当前文件:/home/p/r/i/prismawe/clients/canaldegap.fr/modules/TruetypeText/TruetypeText.module.php
lang('friendlyname');} function GetVersion() { return '2.1.1'; } function MinimumCMSVersion() { return '1.0';} function GetHelp() {return $this->lang('help');} function GetDescription($lang = 'en_US') {return $this->lang('description');} function GetAdminDescription($lang = 'en_US') {return $this->lang('admindescription');} function GetAuthor() {return 'Damien GAUTHIER';} function HasAdmin() {return true;} function GetAdminSection() {return 'layout';} function IsPluginModule() {return true;} function getHTMLimg (& $ttt, $text) { global $CMS_ADMIN_PAGE; $image = cms_join_path('modules', $this->GetName(),$ttt->getImage($text)); if (isset($CMS_ADMIN_PAGE)) $image = cms_join_path('..', $image); return '
'; } function VisibleToAdminUser() { return $this->CheckPermission('Use TruetypeText'); } function getFonts() { $fontfiles = array(); if ($handle = @opendir(cms_join_path(dirname(__FILE__),'fonts'))) { while (false !== ($file = @readdir($handle))) { if (endswith(strtolower($file), '.ttf') || endswith(strtolower($file), '.otf')) { $fontfiles[] = $file; } } @closedir($handle); } return $fontfiles; } function ContentPostRender(&$content) { if ($this->getpreference('replacefunction')!='ContentPostRender') return; include_once cms_join_path(dirname(__FILE__),'class.replacements.php'); $TTTrl = new TTTreplacementlist(); if (count($TTTrl->replacements)==0) return; $this->autoreplace($content, $TTTrl->replacements); } function ContentPostCompile(&$content) { if ($this->getpreference('replacefunction')!='ContentPostCompile') return; include_once cms_join_path(dirname(__FILE__),'class.replacements.php'); $TTTrl = new TTTreplacementlist(); if (count($TTTrl->replacements)==0) return; $this->autoreplace($content, $TTTrl->replacements); } function AutoReplace(&$content, $replacementlist) { include_once cms_join_path(dirname(__FILE__),'class.style.php'); $TTTsl = new TTTstylelist(); $TTTstyles = array(); foreach ($TTTsl->styles as $TTTstyle) $TTTstyles[$TTTstyle->id] = $TTTstyle; $patterns = array(); $replacements = array(); foreach ($replacementlist as $TTTr) { $patterns[] = '|(<'.$TTTr->tag.'(?:[^>]*)'.($TTTr->additional=='' ? '' : $TTTr->additional.'(?:[^>]*)').'>)(.*?)('.$TTTr->tag.'>)|seim'; $replacements[] = '"\\1".\$TTTstyles['.$TTTr->style.']->getImageClean("\\2")."\\3"'; } //$content .= ''; $content = preg_replace($patterns, $replacements, $content); } } ?>