source: extensions/File_Uploader/plugin_pdf2tab/include/thumbnails.inc.php @ 19680

Revision 19680, 852 bytes checked in by julien1311, 7 years ago (diff)

language link update

  • Property svn:eol-style set to LF
Line 
1<?php
2add_event_handler('loc_end_index_thumbnails', 'pdf2tab_thumbnails');
3
4function pdf2tab_thumbnails($tpl_thumbnails_var) {
5        global $template;
6        include_once('constants.inc.php');
7       
8        $template->set_prefilter('index_thumbnails', 'pdf2tab_add_tag_thumbnails');
9       
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));
13       
14        return $tpl_thumbnails_var;
15}
16
17function pdf2tab_add_tag_thumbnails($content, &$smarty) {
18        global $template;
19
20        $search = 'class="thumbnail"';
21       
22        $replacement = 'class="thumbnail" pdf2tab="{$thumbnail.path}"';
23        $content= str_replace($search, $replacement, $content);
24
25        return $content;
26}
27?>
Note: See TracBrowser for help on using the repository browser.