Ignore:
Timestamp:
Jan 5, 2013, 1:39:08 AM (8 years ago)
Author:
julien1311
Message:

[file_uploader] pdf2tab update

Location:
extensions/File_Uploader
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • extensions/File_Uploader

    • Property tsvn:logtemplate set to [file_uploader]
  • extensions/File_Uploader/plugin_pdf2tab

    • Property tsvn:logtemplate set to [file_uploader]
  • extensions/File_Uploader/plugin_pdf2tab/include

    • Property tsvn:logtemplate set to [file_uploader]
  • extensions/File_Uploader/plugin_pdf2tab/include/thumbnails.inc.php

    r19680 r19821  
    11<?php
    2 add_event_handler('loc_end_index_thumbnails', 'pdf2tab_thumbnails');
     2add_event_handler('loc_end_index_thumbnails', 'file_uploader_pdf2tab_thumbnails');
    33
    4 function pdf2tab_thumbnails($tpl_thumbnails_var) {
    5         global $template;
    6         include_once('constants.inc.php');
     4function file_uploader_pdf2tab_thumbnails($tpl_thumbnails_var) {
     5        global $template, $conf;
    76       
    8         $template->set_prefilter('index_thumbnails', 'pdf2tab_add_tag_thumbnails');
     7        $conf_file_uploader = unserialize($conf['file_uploader']);
    98       
    10         $template->assign('pdf2tab_supported_extensions', $supported_extensions);
    11         $template->set_filename('pdf2tab_template_thumbnails', FILE_UPLOADER_PDF2TAB_ABSOLUTE_PATH.'template/thumbnails.tpl');
    12         $template->concat('PLUGIN_INDEX_CONTENT_END', $template->parse('pdf2tab_template_thumbnails', true));
     9        $template->set_prefilter('index_thumbnails', 'file_uploader_pdf2tab_add_tag_thumbnails');
     10       
     11        $template->assign('file_uploader_pdf2tab_supported_extensions', $conf_file_uploader['pdf2tab_extensions']);
     12        $template->set_filename('file_uploader_pdf2tab_template_thumbnails', FILE_UPLOADER_PDF2TAB_ABSOLUTE_PATH.'template/thumbnails.tpl');
     13        $template->concat('PLUGIN_INDEX_CONTENT_END', $template->parse('file_uploader_pdf2tab_template_thumbnails', true));
    1314       
    1415        return $tpl_thumbnails_var;
    1516}
    1617
    17 function pdf2tab_add_tag_thumbnails($content, &$smarty) {
     18function file_uploader_pdf2tab_add_tag_thumbnails($content, &$smarty) {
    1819        global $template;
    1920
    2021        $search = 'class="thumbnail"';
    2122       
    22         $replacement = 'class="thumbnail" pdf2tab="{$thumbnail.path}"';
     23        $replacement = 'class="thumbnail" file_uploader_pdf2tab="{$thumbnail.path}"';
    2324        $content= str_replace($search, $replacement, $content);
    2425
Note: See TracChangeset for help on using the changeset viewer.