includes/render.php
changeset 798 ddfc1b554a08
parent 745 0a3866f74faa
child 800 9cdfe82c56cd
equal deleted inserted replaced
797:8d2a40574bbc 798:ddfc1b554a08
   284     if ( $paths->namespace == 'Template' )
   284     if ( $paths->namespace == 'Template' )
   285     {
   285     {
   286       $text = preg_replace('/<nodisplay>(.*?)<\/nodisplay>/is', '', $text);
   286       $text = preg_replace('/<nodisplay>(.*?)<\/nodisplay>/is', '', $text);
   287     }
   287     }
   288     
   288     
   289     preg_match_all('/<lang code="([a-z0-9_-]+)">([\w\W]+?)<\/lang>/', $text, $langmatch);
   289     preg_match_all('/<lang (?:code|id)="([a-z0-9_-]+)">([\w\W]+?)<\/lang>/', $text, $langmatch);
   290     foreach ( $langmatch[0] as $i => $match )
   290     foreach ( $langmatch[0] as $i => $match )
   291     {
   291     {
   292       if ( $langmatch[1][$i] == $lang->lang_code )
   292       if ( $langmatch[1][$i] == $lang->lang_code )
   293       {
   293       {
   294         $text = str_replace_once($match, $langmatch[2][$i], $text);
   294         $text = str_replace_once($match, $langmatch[2][$i], $text);
   312     {
   312     {
   313       $i++;
   313       $i++;
   314       if ( $i == 5 )
   314       if ( $i == 5 )
   315         break;
   315         break;
   316       $text = RenderMan::include_templates($text);
   316       $text = RenderMan::include_templates($text);
       
   317     }
       
   318     
       
   319     $code = $plugins->setHook('render_wikiformat_posttemplates');
       
   320     foreach ( $code as $cmd )
       
   321     {
       
   322       eval($cmd);
   317     }
   323     }
   318     
   324     
   319     if ( !$plaintext )
   325     if ( !$plaintext )
   320     {
   326     {
   321       // Process images
   327       // Process images