#!/usr/bin/php $nodes) { $dirpath = ($dirpath ? BSFunctions::FetchSourcePath($dirpath) : ''); foreach ($nodes AS $file) { $ext = BSFunctions::FetchExtension($file); if ($ext == 'php') { $files[] = '.' . BSFunctions::FetchSourcePath($search) . $dirpath . $file; } else if ($ext == 'xml' OR $ext == 'tpl' OR $ext == 'html' OR $ext == 'htm') { $templates[] = array( 'orig' => '.' . BSFunctions::FetchSourcePath($search) . $dirpath . $file, 'temp' => '.' . BSFunctions::FetchSourcePath($search) . $dirpath . 'xgtxt-' . $file . '.php' ); } } } // ################################################################### // compile the templates into gettext-friendly PHP code function process_template_text($text) { return ''; } foreach ($templates AS $paths) { $template = file_get_contents($paths['orig']); if (strpos($template, '{@') === false) { continue; } $template = str_replace('"', '\"', $template); $template = preg_replace('#\{@\\\"(.*?)\\\"\}#ise', 'process_template_text(\'$1\')', $template); print($template); exit; file_put_contents($paths['temp'], preg_replace('#\{@"(.*)"\}#e', "process_template_text('\1')", $template)); } /*=====================================================================*\ || ################################################################### || # $HeadURL$ || # $Id$ || ################################################################### \*=====================================================================*/ ?>