Ignore:
Timestamp:
12/06/12 23:08:40 (7 years ago)
Author:
julien1311
Message:

version auto

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/pdf2tab/picture.php

    r19295 r19310  
    33 
    44function pdf2tab_add_tag_picture($content, $element_info) { 
    5         preg_match('/<\s*img\s+[^>]*?src\s*=\s*(\'|\")(.*?)\\1[^>]*?\/?\s*>/i',$content,$match); 
    6          
    7         $content = str_replace($match[0],'<a href="'.$element_info['element_url'].'" target="_blank">'.$match[0].'</a>',$content); 
     5        if (strrchr($element_info['file'], ".") == ".pdf") { 
     6                preg_match('/<\s*img\s+[^>]*?src\s*=\s*(\'|\")(.*?)\\1[^>]*?\/?\s*>/i',$content,$match); 
     7                 
     8                $content = str_replace($match[0],'<a href="'.$element_info['element_url'].'" target="_blank">'.$match[0].'</a>',$content); 
     9        } 
    810         
    911        return $content; 
Note: See TracChangeset for help on using the changeset viewer.