Changeset 23023


Ignore:
Timestamp:
Jun 3, 2013, 4:08:31 PM (7 years ago)
Author:
plg
Message:

simpler addition of JS file (smarty parsed)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/automatic_size/main.inc.php

    r23022 r23023  
    116116      )
    117117    );
     118
     119  $template->set_filename('asize_picture_js', realpath(ASIZE_PATH.'picture_js.tpl'));
     120  $template->parse('asize_picture_js');
     121 
    118122  return $template->parse( 'default_content', true);
    119123}
     
    121125function asize_picture_prefilter($content, &$smarty)
    122126{
    123   // step 1
    124127  $pattern = '#\{foreach from=\$current\.unique_derivatives#';
    125128  $replacement = '
     
    129132  $content = preg_replace($pattern, $replacement, $content);
    130133
    131   // step 2
    132   $pattern = '#PLUGIN_PICTURE_BEFORE\}\{/if\}#';
    133   $replacement = 'PLUGIN_PICTURE_BEFORE}{/if}'."\n".file_get_contents(ASIZE_PATH.'picture_js.tpl');
    134 
    135   $content = preg_replace($pattern, $replacement, $content);
    136 
    137134  return $content;
    138135}
Note: See TracChangeset for help on using the changeset viewer.