Changeset 19287


Ignore:
Timestamp:
12/04/12 23:51:46 (7 years ago)
Author:
julien1311
Message:

Begin work on picture.php

Location:
extensions/pdf2tab
Files:
4 added
1 deleted
1 edited

Legend:

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

    r19285 r19287  
    22/* 
    33Plugin Name: pdf2tab 
    4 Version: 2.4.a 
     4Version: 2.4.b 
    55Description: open pdf files in new tab instead of downloading it 
    66Plugin URI: http://fr.piwigo.org/ext/extension_view.php?eid=655 
     
    1212 
    1313define('PDF2TAB_DIR' , basename(dirname(__FILE__))); 
     14define('PDF2TAB_PATH' , PHPWG_PLUGINS_PATH.PDF2TAB_DIR.'/'); 
    1415 
    1516/* +-----------------------------------------------------------------------+ 
     
    1718 * +-----------------------------------------------------------------------+ */ 
    1819         
    19 add_event_handler('loc_end_index_thumbnails', 'pdf2tab_thumbnails'); 
    20  
    21 function pdf2tab_thumbnails($tpl_thumbnails_var) { 
    22         global $template; 
    23  
    24         $template->set_prefilter('index_thumbnails', 'pdf2tab_prefilter_thumbnails'); 
    25          
    26         $template->set_filename('pdf2tab_template', dirname(__FILE__).'/template/pdf2tab.tpl'); 
    27         $template->concat('PLUGIN_INDEX_CONTENT_END', $template->parse('pdf2tab_template', true)); 
    28          
    29         return $tpl_thumbnails_var; 
    30 } 
    31  
    32 function pdf2tab_prefilter_thumbnails($content, &$smarty) { 
    33         global $template; 
    34  
    35         $search = 'class="thumbnail"'; 
    36          
    37         $replacement = 'class="thumbnail" pdf2tab="{$thumbnail.path}"'; 
    38         $content= str_replace($search, $replacement, $content); 
    39  
    40         return $content; 
    41 } 
     20include_once(PDF2TAB_PATH.'thumbnails.php'); 
     21include_once(PDF2TAB_PATH.'picture.php'); 
    4222?> 
Note: See TracChangeset for help on using the changeset viewer.